‎2007 May 26 12:09 PM
Hi everyone,
My output for a report is similar as follows:-
F1 F2 F3 F4 F5
255 us 2345 weerr a
255 us 3455 dasrr a
255 us 5574 rrrerr a
255 us 4145 rewre a
What is the statement that exactly removes the redundant data ?
Thanks and Regards
Srikanth.M
‎2007 May 26 12:19 PM
use
sort itab by f1 f2.
delete adjacent duplicates from itab comparing f1.
or delete adjacent duplicates from itab comparing f1 f2.
regards
shiba dutta
‎2007 May 26 12:20 PM
sort ITAB.
DELETE ADJACENT DUPLICATES FROM <ITAB>.
Regards,
Amit
Reward all helpful replies.
‎2007 May 26 3:36 PM
hi Srikanth,
SORT gt_itab BY field1 field2 field5 .
DELETE ADJACENT DUPLICATES FROM gt_itab
COMPARING field1 field2 field5 .Regards,
Santosh
‎2007 May 26 3:42 PM
Hi Srikanth,
DELETE ADJACENT DUPLICATES will help to you to remove redundant(duplicate) entries from an internal table. SORT the internal table with the fields which you want to delete redundat entries.
SORT ITAB BY F1 F2 F5.
DELETE ADJACENT DUPLICATES FROM ITAB
COMPARING F1 F2 F5.
Thanks,
Vinay
‎2007 May 26 5:08 PM
It depends on what do you mean by redundant. If you are saying it is redundant even if all other columns except column F1 have different values, then you can use the DELETE ADJACENT DUPLICATES FROM itab command.
But before you do that, please check if that is what you want because, what if you actually need all of them since other values are different, what if you want the second one, not the first one. These are the questions you have to ask before deleting the entries just based on a common value of one field.