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

get_selected_rows with sorting

Former Member
0 Likes
672

Hello,

How can I read a line of a table of an ALV (which has sorting)?

DATA: lt_rowid TYPE LVC_T_ROID,

          ls_rowid TYPE lvc_s_roid.

,

CALL METHOD g_grid_0100->get_selected_rows

     IMPORTING

*      et_index_rows =

       et_row_no     = lt_rowid.


LOOP AT lt_rowid INTO ls_rowid.

     READ TABLE gt_table TO ls_table INDEX ls_rowid-row_id.

ENDLOOP.



The output table, for instance, has been sorted downwards. That means line 3rd of 100 has become the 98th.


How can I control this (and subtotal lines, etc.)?


Thanks a lot,


Eloi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

Hi, you don't need to take care about sorting,

get_selected_rows works fine automatically

2 REPLIES 2
Read only

Former Member
0 Likes
523

Hi, you don't need to take care about sorting,

get_selected_rows works fine automatically

Read only

Former Member
0 Likes
522

the global table is sorted automatically. For subtotals you should search for other posts, you will surely find many.