cancel
Showing results for 
Search instead for 
Did you mean: 

no data in context change log in editable alv.

Former Member
0 Kudos

Hi Gurus,

I hav an editable alv..

when i change some data in the editable fields i m supposed to get some entries in the context change log, but i m not getting it.

Any workaround to solve this.

I have enabled the change log in wddoinit method and wriiten the folowing code in wdmodify:

DATA: lt_changes TYPE wdr_context_change_list.

DATA: lr_context TYPE REF TO if_wd_context.

lr_context = wd_context->get_context( ).

lt_changes = lr_context->get_context_change_log( ).

Best Regards,

Navin Fernandes.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Navin,

I know this post is old now, but it is still a relevant search with Google.  I had the same problem and I was doing exactly as you were. The solution was to add "ABAP_FALSE" to the enable_change_log method. By default this is set as true. By explicitly setting it as FALSE it worked for me.

DATA: lr_context TYPE REF TO if_wd_context.

lr_context = wd_context->get_context( ).

lr_context->enable_context_change_log( ABAP_FALSE ).

Hope this helps someone else.

Cheers, Brian

Former Member
0 Kudos

Hi Guys,

Thanks Brian for your inputs.

If it working for you then its great news as it might be helpful for someone who is doing this kind of development now.

I would not be able to check as i am into a new development project right now.

Thank You Everyone for the help and guidance. Special thanks to Thomas for his help and support as always.

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I agree that we need to know how you enabled the log. Perhaps something is wrong there. If you need, here is the online help for context change log:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/frameset.htm

Also consider if putting this code in the WDDOMODIFYVIEW is really the right place. That will trigger for every event (even scrolling). That can become very costly.

Former Member
0 Kudos

Hi Thomas,

I have explained my scenario in detail in the post..

Could you guide me with the same.. It will be of great help..

Best Regards,

Navin Fernandes.

Former Member
0 Kudos

What is the code written to enable the context change log.

Former Member
0 Kudos

Hi lekha,

I have written the following code in the wddoinit of the component controller.

DATA: lr_context TYPE REF TO if_wd_context.

lr_context = wd_context->get_context( ).

lr_context->enable_context_change_log( ).

Also.. before this i have tried checking the changed data in the alv thru data_check event but it doesnot help if i have changed data

in mutiple lines in the the alv.. it goes for a dump saying Element is no longer bound to the node.

It will be of great help if you can guide me with this.

My scenario is as follows:

I have say for example 20 lines in which 2 columns of ALV are editable.

User requirement is that he will change the records in say 15 lines and then press enter.

Now when he presses enter the alv should get refreshed and display in the alv.

Best Regards,

Navin Fernandes.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Also.. before this i have tried checking the changed data in the alv thru data_check event but it doesnot help if i have changed data in mutiple lines in the the alv..

Were you using the data_check or the on_data_check event? In your scenario it sounds like you should be using on_data_check. That event should pass you the actual values changed - no element references

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm

It should certainly work for what you describe. That is the reason for this event. If it is dumping before it even gets to your code, then you should search for SAP Notes or enter a support ticket.

Former Member
0 Kudos

Hi Thomas,

Yes i am using ON_DATA_CHECK event.

It worls fine if i change one row cells in alv ..i mean it triggers the event and enters the event handler properly.

but when i change the values on multiple lines and press enter when i finish changing all the lines .. it goes for a dump.

Well see if the same works with Check pushbutton else will look for SAP notes as well..

Will check the same and revert..

Thank You for the help...

Best Regards,

Navin Fernandes.

Former Member
0 Kudos

Are you using the GET_CHNAGE log mehtod multiple times...or only once it is used.

Former Member
0 Kudos

Hi gurus,

Can you just guide me as to where to call the enable context log method and get context log method.

Best Regards,

Navin Fernandes.

Former Member
0 Kudos

Hi Thomas,

I checked the same for on_data_check event.

The data change is happening for couple of lines in editable alv but.. If i change more than 5 lines it does not trigger.

I have rasied a ticket for the same..

Thanks for the help..

Best Regards,

Navin Fernandes.