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 statement ...

Former Member
0 Likes
542

Hello all ,

I am getting out put as in CS11 (BOM level by level ) with out the sort statement .

But when i sort the internal table with the sort statement based on plant (werks ) . The out put is not in the old fashion , now the out put is of random, level numbers not comming in order , this is the case even when there is only one plant (werks ) .

Can any one help on this .

How the sort statement works here if we sort the final internal table with werks .

Thanks and Regards ,

Prem.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
511

Hi Prem

sort itab by werks means it will not take the other fields for sorting it will sort the records based on only werks.

fld1 fld2.

100 10

101 20

90 30

if u sort on first field

90 30

100 10

101 20

Message was edited by:

Kiran Machavarapu

3 REPLIES 3
Read only

Former Member
0 Likes
511

Hi,

If u want to sort the internal table based on th efield 'WERKS'. then, use the syntax

SORT itab by werks.

Read only

0 Likes
511

i have used the statement .

SORT itab by werks.

with out this sort statement the out put is as in CS11 .

But after the sort statement the out put is not level by level .

Thanks and regards,

Prem.

Read only

Former Member
0 Likes
512

Hi Prem

sort itab by werks means it will not take the other fields for sorting it will sort the records based on only werks.

fld1 fld2.

100 10

101 20

90 30

if u sort on first field

90 30

100 10

101 20

Message was edited by:

Kiran Machavarapu