‎2007 Jan 09 9:26 AM
Hi everybody,
I am Srikanth, and i have generated report on customer order details. In that report thier is lot of redundant data.So please explain me how to delete that redundant data with coding.
Thanks and Regards
M.Srikanth
‎2007 Jan 09 9:27 AM
if u want to delete duplicate fields from internal tables , then
delete adjacent duplicates from itab.
‎2007 Jan 09 9:30 AM
1) for deleting duplicates -
use delete adjacent duplicates from itab.
2) if u want to delete redundant data based on some condition then u can use delete with where clause on ur internal table and then print this formatted Internal table.
Amit
‎2007 Jan 09 9:28 AM
Hi,
Once you framed the output internal table,
delete adjacent duplicates from itab.
Here itab is the internal table name.
‎2007 Jan 09 9:31 AM
‎2007 Jan 09 9:33 AM
hi,
Once you've collected all the data into the internal table you sort the internal table on the key field and delete the duplicate adjacent rows so that you would end up deleting all the reduntant data.
let's suppose the internal table is itab.
after having possessed data into itab.
sort itab.
delete adjacent duplicates from itab.
‎2007 Jan 09 9:34 AM
Before that use Sort Statement
SORT <itab> [ASCENDING|DESCENDING] [AS TEXT] [STABLE]
... BY <fi> [ASCENDING|DESCENDING] [AS TEXT]...
Sorts the internal table <itab>. If you omit the BY addition, the table is sorted by its key. You can define a different sort key by using the BY addition. The other additions specify whether you want to sort in ascending or descending order, and whether strings should be sorted alphabetically.
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab> [COMPARING... ].
Deletes adjacent duplicate entries, either by comparing the key fields or the comparison fields specified explicitly in the COMPARING addition.
‎2007 Jan 09 9:36 AM
if u want to delete duplicate fields from internal tables , then
delete adjacent duplicates from itab.