ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Character String and Byte String Processing → Expressions and Functions for Byte String Processing → bit_exp - Bit Expressions
bit_exp - ( )
Other versions: 7.31 | 7.40 | 7.54
Syntax
... ( bit_exp ) ...
Effect
A full bit expression bit_exp
can be placed in parentheses. A bit expression in parentheses can be used as the operand of another bit expression and is not calculated until used in this way.
Example
Parentheses in bit expressions
TYPES output TYPE TABLE OF xstring WITH EMPTY KEY.
DATA hex1 TYPE xstring VALUE '0011'.
DATA hex2 TYPE xstring VALUE '0101'.
DATA hex3 TYPE xstring VALUE '1100'.
cl_demo_output=>display( VALUE output(
( hex1 BIT-AND hex2 BIT-OR hex3 )
( ( hex1 BIT-AND hex2 ) BIT-OR hex3 )
( hex1 BIT-AND ( hex2 BIT-OR hex3 ) ) ) ).
The displayed result is:
1101
0001