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

To create such a signature, navigate to the Signature tab in the function screen

shown in Figure 9.10. Go to the Context area (which means input data) at the top

of the screen, and click the Add New Data Object button. You are then asked if

you want to add one at a time, but because you have five input fields for the various

customer requirements (scariness and so forth) you’ll want to add them all at once.

For each input parameter you can specify a built-in type, like a number, but you

can also have an input parameter referr ing to an existing DDIC data element if

you want. Once you have added your data, the parameters are displayed in alphabetical

order (which is a pity, because it seems like logical order would be better;

however, it does make searching easier).

Once you’ve finished with the context (input data), it’s time to turn to the Result

Data Object. As can be seen in Figure 9.10, this object lives just below the Context

area. This is the object that the BRFp lus function will return to the calling

ABAP program to tell it what the outcome of the rule evaluation has been.

Figure 9.10 Full Signature of a Function

Click the action button to the right of Data Object, which is Ingredients in our

example. Now click Create and then specify what form the result should take (the

type of ingredients, in th is example) in exactly the same way that you specified

the data type of the input parameters.

369

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

Saved successfully!

Ooh no, something went wrong!