cancel
Showing results for 
Search instead for 
Did you mean: 

Context Change Log not working if I delete the Element from Context Node

Former Member
0 Kudos

Hi ,

Step1 :- I have enabled the context change log .

Step2 :- I am deleting the element from Context Node ..

(Node had only one element before deletion so now it does not have any element.)

Step3 :- Context Change log does not return any list for change log .

If someone can guide me here it would be great help to me.

Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

WD ocntext change log does not reflect the programmatic changes. WD context change log only log the changes which are manually done by user.

for ex: value entered in input field.

Deleting element from context node is programmtic change. it will not be reflected in WD context change log.

Try out with WD_CONTEXT_CHANGE_SERVICES

Thanks,

Rahul

Former Member
0 Kudos

Thanks a lot for quick response.

But can you please tell me how to use this WD_CONTEXT_CHANGE_SERVICES to get the

expected behaviour ?

regards,

Ravi

Former Member
0 Kudos

Hi,

You have to register your node for subscription.

CLASS = CL_WD_CONTEXT_SERVICES

data mo_context_services type ref to CL_WD_CONTEXT_SERVICES.

In this case you have to register your node to keep track of change log.

IF wd_this->mo_context_services IS NOT BOUND.

CREATE OBJECT wd_this->mo_context_services.

ENDIF.

DATA:

lt_subscription TYPE cl_wd_context_services=>subscription_list,

ls_subscription TYPE cl_wd_context_services=>subscription_element,

ls_subscription-controller = lo_ndi_header->get_controller( ).

ls_subscription-node_name = 'HEADER'.

APPEND ls_subscription TO lt_subscription.

wd_this->mo_context_services->subscribe_to_node_changes(

subscriptions = lt_subscription ).

wd_this->mo_context_services->activate_subscriptions( ).

use method GET_CHANGE_LIST( CL_WD_CONTEXT_SERVICES) method to get the change log from context services.

Check for the change kind = COLLECTION_CHANGED. it will show the change in the number of elements of node.

Thanks,

Rahul

Edited by: Rahul Yadav on May 28, 2009 1:22 PM

Former Member
0 Kudos

Thanks a lot Rahul ... Issue is resolved now

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please check the example -

DEMO_CONTEXT_CHANGES

Regards,

Lekha.