cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete multiple rows in a table of web dynpro for abap?

Former Member
0 Kudos

hi,

Experts ,

I want to delete the selected multiple records from a table from that i have inserted a check box ui element in a first column of a table what ever checkbox ix checked i want to delete those selected records from table .

please suggest me on

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

prasenjit_sharma
Active Contributor
0 Kudos

Hi Shabeer,

Do you have delete button in your layout? If you want to deleter multiple rows based on the checkbox selection then you need to have a delete button.

But if you want the rows to be deleted as soon as you select the check box, in that case you would be able to delete multiple rows at a time, because as soon as you select one record its deleted. And to achieve this you need to code at the onToggle event of the check box.

To achieve multiple row deletion, you need to add a button in your layout and at the onAction event of the button you need to code as Lekha suggested.

Regards

Prasenjit

Former Member
0 Kudos

Hi,

If you have DELETE button, in that action you write this code -


DATA lr_node type ref to if_wd_context_node.

lt_set  = lr_node->get_elements( ).
loop at lt_set into ls_set.
ls_set->get_staitc_attributes
importing
static_attirbutes = ls_row.
if ls_row-check = 'X'.
lr_node->remove_element( ).
endif.
endloop.

Check the methods and thier types.

Regards,

Lekha.