ABAP Keyword Documentation →  ABAP − Reference →  Program Flow Logic →  Expressions and Functions for Conditions →  log_exp - Logical Expressions →  rel_exp - Relational Expressions →  rel_exp - Comparison Rules →  rel_exp - Comparing Elementary Data Types → 

rel_exp - Comparisons of Calculation Expressions

Any calculation expression can be specified as an operand of a comparison expression.

The table below lists all combinations that are possible for calculation expressions in comparison expressions:

One Page Relational Operator Other Page
Single operand with numeric data type or arithmetical expression =, EQ, <>, NE, <, LT, >, GT, <=, LE, >=, GE Arithmetic expression
Single operand with any elementary data type or string expression =, EQ, <>, NE, <, LT, >, GT, <=, LE, >=, GE, CO, CN, CA, NA, CS, NS, CP, NP String expression
Single operand with byte-like data type or bit expression =, EQ, <>, NE, <, LT, >, GT, <=, LE, >=, GE, BYTE-CO, BYTE-CN, BYTE-CA, BYTE-NA, BYTE-CS, BYTE-NS, O, Z, M Bit expression

The comparison type is determined differently depending on the type of calculation expression.

In the case of comparison expressions using the relational operators BETWEEN and IN that are switched internally to joins of comparisons with the binary operators above, the rules of the individual comparisons apply.

Notes




Continue
rel_exp - Comparing Arithmetic Expressions
rel_exp - Comparing String Expressions
rel_exp - Comparing Bit Expressions