SAP LOGEXP RULES EXPR BIT
Get Example source ABAP code based on a different SAP table
ARTICLE
Bit expressions can be used as operands in comparison expressions with
A
Each bit expression of a comparison expression is calculated based on the length of its longest operand, with shorter operands padded on the right with hexadecimal 0. All operands of the entire comparison expression are respected. The result of the bit expressions involved is contained within this length and, if necessary, a single operand is converted to this length before the comparison, again by filling with hexadecimal 0 on the right. The comparison is then performed using the rule for a byte-like
Note
A bit expression cannot be specified as the operand of a
Example
This example demonstrates the different ways lengths are handled in comparisons between byte fields and bit expressions. The bit expression in the first comparison is evaluated with length 4 and produces the value hexadecimal 1100. The single operand on the right is converted to the value hexadecimal 1100 by filling with hexadecimal 00 and the equality comparison is true. In the second comparison, on the other hand, the operand on the left is converted to the type
WRITE / 'yes'.
ENDIF.
IF x`1100` <(><<)>> xstring`11`.
WRITE / 'no'.
ENDIF.