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 Internal Tables

It is possible to compare internal tables to other internal tables if their line types are comparable. Internal tables are compared based on the following hierarchy:

  • The internal table which has more lines than the other internal table is the larger one.
  • Internal tables with the same number of lines are compared line by line. If an internal tables contains nested internal tables, then these are compared recursively. Two internal tables are identical if the contents of each single line match. If two internal tables are not identical, the first non-matching pair of lines determines the result of the comparison.
  • Other versions: 7.31 | 7.40 | 7.54


    Note

    If you specify an internal table with a header as the operand of a logical expression, the system addresses the header and not the table body as is the case for almost all operand positions. To address the table body of a table with a header, you must append [] to the name.

    Continue

    Comparing Internal Tables