‎2010 Mar 17 4:31 PM
Hi,
i am displaying the output in custom control using alv oops.
How can i select the multiple rows in output?
How can i get the selected multiple rows data.
Regards,
Suresh
‎2010 Mar 17 6:54 PM
If you're using CL_GUI_ALV_GRID class, see methods named like get_selected_* as in "get_selected_rows" creates a table containing the index of the rows the user selected. Then, you can loop at that row index table and read the corresponding row from the internal table behind the ALV, using the index value.
If you're asking about user's ability to select multiple rows, look at properties of the grid control, specifically SEL_MODE, value 'A' - multiple columns, multiple rows. By design, I believe that multiple row selection is always supported in CL_GUI_ALV_GRID (presented as a button at left in SEL_MODE= 'A', 'D'), but specifically coded for in NetWeaver SALV.
format for get_selected_rows:
call method <ref. var. to CL_GUI_ALV_GRID>->get _selected_rows
importing et_index_rows = <internal table of type LVC_T_ROW>.If in NetWeaver SALV, respond and I'll post details for that.