Application Development 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: 

Manual Sorting not working in ALV GRID Output

0 Kudos

Dear All ,

I have a custom report where multiple char fields are there in ALV Grid output . Problem is when user try to select 2 or more fields together and sort it in the ALV output the sorting with those 3 fields together is not happening . When we select only 1 field then sorting is fine .
User doesn't want sorting to be done on specified fields so I can't code it in my report . Is there any way to in GRID ALV to make sure that sort happens manually in output for multiple CHAR type fields .

Thanking in Advance .

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

Not sure to understand, but could you first perfom the Consistency Check for your ALV Grid and correct any reported problem. (Check also for fields with conversion-exit, if this information is in the field catalog)

Explain to the user that the order of the fields is important.

Sandra_Rossi
Active Contributor
0 Kudos

I never saw such an issue in ALV.

If you first select several columns, and secondly press the sort button, all lines are sorted based on all selected columns.

You should add screenshots to make it clear for us exactly what you do.

Concerning my test:

SALV_DEMO_TABLE_SIMPLE

  1. Click on currency column first
  2. then Ctrl+click on plane type column
  3. then click on sort button
  4. it works well:

0 Kudos

We are trying to sort these 3 fields phase / system code / work center and you can see they are not sorted in any order . If I select only one and try , it works but when as a whole it doesn't.
Is there any way to make sur to as a whole it works , user can select any other columns also so I can't pass it in the alv before hand.

0 Kudos

You have sorted the rows in descending order. They are correctly sorted.

In my example, I sorted them in ascending order.

0 Kudos

ALV sorts by the leftmost column first, and continues with the next sort columns from left to right.