cancel
Showing results for 
Search instead for 
Did you mean: 

Where to enable Context for Change Log and How to Look for changes

Former Member
0 Kudos

Hi Experts,

I need to track the change log in dynpro for the input fields.

Can you please tell me the loction to enable the change log for a context and after the changes made,

How those changes can be read (i.e to get the change log list).

Thanks

Deep.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Follow these steps:

1. Place the following code in the WDDOINIT method of the Component Controller

* 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. When you want to track the changes call his this method 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.

For more details refer component DEMO_CONTEXT_CHANGES.

Regards,

Radhika.

Answers (0)