Get Example source ABAP code based on a different SAP table
ABAP_ITAB - Insert Lines This example demonstrates how lines are inserted into internal tables.
ABAP_SOURCE_CODE DEMO CL_DEMO_INT_TBLS_INSERT
ABAP_DESCRIPTION This example is consists of four parts where lines are inserted in different ways. First, two internal tables, itab> and jtab>, are filled with squared and cubic numbers. These are also used to reset the tables above to their initial values, using an assignment, between the individual parts of the example.
In the first part, a new line is inserted in front of the second line and a line with initial values is inserted in front of the first line.
Next, using a LOOP>, a new line is inserted before each existing line.
In the third part, the whole of the table itab1> is inserted in front of the first line of jtab1>.
In the final part, the whole of the table itab2> is inserted into the sorted table jtab2>.