on 04-29-2011 3:04 PM
Dear Experts,
I have a 'Back' Button in which I need to refresh a populated node.
Could anyone provide me the code to refresh the already populated node ??
Regards,
Parama Laha.
Hi ,
You can also set the node as empty.
pass the attributes as null as set_static_attributes = ' ' . for a node or if you have a table bind the lt_table where lt_table is empty.
This might help you out.
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there.
I know this thread is quite old, but should it help...
To me, best practice is simply to set the internal table to empty, and then use the append as a table method to bind the internal table to the node.
Code would be like this:
DATA lo_nd_node TYPE REF TO if_wd_context_node.
DATA ls_node TYPE wd_this->Element_node.
DATA lt_node TYPE wd_this->Elements_node.
* navigate from <CONTEXT> to <NODE> via lead selection
lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
clear ls_node.
append ls_node to lt_node.
lo_nd_reference->bind_table( new_items = lt_reference set_initial_elements = abap_true ).
End of the game.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can write the code to invalidate the node in your back method ie then when your back event is fired ie when you back button is pressed put the code to invalidate the node in it.
regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you mean by refresh ?
You can invalidate the node if it is binded by Supply function then supply function would be called.
data:
lo_nd_sflight type ref to if_wd_context_node,
lt_sflight type wd_this->elements_sflight.
lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
lo_nd_sflight->invalidate( ).
"Or you can bind a new table with data (original date )
lo_nd_sflight->bind_table( new_items = lt_sflight ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Like i already said , if it is not the supply function then you can bind the node with old data.
data:
lo_nd_sflight type ref to if_wd_context_node,
lt_sflight type wd_this->elements_sflight.
lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
lo_nd_sflight->bind_table( new_items = lt_sflight ).
In this case lt_sflight table should have the old data. You can save the original table in the controller attribute, when you press the back key, assign the reference of the controller attribute to lt_sflight.
lt_sflight = wd_this->gt_sflight.
and you the above code snippet . The key point is that you should supply the old data for the node.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.