Professional Documents
Culture Documents
Complex Conditions in SAP Smartform With And-Or
Complex Conditions in SAP Smartform With And-Or
Complex Conditions in SAP Smartform With And-Or
Every element in SAP Smartforms has a Conditions tab where Smartform developers can define conditions to run the
Smartform element. Output Conditions is one of the most used conditions. This screen is just like the Node Conditions
screen of Smartform Alternative element.
Smartform developer can define a condition which will print a text on SAP invoice. Or define a condition in Conditions tab for
a Window element which will be printed on the last page. Some conditions require controlling of a variable against more than
one value. Some require validation of more than one variable and these conditions are combined with each other
using AND (default) or OR.
Smartform Alternative element can provide a decision tree for the developer. If Node conditions are met then TRUE path will
be executed. Otherwise, if node conditions return FALSE then the FALSE path will be executed by Smartform function
module.
Sometimes in SAP Smartform output documents, I was required to use AND, OR together. This is a little bit tricky since it is
difficult to build a safe WHERE condition for that element.
The trick is using "(" and ")" within the Conditions lines.
Below developers can see a live example of complex conditions for a Smartform element.