Hi Experts,
I got a problem with ALV like this:
I have an ALV grid display. Now, I have to select one row from this grid and
display it through subscreen. My problem is how to read the selected row:
Is there any means:
I am new to ABAP so please tell me simple interactive way, but not in OOPS.
Thanks in advance,
Try this
CALL METHOD grid1->get_current_cell IMPORTING es_row_id = ws_row_id es_col_id = ws_col_id es_row_no = lvc_s_roid. READ TABLE <<ITAB>> into <<WORKAREA>> INDEX ws_row_id-index.
Thanks
Pavan
I am assuming you are using REUSE_ALV_GRID_DISPLAY. Set a field for selection in the internal table (CBOX for example). In your user_command form you can just do loop at itab where cbox = 'X'.
do your stuff
endloop.
If you need more details let me know.
Albert
Hi,
You should use the method GET_SELECTED_ROWS. This method belongs to object ALV it means you declared (for instance): o_alv type ref to cl_gui_alv_grid
the mathod is called as follow: call method o_alv->GET_SELECTED_ROWS. Use the button "Pretty Printer" then the system put all parameters required to use method.
Regards
Adam
Add a comment