04-11-2006 7:18 AM
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
04-11-2006 7:29 AM
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
04-11-2006 7:34 AM
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.