ABAP Keyword Documentation → ABAP - Reference → Program Flow → Expressions and Functions for Logical Expressions → log_exp - Logical Expressions
log_exp - Boolean Operators and Brackets
The Boolean operators
link logical expression, while the operator
negates a logical expression.
Logical expressions can be explicitly bracketed with
( )
.
When combining multiple Boolean operators, the system implicitly brackets all logical expressions that are not closed with explicit brackets according to the following hierarchy, which emphasizes the strong binding of Boolean operators:
NOT
are combined with the adjacent logical expression to the right to a logical expression.
AND
, are combined to one logical expression.
OR
, are combined to one logical expression.
EQUIV
, are combined to one logical expression.
The logical expressions of a bracket level are processed from the left to the right. If the value of a logical expression determines the total value of the bracket level, then the remaining logical expressions are not evaluated. The dynamic parts of the expressions that are not evaluated, such as field symbols or reference variables, are not checked for validity in this case.
Other versions: 7.31 | 7.40 | 7.54
Note
When you link multiple logical expressions, the explicit and implicit brackets always result in exactly one logical expression that is either true or false.
- If in the involved logical expressions functional methods are used as operands, they are executed directly before the respective subexpression is evaluated. Any functional methods in a subexpression that does not need to be evaluated to get the result are not executed.