Conditional operator

The following operator is available: if - then - else

Condition check with optional branch (else)

XML tag:

if - then [- else]

Operands:

exactly one logical value

Synopsis:

<if>
<Logical value>
</if>
<then>
<Value>
</then>
<else>
<Value>
</else>

Operands:

BOOLEAN

Result:

Logical value - Value [- Value]

Result type:

BOOLEAN - Operand data type [- Operand data type]

Calculation (PPM3/PPM4)

Result

Value of second operand if the first operand returns TRUE. Value of the 3rd operand if the 1st operand returns FALSE.
NULL if 1st operand is FALSE and 3rd operand is not defined.

Error

If first operand is not of the BOOLEAN data type

Example:

<if>
<exists>
<filteredattribute name="AT_OS" nodetype="OT_FUNC"
objectname="SAP.WAUS filter="LATEST"/>
</exists>
<then>
<filteredattribute name="AT_CT" nodetype="OT_FUNC"
filter="EARLY"/>
</then>
<else>
<filteredattribute name="AT_KT" nodetype="OT_FUNC"
filter="LATEST"/>
</else>
</if>

If the condition is met (i. e. the AT_OS attribute is specified for at least one function with the internal name SAP.WAUS) the value of the AT_CT attribute is passed on. If the condition is not met, the value of the AT_KT attribute is used in the subsequent calculation.