on 03-13-2007 6:19 AM
hi all ,
Is anyone there to give me an idea , how to delete the item in the table , by selecting the row. , for the what i have to do , is there any documentation to follow , guide me itys really urgent.
Hai Madhu,
It is pretty simple.
First u define a button. and in onAction Event of the button write the following code.
process is as follows:
1)get the node
2)get the element
3)using the method remove_element() ,remove the element.
<u><b>The Sample Code is as follows</b></u>
DATA:
node_flighttab TYPE REF TO if_wd_context_node,
elem_flighttab TYPE REF TO if_wd_context_element.
node_flighttab = wd_context->get_child_node( 'FLIGHTTAB' ).
get element via lead selection
elem_flighttab = node_flighttab->get_element( ).
node_flighttab->remove_element( element = elem_flighttab ).
Follow the above code ,it will definately help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu.
If you have selected a row in a table you can get the selected element via the
lead selection of the bound context node.
just get the corresponding context node and the selected element, then call
remove element on this node:
DATA:
lr_node TYPE REF TO if_wd_context_node,
lr_selected_element TYPE REF TO if_wd_context_element.
lr_node = wd_context->get_child_node( NAME_OF_NODE ).
lr_selected_element = lr_node->get_element( ).
lr_node->remove_element( selected_element ).
The get_element() returns the actual selected (lead selection) element.
Hope this helps.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.