Skip to Content
author's profile photo Former Member
Former Member

Selecting multiple rows of an alv

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 12, 2010 at 05:08 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.