Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Program Flow →  Expressions and Functions for Logical Expressions 

log_exp - Logical Expressions

Short Reference

Other versions: 7.31 | 7.40 | 7.54


... { {operand1 {=|EQ|<>|NE|>|GT|<|LT|>=|GE|<=|LE 
                |O|Z|M} operand2 }
    | {operand  [NOT] BETWEEN operand1 AND operand2}
    | {<fs>     IS [NOT] ASSIGNED}
    | {ref      IS [NOT] BOUND}
    | {operand  IS [NOT] INITIAL}
    | {para     IS [NOT] REQUESTED}
    | {para     IS [NOT] SUPPLIED}
    | {[operand [NOT] IN] seltab} } ... .


A logical expression formulates a condition for operands. The operand position operand of most logical expressions can be general expression positions, which means that, depending on the expression, data objects, predefined functions, functional methods, and calculation expressions can be specified.

The result of a logical expression log_exp is a logical value and can therefore be true or false. Logical expressions can be used as follows:

  • A logical value can be depicted using a Boolean function in a character-like or byte-like data object.

Logical expressions can be formulated using

Logical expressions can be negated and joined using


  • If, in a logical expression, functional methods are specified as operands, they are executed from left to right and from inside to outside when the expression is evaluated. In the case of joined logical expressions, this is true for each individual subexpression and not for the overall expression.

  • Since ABAP does not recognize any Boolean data objects for the logical values true and false, the result of a logical expression cannot currently be directly assigned to a data object as is the case for calculation expressions. Instead, the return value of a Boolean function can be used.

  • The program DEMO_EXPRESSIONS also shows examples of the use of logical expressions, among other things.


log_exp - Comparisons

log_exp - Predicates

log_exp - Boolean Operators and Brackets