SAP BIT OPERATORS



Get Example source ABAP code based on a different SAP table
  


• BIT-NOT ABAP_BIT_OPERATOR
• BIT-AND ABAP_BIT_OPERATOR
• BIT-OR ABAP_BIT_OPERATOR
• BIT-XOR ABAP_BIT_OPERATOR

ABAP_BITEXP - Bit Operators
Bit operators work with the individual bits of the operands. The calculation length is determined by the operands involved. Combining two operands with BIT-AND, BIT-OR, and BIT-XOR produces a result of this length in which each bit is set according to the table from the bits of the corresponding positions in the operands. BIT-NOT changes the bits of the operands to its right as shown in the table. xy ABAP_KEY BIT-NOT x ABAP_KEY x BIT-AND y ABAP_KEY x BIT-XOR y ABAP_KEY x BIT-OR y 001000 011011 100011 110101
The order of the columns in the table reflects the priority of the bit operators. The operator BIT-NOT has the highest, and BIT-OR the lowest priority. Within one level of parentheses, the results of operators with higher priority are formed before the results with operators of a lower priority. For adjacent operators of the same priority, the evaluation is performed from left to right, except for the operator BIT-NOT, which is executed from right to left.

ABAP_EXAMPLE_VX5
Use of various bit operators.
ABEXA 00832
The displayed result is: 0001
0111
0110
ABAP_EXAMPLE_END