Get Example source ABAP code based on a different SAP table
Comparing Internal Tables This example demonstrates how internal tables are compared.
ABAP_SOURCE_CODE DEMO CL_DEMO_INT_TBLS_COMPARE
ABAP_DESCRIPTION Two standard tables, itab> and jtab>, are created. itab > is filled with three lines and assigned to jtab>. An additional line is added to itab> and the first relational expression returns the result that itab> is greater than jtab >. After the same line was added to itab>, the second relational expression shows that both tables are the same. Another line is appended to itab> and the third relational expression indicates the result that jtab> is less than or equal to itab>. Next, a further line is added to jtab>, the content of which is different from the final line of itab>. The next relational expression returns the result that itab> is not equal to jtab >. The first table field whose content is different for itab> and jtab> is col1> in the last line of the table, namely 30 for itab> and 50 for jtab>. In the last relational expression, itab> is therefore less than jtab>.