Skip to Content
0
Former Member
Feb 20, 2014 at 05:00 PM

get_selected_rows with sorting

65 Views

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