2007 Dec 03 1:27 PM
Hi all,
I have an internal table having 150 fields.Now there are duplicate records in my internal table having the same values for all the 150 fields ( Exactly the same value in the entire row ) ..My requirement is to delete all those duplicate records and my internal table must have only one unique row of record..
Suppose i have four rows having the same value for all the fields.I want to have only one row after my manipulation of the internal table..
Please suggest how i can achieve the same..
Itz urgent and all uselful answers will be rewarded..
Thanks & Regards,
Arun Chaudhary
2007 Dec 03 1:29 PM
2007 Dec 03 1:29 PM
Hi,
Do like this
DELETE ADJUCENT DUPLICATES FROM ITAB COMPARING <KEY FIEDLS>.
Regards,
Satish
2007 Dec 03 1:29 PM
Hi Arun,
1. Simple
2. Sort the inernal table.
3. then write code
DELETE ADJACENT DUPLICATES FROM ITAB.
(since you want all fields to be compred for duplicate checking,
the above statment is enough)
(The system will compare all fields for duplicate checking)
4. If u want only some fields for duplicate checking, then u can
add the suffix
..... COMPARING FIELD1 FIELD2 FIELD5.
Regards,
Amit Mittal.
2007 Dec 03 1:29 PM
2007 Dec 03 1:30 PM
Hi,
Check the following code:
Sort itab.
delete adjacent duplicates from itab.
Hope this helps,
Erwan
2007 Dec 03 1:33 PM
Use the code:
Delete adjacent duplicates from itab comparing all fields.