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: 

Reading a ALV after sorting

Former Member
0 Kudos

Hi all,

I have a Alv grid display.After the ouput is shown

suppose i have it ascending or descending.Now i want to get the sorted alv into my internal table .Bcoz when i double click a particular row it goes to the next screen with the contents of that particular line.Does any one know how to do that here i am using OOPS Alv.

regards

Ahasan

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

Hi Mohammed,

itab will be updated automatically with sort info if you do any sort. and you can easily access the row which you have clicked using the row number(when you click you get the row number), using that you can directly point it to itab using index.

Regards

vijay

Former Member
0 Kudos

Hi,

You cannot directly get the SORTED table, but you get the SORT info and do the SORTING yourself, so that the internal table will be the same as that of the display.

The method get_frontend_layout will give you the layout info and the method <b> GET_SORT_CRITERIA </b>, will give you the sort criteria applied by the user.

The table parameter ET_SORT will have the name of the fields sorted. Then what you can do is

SORT itab BY (FIELDNAME). FIELDNAME is from the ET_SORT table.

Regards,

Ravi

Note : Please mark the helpful answers.