ABAP Keyword Documentation →  ABAP - Reference →  Program Flow →  Expressions and Functions for Logical Expressions →  log_exp - Logical Expressions →  log_exp - Comparisons →  log_exp Comparison Rules →  log_exp - Comparing Elementary Data Types → 

log_exp - Comparison Type

When operands with elementary data types are compared, the comparison uses a comparison type defined by the operands in question. The comparison type be one of the predefined ABAP types. When incompatible operands are compared, the operands that do not have the comparison type are converted to this type.

Numeric Comparison Type

If the comparison type is one of the numeric data types, the numeric values are compared.

Notes

Character-Like Comparison Type

If the comparison type is one of the character-like data types, the content is compared from left to right. Based on the internal binary representation in the code page used, the first differing character from the left determines which operand is greater.

Notes

Byte-Like Comparison Type

If the comparison type is one of the byte-like data types, the content is compared from left to right. Based on the byte values, the first differing byte from the left determines which operand is greater.