14.01.2020 Views

ABAP_to_the_Future

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Creating Rules in BRFplus: Basic Example 9.2

At the top of the screen shown in Figure 9.15 is a Type dropdown box, in which

you choose from a vast list of possible expression types. In this case, choose Decision

Tree, and give your tree a name and de scription. This example starts the

name with “DT_” for “decision tree.”

Moving down the screen, yo u’ll see a big list of Possible Result Data Objects ,

which are all the elements from the functi on signature. You select the one you

want (in this case, Ingredients) and the selected element is copied to the middle

of the Result section the instant you select th e row. You can change your mind

after you have selected a row, but you can only have one result element.

Click Create And Navigate To Object , and the screen shown in Figure 9.16

appears.

Figure 9.16 Creating a Decision Tree: Empty Screen

The area in the lower half of the screen, under the words Decision Tree, is blank

apart from a top-level tree node that is ju st a blank icon; this is to be expected,

because you haven’t entered anything yet. Now it’s time to start building up what

is effectively the same sort of convoluted IF/THEN statement you would code in

ABAP. For each step in the process, you create a TRUE/FALSE branch, represented

by green checkmarks and red Xs. First, right-click on the top-level blank node,

and follow the menu path Set Condition 폷 Direct Input 폷 Not Assigned 폷 Select

Context Parameter. Then, you’ll see a list of possible variables you can use as

input parameters (this list of variables is the list of customer requirements that are

being sent into the BRFplus function: de sired scariness, sanity, monster usage,

and so on). To start off, choose Rages Per Day as the input variable you want, and

the screen that asks you to input a logical condition appears (Figure 9.17).

375

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!