Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

REDUNDANT DATA

Former Member
0 Likes
724

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

5 REPLIES 5
Read only

Former Member
0 Likes
663

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

Read only

amit_khare
Active Contributor
0 Likes
663

sort ITAB.

DELETE ADJACENT DUPLICATES FROM <ITAB>.

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
663

hi Srikanth,

SORT gt_itab BY field1 field2 field5 .
DELETE ADJACENT DUPLICATES FROM gt_itab
       COMPARING field1 field2 field5 .

Regards,

Santosh

Read only

Former Member
0 Likes
663

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

Read only

Former Member
0 Likes
663

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.