= , Bit Expression
Syntax
result = bit_exp.
What does it do?
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 :
A variable with the type x or
xstring .
An inline declaration DATA(var) . The
data type of the declared variable var is xstring .
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 ).
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved