SAP DELETE DUP LINES ABEXA

Get Example source ABAP code based on a different SAP table
  


ARTIClE

Internal Tables - Deleting Duplicate Rows
This example demonstrates how adjacent duplicate rows in internal tables can be deleted.

ABAP_SOURCE_CODE
ABAP_EXEC

ABAP_DESCRIPTION
In the main method, a standard table is created and filled. The first DELETE statement deletes the second row because it has the same content as the first row. The second DELETE statement deletes the second row from the remaining table because the content of the field col1 is the same as in the first row. The third DELETE statement deletes the third and fourth rows of the remaining table as the content of the key field col2 is the same as in the second row. Although the content of the key fields for the first and fifth rows is the same, the fifth row is not deleted because it is not adjacent to the first row.