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 - Calculation Length
A bit expression has been assigned a calculation length in which the operation is executed.
The calculation length is the length of the longest bit expression operand involved. Unlike in the calculation type of an arithmetic expression, the type of the result is not included.
Before the entire expression is evaluated, all operands in question are converted to the length of the
longest operand based on the rules for the source field
xstring. This means that shorter operands are padded with hexadecimal 0 on the right.
The result in the calculation length is handled as follows:
- If used in the statement COMPUTE, the final result
of the entire expression is converted to the length of the data object
resultbased on the rules for source field type
- If used in relational expressions, the result is used as an operand in the length resulting from the calculation.
- If used as an actual parameter for
input parameters of
methods, the final result of
the entire expression is converted to the length of the formal parameter based on the rules for source
xstring. If the formal parameter is typed generically, it is set to the type
xin the length determined by the operands.