on 06-16-2011 7:50 AM
Hi all,
How do I delete selected elements in a node? Let say I want to delete element index 2. How do I do it? Thanks.
you can do this be calling node->get_element( index ) and then call node->remove_element( seleced_element ).
Code:
data: lo_el_selected_element type ref to if_wd_context_element.
lo_el_selected_element = node->get_element( 2 ).
node->remove_element ( lo_el_selected_element ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
Get the selected Element or selected Index.,
now read the internal table in node using get_static_attributes_table method.,
loop the internal table
count = count + 1.
if count = selected index.
esle.
append internal table to final internal table (itab-fin).
endif.
endloop.
now bind_table( itab_fin ). " now the selected element will not appear in the node.
you can also use remove_element method to remove selected elements
hope this helps u..
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
first get the required element into element variable..
lo_el_itab = lo_nd_itab->get_element( index = 2 ).
then remove that element from node.
Lo_nd_itab->remove_element( lo_el_itab ).
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 |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.