Expression Editor Operators
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 |
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 |
Variable Search Scope | y{x} | Scope | Any | The part of y to which x maps. | Transaction.XMLDoc{//some/node} returns the first node in |
Negation | -x | Unary | Numerical | Negated value of the input parameter x | -2 returns - |
Logical Negation | !x | Unary | Boolean | Logical negated value of the input parameter x | !2 returns |
Exponent | x^y | Exponential | Numerical | Value of x raised to the y power | 2^3 returns |
Less Than | x<y | Relational | Boolean |
| 2<3 returns t |
Greater Than | x>y | Relational | Boolean |
| 2>3 returns |
Less Than or Equal To | x<=y | Relational | Boolean |
| 2<=3 returns |
Greater Than or Equal To | x>=y | Relational | Boolean |
| 2>=3 returns |
Equal To | x==y | Equality | Boolean |
| 2==3 returns |
Not Equal To | x!=y | Equality | Boolean |
| 2!=3 returns |
Division | x/y | Multiplicative | Numerical | The value of x divided by the value of y | 4/2 returns |
Multiplication | x*y | Multiplicative | Numerical | The value of x multiplied by the value of y | 2*3 returns |
Modulation | x%y | Multiplicative | Numerical | The value of x modulo the value of y | 2%3 returns |
Addition | x+y | Additive | Numerical | The value of x added to the value of y | 2+3 returns |
Subtraction | x-y | Additive | Numerical | The value of x subtracted by the value of y | 2-3 returns |
Concatenation | x&y | Concatenation | String | The string value of x appended with the string value of y | 2&3 returns |
Logical Conjunction | x and y x && y | Logical | Boolean |
| 2 and 3 returns |
Logical Disjunction | x or y x || y | Logical | Boolean |
| 2 or 3 returns |
Square Root | x^(0.5) | Exponential | Numerical | Square root of the input parameter | 16^(0.5) returns 4 |
The order of operator precedence is as follows:
Preprocessor Expression
Scope
Unary
Exponential
Multiplicative
Additive
Concatenation
Relational
Logical
Equality
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 1684810
.