Ansicht
Dokumentation

ABENLOGEXP_RULES_EXPR_BIT - LOGEXP RULES EXPR BIT

ABENLOGEXP_RULES_EXPR_BIT - LOGEXP RULES EXPR BIT

General Material Data   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Comparison Type of Bit Expressions

Bit expressions can be used as operands of comparison expressions with the following:

A bit expression can be compared with a single operand of a byte-like data type or with a different bit expression.

Each bit expression of a comparison expression is calculated based on the length of the single longest operand, for which shorter operands are padded on the right with hexadecimal 0. All operands of the entire comparison expression are considered. The result of the involved bit expressions is contained in this length and, if necessary, a single operand is padded with hexadecimal 0 on the right before comparison. The comparison is then performed according to the comparison rule for a byte-like comparison type.

Note

A bit expression cannot be specified as the operand of a predicate expression.

Example

This example shows 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 lengthened 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 xstring and the operand on the right is not lengthened, which is why the inequality comparison is true.

IF x`FFFF` BIT-AND x`11` = xstring`11`.
  ...
ENDIF.

IF x`1100` <> xstring`11`.
  ...
ENDIF.






General Material Data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 2629 Date: 20240508 Time: 151647     sap01-206 ( 52 ms )