SAP LOGEXP BRACKET



Get Example source ABAP code based on a different SAP table
  


• ( ) ABAP_LOGICAL_EXPR

ABAP_LOGEXP - ( )

ABAP_SYNTAX
ABAP_KEY ... ( log_exp ) ...

What does it do?
A complete logical expression log_exp can be placed in parentheses in order to define the priority of processing. log_exp can be a combination of multiple expressions using AND, OR, or EQUIV or a logical expression negated using NOT . A logical expression in parentheses is itself a logical expression.
BEGIN_SECTION SAP_INTERNAL_HINT
Undocumented feature: The space before the closing bracket can be omitted if the last operand is a text literal within quotes.
END_SECTION SAP_INTERNAL_HINT



Latest notes:

The smallest unit of a logical expression that can be placed in parentheses is a relational expression.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
A combination of the following 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: Parentheses around the expressions with NOT ( NOT log_exp1 ) OR
log_exp2 AND ( NOT log_exp3 ) AND log_exp4 EQUIV log_exp5
ABAP_EXAMPLE_END Parentheses around the expressions with AND ( NOT log_exp1 ) OR
( log_exp2 AND ( NOT log_exp3 ) AND log_exp4 ) EQUIV log_exp5 Parentheses around the expressions with OR ( ( NOT log_exp1 ) OR
( log_exp2 AND ( NOT log_exp3 ) AND log_exp4 ) ) EQUIV log_exp5 Parentheses around the expressions with EQUIV ( ( ( NOT log_exp1 ) OR
( log_exp2 AND ( NOT log_exp3 ) AND log_exp4 ) ) EQUIV log_exp5 )
Changing the parentheses explicitly changes the meaning of the expression. For example, if explicit parentheses are set as follows in the expression above
( NOT log_exp1 OR log_exp2 ) AND
NOT ( log_exp3 AND log_exp4 EQUIV log_exp5 )
the expression looks as follows after implicit parentheses are set:
( ( ( NOT log_exp1 ) OR log_exp2 ) AND
( NOT ( ( log_exp3 AND log_exp4 ) EQUIV log_exp5 ) ) )