on 07-14-2013 4:40 PM
Hi All,
How to delete multiple selected rows based on checkbox from a normal table in webdynpro abap.
please suggest suitable solution.
Thanks
Srinivas
Mark the Thread as answered or assumed answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srinivas,
Check the property of checkbox-- On toggle i guess.. place the code in that method.
So that when ever you select the multiple records and select the check box.. the below code is triggered..
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srnivas Rao,
Logic in Delete
DATA lo_nd_node_mara TYPE REF TO if_wd_context_node.
DATA lo_el_node_mara TYPE REF TO if_wd_context_element.
DATA ls_node_mara TYPE wd_this->element_node_mara.
DATA lt_node_mara TYPE wd_this->elements_node_mara.
* navigate from <CONTEXT> to <NODE_MARA> via lead selection
lo_nd_node_mara = wd_context->get_child_node( name = wd_this->wdctx_node_mara ).
* get element via lead selection
lo_el_node_mara = lo_nd_node_mara->get_element( ).
lo_el_node_mara->get_static_attributes(
IMPORTING
static_attributes = ls_node_mara ).
lo_nd_node_mara->get_static_attributes_table( IMPORTING table = lt_node_mara ).
DELETE lt_node_mara where matnr = ls_node_mara-matnr.
CALL METHOD lo_nd_node_mara->bind_table
EXPORTING
new_items = lt_node_mara
* set_initial_elements = ABAP_TRUE
* index =
.
In your scenario , read all the selected records into one Internal table and Delete the same from Actual Internal Table values and Bind the same again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Iterate through the bound context, check the checkbox value, delete the line.
That should do it.
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.