‎2006 Nov 22 7:03 PM
Hi ,
Can anyone please tell me the syntax to for which we can check the values of an internal table for duplicates and avoid it.
Thanks
‎2006 Nov 22 7:09 PM
Hi,
To delete duplicate records from internal table you can check this code:
sort itab by a b c.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING a b c.
or
sort itab.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING all fields.
‎2006 Nov 22 7:09 PM
Hi,
To delete duplicate records from internal table you can check this code:
sort itab by a b c.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING a b c.
or
sort itab.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING all fields.
‎2006 Nov 22 7:10 PM
Hi,
First sort the internal table on the field on which you want to check for the duplicates.
then:
Delete adjacent duplicates from ITAB.
Please close the thread if it is solved.
Regards,
Vinod.
‎2006 Nov 22 7:10 PM
Hi Bharat,
If just want to delete all duplicates, you can use the below lgic.
SORT ITAB BY FIELD1 FIELD 2.
DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.
Make sure that you sort you internal table in such way all dusplicate records should come adjacent.
Thanks
Ramakrishna