on 07-04-2011 5:46 PM
Hi there,
I need to delete the selected row from a table.
The code I've writte is:
lo_nd_po_items = wd_context->get_child_node( name = wd_this->wdctx_po_items ).
lo_nd_po_items->get_static_attributes_table( IMPORTING table = lt_po_items ).
lo_nd_po_items->get_static_attributes( IMPORTING static_attributes = ls_el_po_items ).
delete lt_po_items where ebelp = ls_el_po_items-ebelp.
lo_nd_po_items->bind_table( lt_po_items ).
which works okay but it resets the selection made by the user for the DropDowbByIndex UI Controls arranged on all of the Table rows. Apart from this the deletion works fine.
Any ideas as to why this is happening?
Thanks
method lo_nd_po_items->bind_table( lt_po_items ) will invalidate the node and creates new elements for the entries in lt_po_items. this is the reason for user selection getting reset.
for deleting the table rows, first get the selected element via lo_nd_po_items->get_element and then call lo_nd_po_items->remove_element
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its happening because, once you delete the element,again you are binding the values.So it will reset the values.
If you want to main same values in table.
delete the element from node by using below statement...
lo_nd_nodename->remove_element( ' = ls_el_po_items ).
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.