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

sorting an internal table

Former Member
0 Likes
677

I have used this statement to sort the internal table . I dont think its working properly. I appreciate if anyone can check this statement once.

SORT itab ascending BY date matnr descending qty.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
646

The order ascending / descending should be specified for each field, By default it will be ascending.

SORT itab BY date ascending matnr descending qty.

Regards,

Ravi

Note - Please mark all the helpful answers

5 REPLIES 5
Read only

Former Member
0 Likes
646

Hi Deepthi,

Keep cursor on <b>Key SORT</b> in Se38.

Do F1 on.. Read details from SAP documentation.

Will learn more about the Options and limitations.

Reward points if this Helps.

Manish

Message was edited by:

Manish Kumar

Read only

Former Member
0 Likes
647

The order ascending / descending should be specified for each field, By default it will be ascending.

SORT itab BY date ascending matnr descending qty.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
646

Hi,

What do you want to do exactly ? Which field ascending, which one descending?

Try : SORT itab BY date matnr descending qty ascending ....

Read only

0 Likes
646

hi try,

SORT ITAB DESCENDING BY QTY ASCENDING DATE MATNR.

OR

SORT ITAB BY DATE MATNR ASCENDING QTY DESCENDING.

regards

cnu

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
646

Try.....

SORT itab BY date matnr ascending 
                     qty descending .

Regards,

Rich Heilman