ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Assignments →  = - Assignment Operator →  = - Assign Calculation Expressions → 

=, Bit Expression

Syntax

result = bit_exp.

Effect

If a bit expression bit_exp is specified on the right side of the assignment operator =, a byte chain with the calculation length is calculated and assigned to the left side result like a source field with the type xstring.

The following can be specified for result:

Example

Bit expressions as the right side of assignments. The expressions can also be used directly as input parameters of the output methods.

DATA hex1 TYPE xstring VALUE '0123456789ABCDEF'.
DATA hex2 TYPE xstring VALUE 'FEDCBA9876543210'.

DATA(result1)  = hex1 BIT-AND hex2.
DATA(result2)  = hex1 BIT-OR hex2.
cl_demo_output=>write(   result1 ).
cl_demo_output=>display( result2 ).