Skip to content

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 - Comparing Calculation Expressions 

log_exp - Comparing Arithmetic Expressions

It is possible to compare an arithmetic expression to a single operand with a numeric data type or to another arithmetic expression.

Arithmetic expressions are possible for

and conditions mapped to these, that is

The calculation type of all arithmetic expressions in a logical expression is determined by all single operands of the entire logical expression as well as by any operators **, using the usual rules. The result of the arithmetic expressions involved exists in the calculation type. This calculation type is also the comparison type used for the comparison. If necessary, single operands are converted to the comparison type before the comparison starts.

If multiple logical expressions are linked using Boolean operators, then the calculation type and the comparison type are determined separately for each logical expression.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • If a conversion error occurs in an arithmetic expression in a logical expression, the corresponding exception can be handled (unlike in direct comparisons of data objects.

  • To compare an arithmetic expression to a single non-numeric operand, you may precede the operand with the "+" sign to turn it into an arithmetic expression.