cancel
Showing results for 
Search instead for 
Did you mean: 

Context Changed Values

vinodkumar_thangavel
Participant
0 Kudos

Hi Friends,

I have a scenario in which one of the UI input element is Text field and when ever only the user changes that it should update i tried with the below code but i am not getting the Context that is getting modified , please guide me is there any steps left.

The below code is triggered in WDDOINIT


DATA:lo_context TYPE REF TO if_wd_context,

        lt_list    TYPE        wdr_context_change_list.

   lo_context = wd_context->get_context( ).

   CALL METHOD lo_context->enable_context_change_log.


The below code is triggered in WDDOMODIFYVIEW


DATA:lo_context TYPE REF TO if_wd_context,

        lt_list    TYPE        wdr_context_change_list.

   lo_context = wd_context->get_context( ).

   CALL METHOD lo_context->get_context_change_log

*    EXPORTING

*      and_reset   = ABAP_TRUE

     RECEIVING

       change_list = lt_list.


finally LT_LIST remains empty which is the issue.


Regards,

Vinodkumar.

Accepted Solutions (1)

Accepted Solutions (1)

nishantbansal91
Active Contributor
0 Kudos

HI Vinod,

Can you please elaborate the requirement.

Thanks
Nishant

vinodkumar_thangavel
Participant
0 Kudos

Hi Nishant,

My requirement is when ever the user changes the value and if he tries to save the values then i need only the nodes that are changed rather than getting all the unchanged nodes.

For Ex. if there are two nodes Node1 and Node2 and if the user is changing any attributes in Node1 and while saving i need to know that Node1 is modified and Node2 remains unchanged.

Regards,

Vinodkumar.

ramakrishnappa
Active Contributor
0 Kudos

Hi Vinodkumar,

I think you are reading changes of context in method wddomodifyview( ) before any changes on screen or the node values are reset.

I suggest, please move the code which is written for reading context changes to event handler method of SAVE button.

Before reading nodes, place the method get_context_change_log( ) and collect the changes into an internal table. Now, you can only read the nodes which are captured in the changes.

Regards,

Rama

Answers (0)