cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting multiple rows of an alv

Former Member
0 Kudos

Hi All,

I have a requirement where in i have to select multiple rows of an alv and when i click a button i should get the data of all the selected rows, i am able to select only one row by default , how to select multiple rows or records,i am new to this Web dynpro alv , can aynbody please help me on this.

Thanks,

Praveen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi, praveen kumar.

About how to make "Multiple-select" of ALV available, you can take a reference of the following coding. Just one example:


****ALV Config****
  DATA:
      lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
      l_value TYPE REF TO cl_salv_wd_config_table,
      lr_table_settings TYPE REF TO if_salv_wd_table_settings.

   lr_salv_wd_table = wd_this->wd_cpifc_alv_child( ).  "Your statically declared ALV component usage
   l_value = lr_salv_wd_table->get_model( ).
* tabel setting
  lr_table_settings ?= l_value .
  lr_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-MULTI ).

About how to get your selected records of ALV, you can make use of the context node bound to your ALV component. For example,


****get selected elements****
lt_elems = lo_node->GET_SELECTED_ELEMENTS(
      INCLUDING_LEAD_SELECTION = abap_true ).

These are just examples. For detail, you can search them.

Thanks.Best wishes.

Answers (0)