on 05-02-2012 11:06 AM
1.First we select the delete icon it will navigate to popup window 2. in that we enter yes button means deleted line item is not refelected in the table control but it is deleted in database table and message will be populating in initial screen .i need to refresh in table control thats my issue..
Give some sample code for my issue...
Hi Prabhu,
I think you are using popup for confirmation. Just map the node to the context of Popup View which is bound to Table. Then it will be easy to delete. just follow the below steps .
on action YES,
Data: lo_element type ref to if_wd_context_element,
lo_nd_table type ref to if_wd_context_node.
<<<<<<< Get node reference >>>>>>>>
lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
method 1. lo_nd_table->remove_element( lo_element ).
method 2.
data: lv_index type i.
lv_index = lo_element->get_index( ).
lo_nd_table->remove_element( index = lv_index ).
Hope this will resolve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
1. Make the delete button row as link_to_action UI element and give it the appropriate icon.
2. Now on the action of the link_to_action method.
do the following
data:
elem type if_wd_context_element,
node type if_wd_context_node.
elem = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
node = wd_context->get_child_node( 'node_name' ).
node->remove_element( elem ).
The above code will remove the exact row that you pressed to delete.
3. To remove it from database.
get the key from the elem.
elem->get_attribute( exporting name = 'name' importing value = key ).
now delete from database using the delete query by passing the key....
Regards,
Fareez
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.