Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Program Flow Logic →  Expressions and Functions for Conditions →  log_exp - Logical Expressions →  rel_exp - Comparison Expressions →  rel_exp - Comparison Rules 

rel_exp - Comparing Internal Tables

It is possible to compare internal tables with other internal tables if their row types are can be compared. Internal tables are compared based on the following hierarchy:

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


    Note

    If an internal table with a header line is specified as an operand of an assignment, the header line is addressed in nearly all operand positions and not the table body. To address the table body of a table with a header, [] must be appended to the name.

    Continue

    Comparing Internal Tables - Example