Register Login

How to eliminate duplicate entries in internal tables

Updated May 18, 2018

To delete all duplicate entries from a sorted internal table (e.g. just after SORT), you can use the DELETE ADJACENT DUPLICATES FROM itab statement. You can use the COMPARING adition to limit the fields that are used to test for duplicate entries e.g.SORT i_tab by matnr werks logort.DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr werks.All duplicates withe same combination of matnr and werks will be deleted.


×