Show TOC

Background documentationExpression Editor Operators Locate this document in the navigation structure

 

You can use the following operators in the Expression Editor to build expressions:

Operator

Signature

Family

Return Type

Returned Value

Example

Scope

(x)

Scope

Any

Calculated value of the x subexpression before continuing to execute the expression

2*(3+2) returns 10

Dynamic Scope

#x#

Scope

Any

Calculated value of the x. If x includes a variable, parse the variable as another expression. If no variables are included, it works like a static scope. You can insert dynamic scopes into search scopes and strings.

2*#3+2# returns 10

Variable Search Scope

y{x}

Scope

Any

The part of y to which x maps.

Transaction.XMLDoc{//some/node} returns the first node in Transaction.XMLDoc that resolves the XPath //some/node

Negation

-x

Unary

Numerical

Negated value of the input parameter x

-2 returns -2

Logical Negation

!x

Unary

Boolean

Logical negated value of the input parameter x

!2 returns false

Exponent

x^y

Exponential

Numerical

Value of x raised to the y power

2^3 returns 8

Less Than

x<y

Relational

Boolean

True, if the value of x is less than the value of y; otherwise, it returns false

2<3 returns true

Greater Than

x>y

Relational

Boolean

True, if the value of x is greater than the value of y; otherwise, it returns false

2>3 returns false

Less Than or Equal To

x<=y

Relational

Boolean

True, if the value of x is less than or equal to the value of y; otherwise, it returns false

2<=3 returns true

Greater Than or Equal To

x>=y

Relational

Boolean

True, if the value of x is greater than or equal to the value of y; otherwise, it returns false

2>=3 returns false

Equal To

x==y

Equality

Boolean

True, if the value of x is equal to the value of y; otherwise, it returns false

2==3 returns false

Not Equal To

x!=y

Equality

Boolean

True, if the value of x is not equal to the value of y; otherwise, it returns false

2!=3 returns true

Division

x/y

Multiplicative

Numerical

The value of x divided by the value of y

4/2 returns 2

Multiplication

x*y

Multiplicative

Numerical

The value of x multiplied by the value of y

2*3 returns 6

Modulation

x%y

Multiplicative

Numerical

The value of x modulo the value of y

2%3 returns 2

Addition

x+y

Additive

Numerical

The value of x added to the value of y

2+3 returns 5

Subtraction

x-y

Additive

Numerical

The value of x subtracted by the value of y

2-3 returns -1

Concatenation

x&y

Concatenation

String

The string value of x appended with the string value of y

2&3 returns 23

Logical Conjunction

x and y

x && y

Logical

Boolean

True, if the value of x and the value of y are both true; otherwise, it returns false

2 and 3 returns true

Logical Disjunction

x or y

x || y

Logical

Boolean

True, if the value of x or the value of y is true; otherwise, it returns false

2 or 3 returns true

The order of operator precedence is as follows:

  1. Preprocessor Expression

  2. Scope

  3. Unary

  4. Exponential

  5. Multiplicative

  6. Additive

  7. Concatenation

  8. Relational

  9. Logical

  10. Equality

    Note Note

    If you are migrating legacy transactions, the old order of operator precedence migrates to the above order on import. For more information, see SAP Note 1684810Information published on SAP site.

    End of the note.