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

Sort itab by another itab?

Former Member
0 Likes
462

Hi,

i have 2 itabs: itab0 with matnr and lgpbe. itab1 with matnr matkl brgew.

it sort itab0 by lgpbe.

Is it possiple to sort itab1 like itab0 without having lgpbe and without changing

the entries of itab1?

i look for any like "sort itab1 by itab0-matnr"???

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
443

I'm not aware of any way like you suggest, but you could loop through itab0 and read itab1 using matnr and put the results into a new itab. You will have to add extra coding if there are duplicates.

Rob

I'm not aware of any way like you suggest, but you could loop through itab0 and read itab1 using matnr and put the results into a new itab. You will have to add extra coding if there are duplicates.

Rob

2 REPLIES 2
Read only

Former Member
0 Likes
444

I'm not aware of any way like you suggest, but you could loop through itab0 and read itab1 using matnr and put the results into a new itab. You will have to add extra coding if there are duplicates.

Rob

Read only

Former Member
0 Likes
443

HI,

you cannot use sort statement like this..

how ever.. just do this way.

loop at itab0.

loop at itab1 where matnr = itab0=matnr.

itab2 = itab1.

append itab2.

endloop.

endloop.

at end of this itab2 will have ur sorted data.