SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Program Flow Logic → Expressions and Functions for Conditions → log_exp - Logical Expressions → log_exp - Boolean Operators and Parentheses →log_exp - ( )
Syntax
... ( log_exp ) ...
Effect
A full logical expression log_exp can be placed in parentheses. In the case of log_exp, this can be a join between multiple expressions using AND, OR, or EQUIV or a logical expression negated using NOT. A logical expression in parentheses is itself a logical expression.
Note
The smallest unit of a logical expression that can be placed in parentheses is a relational expression.
Example
A join of the logical expressions
NOT log_exp1 OR log_exp2 AND NOT log_exp3 AND log_exp4 EQUIV log_exp5
can be parenthesized explicitly as follows to stress the implicit parentheses:
Changing the parentheses explicitly changes the meaning of the expression. For example, if explicit parentheses are set as follows in the above expression:
( NOT log_exp1 OR log_exp2 ) AND
NOT ( log_exp3 AND log_exp4 EQUIV log_exp5 )
produces the following the result after implicit parentheses are set:
( ( ( NOT log_exp1 ) OR log_exp2 ) AND
( NOT ( ( log_exp3 AND log_exp4 ) EQUIV log_exp5 ) ) )