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

custom control multiple row selection

Former Member
0 Likes
549

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

1 REPLY 1
Read only

Former Member
0 Likes
392

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.