ABAP Keyword Documentation →  ABAP − Reference →  Program Flow Logic →  Expressions and Functions for Conditions →  log_exp - Logical Expressions → 

log_exp - Boolean Operators and Parentheses

The Boolean operators

join logical expressions; the operator

negates a logical expression.

Logical expressions can be parenthesized explicitly using

.

When combining multiple Boolean operators, the system implicitly parenthesizes all logical expressions that are not closed by explicit parentheses according to the following hierarchy (operator order, precedence). This expresses the strength of the connection between Boolean operators:

  1. All Boolean operators NOT are combined with the adjacent logical expression to the right to a logical expression.

  2. All logical expressions joined using AND are combined as one logical expression.

  3. All logical expressions joined using OR are combined as one logical expression.

  4. All logical expressions joined using EQUIV are combined as one logical expression.

The logical expressions of a parenthesis level are processed from the left to the right. If the value of a logical expression determines the total value of the parenthesis level, 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.

Notes




Continue
log_exp - NOT
log_exp - AND
log_exp - OR
log_exp - EQUIV
log_exp - ( )