on 02-18-2010 10:00 AM
Dear all, Thank you for looking into this issue. We have a complex WD ABAP application with many views, embedded views, etc. In most of the views embedded in the main view we're calling in the wddoinit the context method enable_context_change_log to enable logging of the context changes (to determine if the user made any changes) like this: WDDONIT lr_context = wd_context->get_context( ). lr_context->enable_context_change_log Since this is such a complex application we need to react at any user action so in the method wddobeforeaction we're trying to see if there were changes and we want to set the dirty flag of the portal integration (so that when the user moves from the app in the portal, he still has a chance to save) like this: WDDOBEFOREACTION lr_context = wd_context->get_context( ). lt_changes = lr_context->get_context_change_log( ). if lt_changes is not initial ... etc. When making a change in the UI element attached to the context and trying to move to a different view or to exit the app, the lt_changes is always initial in the case of this one view. If we check in debug the class behind the lr_context, we see that the attribute is_context_change_enabled is set to 'X'. So apparently there are no changes - but the context does contain the new value of the text field. -
Thank you in advance, Ioan Radulescu, Sr. SAP HR Consultant @ Gavdi DE
apologies...my reply was repeated due to some issues
Edited by: Radhika Vadher on Feb 18, 2010 4:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
......
Edited by: Radhika Vadher on Feb 18, 2010 4:05 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.....
Edited by: Radhika Vadher on Feb 18, 2010 4:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please follow this approach,
1. Place the following code in the WDDOINIT method of the Component Controller
" this you have already done
* enable context change log
data: context type ref to if_wd_context.
context = wd_context->get_context( ).
context->enable_context_change_log( ).
2. Create a new method 'GET_CHANGE_LOG' in the Component Controller's Methods Tab
" Create a Returning Parameter 'CHANGES' type WDR_CONTEXT_CHANGE_LIST
method get_change_log .
data: context type ref to if_wd_context.
context = wd_context->get_context( ).
changes = context->get_context_change_log( ).
endmethod.
3. Call the above method in WDDOBEFOREACTION as follows
DATA: l_ref_componentcontroller TYPE REF TO ig_componentcontroller .
DATA: l_changes TYPE wdr_context_change_list.
l_ref_componentcontroller = wd_this->get_componentcontroller_ctr( ).
l_changes = l_ref_componentcontroller->get_change_log( ).
" l_changes will contain all the details of the changes made.
Hope this solves your issue.
Best Regards,
Radhika Vadher.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika, Thanks for the quick reply. You're telling me to create a method in the component controller. Wouldn't it check only the component controller context? As I said the application has many views and each has an own context - mostly mapped to the component controller context - which has also own local fields. I am not sure that I would be able to read the local changes, if the method is in the component controller. I will try this as you said but feel free to answer my concerns. Kind regards, Ioan.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.