cancel
Showing results for 
Search instead for 
Did you mean: 

Change Log for Table Object records

former_member82844
Participant
0 Kudos

I am trying to access the change change log for a a table context but it is empty. I have copied code from a demo program and it works but my program does not.

- I have a table control with multiple fields open for input.

- I have a validate button . When the validate button is pressed I execute the following but the change log table is empty even though I made changes.

method onactionvalidate_recs .

  • check whether context has changed

data: aux_changes type wdr_context_change,

context type ref to if_wd_context.

context = wd_comp_controller->get_context( ).

changes = context->get_context_change_log( ).

loop at changes into aux_changes.

......

endloop.

endmethod.

I am assuming the changes have already got posted or applied, so how do I stop it or have access before it happens. I need to know all the fields that have changed and validate and process the information.

Glenn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Glenn,

there is an pre-req part to the context logger.

It is key here, the activation of the log.

You must turn logging on. It isnt on by default.

There is a method on if_wd_context to activate logging.

Secondly, make sure code you use or call doesnt call the reset log method.

Effectively throwing away any recorded changes.

regards

Phil