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

Selective sorting

former_member189059
Active Contributor
0 Likes
357

hello experts,

i have an internal table with a field

LV_CMP_FLAG(2) type C

this can have one of 5 values viz: L, ML, MR, R or a blank value

i need to sort this table in such a way that displays the ML values first followed by MR, L and then R and the blank ones

if i use normal sort command i get L first, then ML, MR and R

also keep in mind the fact that i will be doing this for many tables so it should not be too processor intensive

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
340

have another dummy internal table field with single character length which maps to each of this values and have the values of that field as

A- ML

B-MR

C-L

D-R

E- Space.

Sort this table according to that field.

Regards,

Ravi

1 REPLY 1
Read only

Former Member
0 Likes
341

have another dummy internal table field with single character length which maps to each of this values and have the values of that field as

A- ML

B-MR

C-L

D-R

E- Space.

Sort this table according to that field.

Regards,

Ravi