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 Internal Table

Former Member
0 Likes
716

Hi Experts,

While downloading into local file i want to sort my internal table, first two columns in ascending order, 3rd and 4th columns in decending and 5th and 6th columns in ascending order.

is it possible let me know

from

madhavi

7 REPLIES 7
Read only

Former Member
0 Likes
684

before down loading u can sort internal table.

sort itab by ascending order, 3rd and 4th

sort itab decending and 5th and 6th .

Message was edited by:

Karthikeyan Pandurangan

Read only

0 Likes
684

hai Karthikeyan Pandurangan

i know that Karthikeyan, but the thing is that i want to sort the internal table either ascending or decending, but not both, thats the problem

Read only

0 Likes
684

Try with like this:

SORT ITAB BY FIELD1 ASCENDING
FIELD2 ASCENDING 
FIELD3 DESCENDING
FIELD4 DESCENDING
FIELD5 ASCENDING
FIELD6 ASCENDING

Regards,

Naimesh Patel

Read only

0 Likes
684

Its not working Karthikeyan Pandurangan

Read only

0 Likes
684

Hi, Madhavi t .

I think you should try Naimesh Patel's method.

Regards,

feng.

Read only

former_member386202
Active Contributor
0 Likes
684

Hi,

Yes,

try like thisd

sort it_tab by matnr werks descending

Regards,

Prashant

Read only

Former Member
0 Likes
684

u can sort independently all field finiallu move one internal table.