Logical operators

The following operators are available: eq, eqset, lt, gt, gteq, lteq, ne, exists, filled, in, and, or, xor, not, containstext.

Equality (value)

XML tag:

eq

Operands:

at least two values

Synopsis:

<eq>
<Value 1>
<Value 2>
...
<Value n>
</eq>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Description:

All specified values equal returns TRUE.

Calculation (PPM3)

Result

TRUE if operands 1 to n have the same data type and value, otherwise FALSE.

Error

If one operand is NULL.

Calculation (PPM4)

Result

TRUE if operands 1 to n have the same data type and value, otherwise FALSE. NULL if an operand is NULL.

Error

None

Example:

<eq>
<timespan type="NORMAL">
<max>
<attribute name="AT_CUSTDATE_WISH" nodetype="PROCESS"
onerror="EXIT_NO_WARNING"/>
</max>
<min>
<attribute name="AT_END_TIME" nodetype="OT_FUNC"
objectname="SAP.WAUS" onerror="EXIT_NO_WARNING"/>
</min>
</timespan>
<constant>
<dataitem value="0">
<datatype name="TIMESPAN"/>
</dataitem>
</constant>
</eq>

Equality (value)

XML tag:

ne

Operands:

at least two values

Synopsis:

<ne>
<Value 1>
<Value 2>
...
<Value n>
</ne>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Description:

Inequality of all specified values returns TRUE

Calculation (PPM4)

Result

TRUE if all operands 1 to n are not equal (e.g. Operand 1 != Operand 2), otherwise FALSE. NULL if an operand is NULL.

Error

None

Example:

<ne>
<timespan type="NORMAL">
<max>
<attribute name="AT_CUSTDATE_WISH"
nodetype="PROCESS"
onerror="EXIT_NO_WARNING"/>
</max>
<min>
<attribute name="AT_END_TIME"
nodetype="OT_FUNC"
objectname="SAP.WAUS"
onerror="EXIT_NO_WARNING"/>
</min>
</timespan>
<constant>
<dataitem value="0">
<datatype name="TIMESPAN"/>
</dataitem>
</constant>
</ne>

Equality (set of values)

XML tag:

eqset

Operands:

at least two sets of values

Synopsis:

<eqset>
<Set of values 1>
<Set of values 2>
...
<Set of values n>
</eqset>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Description:

Equality of all specified sets of values returns TRUE. Operands 2 to n are compared one by one with operand 1.

Calculation (PPM3)

Result

TRUE if the sets to be compared are of equal size and all their values are identical, otherwise FALSE.

Error

If one operand is NULL.

Calculation (PPM4)

Result

TRUE if the sets to be compared are of equal size and all their objects are identical, otherwise FALSE. NULL if an operand is NULL.

Error

None

Example:

-

"Less than" comparison

XML tag:

lt

Operands:

exactly two values

Synopsis:

<lt>
<Value 1>
<Value 2>
</lt>

Operands:

Uniform numerical data type

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM3)

Result

TRUE if operand 1 and operand 2 are of the same data type and operand 1 is less than operand 2, otherwise FALSE.

Error

If at least one operand equals NULL or at least one is of an invalid data type

Calculation (PPM4)

Result

TRUE if operand 1 and operand 2 are of the same data type and operand 1 is less than operand 2, otherwise FALSE. NULL if at least one operand equals NULL.

Error

Only if data type is invalid

Example:

-

"Greater than" comparison

XML tag:

gt

Operands:

exactly two values

Synopsis:

<gt>
<Value 1>
<Value 2>
</gt>

Operands:

Uniform numerical data type

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM3)

Result

Returns TRUE if value 1 is greater than value 2 and the operands are of a uniform data type, otherwise FALSE.

Error

If at least one operand equals NULL or at least one operator is of an invalid data type.

Calculation (PPM4)

Result

Returns TRUE if value 1 is greater than value 2 and the operands are of a uniform data type, otherwise FALSE. NULL if at least one operand equals NULL.

Error

Only if data type is invalid

Example:

-

"Greater than or equal" comparison

XML tag:

gteq

Operands:

exactly two values

Synopsis:

<gteq>
<Value 1>
<Value 2>
</gteq>

Operands:

Uniform numerical data type

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM4)

Result

Returns TRUE if value 1 is greater than or equal to value 2 and the operands are of a uniform data type, otherwise FALSE. NULL if at least one operand equals NULL.

Error

Only if data type is invalid

Example:

-

"Less than or equal" comparison

XML tag:

lteq

Operands:

exactly two values

Synopsis:

<glteq>
<Value 1>
<Value 2>
</lteq>

Operands:

Uniform numerical data type

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM4)

Result

Returns TRUE if value 1 is less than or equal to value 2 and the operands are of a uniform data type, otherwise FALSE. NULL if at least one operand equals NULL.

Error

Only if data type is invalid

Example:

-

Existence check

XML tag:

exists

Operands:

at least one attribute name (attribute, filteredattribute)

Synopsis:

<exists>
<Attribute 1>
<Attribute 2>
...
<Attribute n>
</exists>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Description:

Returns TRUE if the specified attributes exist, regardless of whether any values are assigned to the attributes.

Calculation (PPM3/PPM4)

Result

TRUE if all specified attributes exist, otherwise FALSE

Error

None

Example:

<exists>
<attribute name="AT_ORDER_VOL" nodetype="OT_FUNC"/>
</exists>

Content check

XML tag:

filled

Operands:

at least one value or a set of values

Synopsis:

<filled>
<Value 1>
<Value 2>
...
<Value n>
</filled>

or

<filled>
<Set of values 1>
<Set of values 2>
...
<Set of values n>
</filled>

or

<filled>

<Value 1>
<Value 2>
...
<Value n>
<Set of values 1>
<Set of values 2>
...
<Set of values n>
</filled>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM3/PPM4)

Result

TRUE if all relevant values or sets of values are specified, otherwise FALSE

Error

None

Example:

-

Content check of sets

XML tag:

in

Operands:

1. operand: Value or set of values
Operand 2: Set of values

Synopsis:

<in>
<Value 1>
<Set of values 2>
</in>

or

<in>
<Set of values 1>
<Set of values 2>
</in>

Operands:

All data types

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM4 only)

Result

TRUE if the value or set of values of the first operand is contained in the set of values specified by the second operand.
NULL if one operand returns NULL.

Error

Only if data types are incompatible

Example:

<calcattr name="AT_KI_ABL" type="PROCESS">
<calculation>
<in>
<constant>
<dataitem>
HR-ABL
<datatype name="TEXT">Text</datatype>
</dataitem>
</constant>
<attribute name="AT_HRMODUL" nodetype="OT_FUNC" />
</in>
</calculation>
</calcattr>

The in operator returns TRUE if there is an AT_HRMODUL attribute with the value HR-ABL for at least one function in the EPC.

Logical AND

XML tag:

and

Operands:

at least two logical values

Synopsis:

<and>
<Logical value 1>
<Logical value 2>
...
<Logical value n>
</and>

Operands:

BOOLEAN

Result:

Logical value

Result type:

BOOLEAN

Description:

Returns TRUE, if all logical values are TRUE. The first time an operand returns FALSE, evaluation of the operand list is canceled and FALSE is returned.

Calculation (PPM3)

Result

TRUE if all operands return TRUE, otherwise FALSE

Error

If one operand returns NULL or at least one operand is of an invalid data type

Calculation (PPM4)

Result

TRUE if all operands return TRUE.
FALSE if one operand returns FALSE and all preceding operands return TRUE.
NULL if one operand returns NULL and all preceding operands return TRUE.

Error

If at least one operand is of an invalid data type (not BOOLEAN)

Example:

-

Logical OR

XML tag:

or

Operands:

at least two logical values

Synopsis:

<or>
<Logical value 1>
<Logical value 2>
...
<Logical value n>
</or>

Operands:

BOOLEAN

Result:

Logical value

Result type:

BOOLEAN

Description:

Returns TRUE if at least one logical value is TRUE. The first time an operand returns TRUE, evaluation of the operand list is canceled and TRUE is returned.

Calculation (PPM3)

Result

TRUE if one operand returns TRUE and all preceding operands return NULL, otherwise FALSE.

Error

If one operand returns NULL and all other operands return FALSE, or if at least one operand is of an invalid data type

Calculation (PPM4)

Result

TRUE if one operand returns TRUE and all preceding ones do not return NULL. FALSE if all operands return FALSE. NULL if one operand returns NULL and all preceding operands return FALSE.

Error

If at least one operand is of an invalid data type (not BOOLEAN)

Example:

-

Logical EXCLUSIVE OR

XML tag:

xor

Operands:

at least two logical values

Synopsis:

<xor>
<Logical value 1>
<Logical value 2>
...
<Logical value n>
</xor>

Operands:

BOOLEAN

Result:

Logical value

Result type:

BOOLEAN

Description:

Returns TRUE if exactly one logical value is TRUE.

Calculation (PPM3)

Result

TRUE if exactly one operand returns TRUE, otherwise FALSE

Error

If one operand returns NULL or at least one operand is of an invalid data type

Calculation (PPM4)

Result

TRUE if exactly one operand returns TRUE. FALSE if no operand or more than one operand returns TRUE. NULL if at least one operand returns NULL

Error

If at least one operand is of an invalid data type (not BOOLEAN)

Example:

-

Logical NOT

XML tag:

not

Operands:

exactly one logical value

Synopsis:

<not>
<Logical value>
</not>

Operands:

BOOLEAN

Result:

Logical value

Result type:

BOOLEAN

Description:

Reverses the specified logical value.

Calculation (PPM3)

Result

TRUE if operand returns FALSE, otherwise FALSE

Error

If operand returns NULL or at least one operand is of an invalid data type

Calculation (PPM4)

Result

TRUE if operand returns FALSE. FALSE if operand returns TRUE. NULL if the operand returns NULL

Error

If operand is of an invalid data type (not BOOLEAN)

Example:

<not>
<exists>
<attribute name="AT_ORDER_VOL" nodetype="OT_FUNC"/>
</exists>
</not>

Checking for text within text

XML tag:

containstext

Operands:

Exactly two values of type TEXT

Synopsis:

<containstext>
<value 1>
<value 2>
</containstext>

Operands:

TEXT

Result:

Logical value

Result type:

BOOLEAN

Calculation (PPM4 only)

Result

TRUE if the text returned by the second operand is a sub-character string of the value returned by the first operand, otherwise FALSE. NULL if at least one operand returns NULL

Error

If at least one operand is of an invalid data type (not TEXT)

Example:

<containstext>
<filteredattribute name="AT_ABCDEF"
nodetype="OT_FUNC" objectname="this"
onerror="EXIT_NO_WARNING"/>
<constant>
<dataitem>
abc
<datatype name="TEXT">Text</datatype>
</dataitem>
</constant>
</containstext>

Operator returns TRUE if the string abc is contained in the value of the AT_ABCDEF attribute.