on 06-19-2008 9:40 PM
Hi all,
I have a context node with a few attributes. The view has a save button, which saves data to database tables. I need to call the save function only if user has changed any data and not otherwise.
How should I go about for it??
Is using the context change log the only way??? Is there any overhead in using the context change log?? Will it hit the performance of the application??
Regards,
Reema.
I just remember that there should be an attribut, is_changed in if_wd_context...
Hope that helps a bit....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have already tried that...
* Check if changes are made to the node and sub node
data: lo_node type ref to if_wd_context_node,
lo_ele TYPE REF TO if_wd_context_element,
lv_ele_changed TYPE abap_bool,
lv_node_changed TYPE abap_bool.
* navigate from <CONTEXT> to <NODE1> via lead selection
lo_node = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
lo_ele = lo_node->get_element( ).
CALL METHOD lo_ele->is_changed_by_client
receiving
flag = lv_ele_changed.
IF wd_this->g_user_type = c_merchant.
* navigate from <NODE1> to <NODE1_1> via lead selection
lo_node = lo_node->get_child_node( name = wd_this->wdctx_NODE1_1 ).
CALL METHOD lo_node->is_changed_by_client
receiving
flag = lv_node_changed.
ENDIF.
IF lv_user_changed = abap_true or lv_dept_changed = abap_true.
ENDIF.
But this returns an initial flag irrespective of whether data has change or not...
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.