06-21-2007 12:21 PM
CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->get_selected_rows
IMPORTING
ET_ROW_NO = <internal table of type LVC_T_ROID > .
When I get the selected rows, afterwards I need to read the itab value according to rowid and then send this value to a screen.
How can I process the first selected row of the selected ones.
Thanks.
Deniz.
06-21-2007 12:26 PM
I think I have to loop through the returned ids itab but
Loop into what???
endloop.
I did not understand that.
And what is the index like keyword of the what???-index or ?
I did not expressed it so well, sorry...
Thanks.
Deniz.
06-21-2007 12:26 PM
I think I have to loop through the returned ids itab but
Loop into what???
endloop.
I did not understand that.
And what is the index like keyword of the what???-index or ?
I did not expressed it so well, sorry...
Thanks.
Deniz.
06-21-2007 12:27 PM
Hi...
The following code may help u...
data:it_selected_rows TYPE lvc_t_row, "To get Selected rows from ALV
DATA:lit_cell TYPE lvc_t_cell, "Selected cell
To get Selected rows from ALV
CALL METHOD g_ref_alv_grid_summary->get_selected_rows
IMPORTING
et_index_rows = it_selected_rows.
IF it_selected_rows[] IS INITIAL.
****Get the row in focus
CALL METHOD g_ref_alv_grid_summary->get_selected_cells
IMPORTING
et_cell = lit_cell.
IF NOT lit_cell[] IS INITIAL.
READ TABLE lit_cell INTO lwa_cell INDEX 1.
wa_row = lwa_cell-row_id.
APPEND wa_row TO it_selected_rows.
ENDIF.
ENDIF.
Regards,
Pavani
06-21-2007 12:28 PM
hi,
CALL METHOD ref_alv->get_selected_rows
IMPORTING
et_index_rows = it_row
it will give you the rows which are selected to it_row table.
check the theards
https://forums.sdn.sap.com/click.jspa?searchID=3330780&messageID=2919805
https://forums.sdn.sap.com/click.jspa?searchID=3330780&messageID=117833
Regards