cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Selection of Table Rows

Former Member
0 Kudos

Hi Friends

I created a web dynpro application which displays a table with multiple records.

I added a button "REMOVE" to delete the selected rows from the table.

It is working good if I select single row, but if I want to delete more than one row I am not able to select the rows and how can I delete all the selected rows.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Change the selection property of node binded to table as 0..n.

This will allow you to select multiple rows.

To get multiple rows, use get_selected_elements method of if_wd_context_node.

Code for your reference :

DATA:  wd_node TYPE REF TO if_wd_context_node,
         wa_temp  TYPE REF TO if_wd_context_element,
         lt_temp  TYPE wdr_context_element_set.
  wd_node = wd_context->get_child_node( name = 'NODE' ).
 
  CALL METHOD wd_node->get_selected_elements
    RECEIVING
      set = lt_temp.
 
  LOOP AT lt_temp INTO wa_temp.
    wd_node->remove_element( EXPORTING element = wa_temp ).
  ENDLOOP.

Former Member
0 Kudos

Thanks Saurav

Answers (1)

Answers (1)

former_member645692
Participant
0 Kudos

Hi,

Change the SELECTION property of the node to 1..N.

You can select Multiplpe rows by Pressing Control key