Created by Jerry Wang, last modified on Jul 11, 2014
For convenient purpose, I call the part of a given rule which contains all kinds of condition evaluation such as IF <variable> = 'XXX' combined with OR, AND etc as "condition part".
The common usage case in condition part is the evaluation on the content of given variables, see above example.
IS_ELEMENT_EXCLUDED & IS_ELEMENT_INCLUDED
these two functions are very ituitive, just pass in the element ID, it will return true if the element is currently excluded ( included ) in the document.
IS_PRECONDITION_VALID
See example above:
It means if rule ZCR_RULE_TEST is executed, then ZCR_FOOTER must be included as optional, or else as mandatory.
I assign this rule to element ZCR_NAME.
The precondition rule ZCR_RULE_TEST looks like below:
Based on these two rules we could have the following assumptions:
1. If ZFIRST = X, then ZCR_NAME will be mandatory, and ZCR_FOOTER will be optional.
2. If ZFIRST <> X, then ZCR_NAME will be recommended, and ZCR_FOOTER will still be optional.
Test in UI, working as expected:
When will the precondition not valid?
Have a look at the method of class /IPRO/CL_RULE_ENGINE below:
it just check whether the column RESULT for rule ZCR_RULE_TEST has value X or not.
TODO: Jerry willl have further investigation on how is this RESULT column filled.
IS_VALUE_IN_TABLE
First parameter: technical name of table variable name
Second parameter: technical name of table column
Third parameter: value which you would like to evaluate