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

internal tables

Former Member
0 Likes
686

i hv an internal table with several columns....

in that internal table there is an field MELNR (migo number).

i want that if the migo number is repeated in that internal table, then the first record should exist only.remaining records with same MIGO number should be deleted.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

hi,

do it in two step,

step 1 SORT itab BY  MELNR

step 2 DELETE ADJACENT DUPLICATES FROM itab comparing MELNR

Regards,

anirban

5 REPLIES 5
Read only

Former Member
0 Likes
659

hi,

do it in two step,

step 1 SORT itab BY  MELNR

step 2 DELETE ADJACENT DUPLICATES FROM itab comparing MELNR

Regards,

anirban

Read only

Former Member
0 Likes
658

Hi,

Sort the internal table and use DELETE ADJECENT DUPLICATES statement.

Best regards,

raam

Read only

Former Member
0 Likes
658

For that you have to give your query as groupby, try this way and execute.

Read only

Former Member
0 Likes
658

Hi Mathew ,

Write the statement :

SORT ITAB BY MELNR.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MELNR.

This will solve the issue.

Regards,

Swapna.

Read only

Former Member
0 Likes
658

Use

DELETE ADJACENT DUPLICATE from itab comparing MELNR .

~hitesh

Try to close the thread once your queries are resolved