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

log_exp - Logical Expressions  Syntax Diagram

Short Reference

Syntax

...   rel_exp
    | [NOT] log_exp [AND|OR|EQUIV log_exp] ...

Effect

A logical expression formulates a condition for operands. The result of a logical expression log_exp is a logical value and can therefore be true or false.

A logical expression is either a single relational expression rel_exp or an expression constructed from the boolean operators NOT, AND, OR, EQUIV and one or more logical expressions. Parentheses are possible here. An atomic part of a composite logical expression is always one of the following relational expressions:

Logical expressions can be used as follows:

Notes

Example

Logical expression created from a predicate expression, a comparison expression, and a predicate function using the boolean operator AND, in a control statement.

IF p1 IS SUPPLIED    AND
   p1 <= upper_limit AND
   matches( val = p2 regex = regular_expression ).
  ...
ENDIF.





Continue
rel_exp - Relational Expressions
rel_exp - Predicates
log_exp - Boolean Operators and Parentheses