Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Check_changed_data shows modifications even after data was saved.

Former Member
0 Likes
848

In a program based on BCALV_EDIT_04, Iu2019m adding a feature to warn user if changes were made and an exit requested prior to saving. Calling method u2018check_changed_datau2019 shows me if Iu2019ve inserted, modified, or deleted rows, so this works great the first time through.

But after theyu2019ve saved the data and havenu2019t changed anything else, 'check_changed_data' still shows me the same changes. Is there a method I can call after saving the data that will clear u2018er_data_changedu2019? Or should I use a different method to check for modifications?

Thank you,

Christie

In a program based on BCALV_EDIT_04, Iu2019m adding a feature to warn user if changes were made and an exit requested prior to saving. Calling method u2018check_changed_datau2019 shows me if Iu2019ve inserted, modified, or deleted rows, so this works great the first time through.

But after theyu2019ve saved the data and havenu2019t changed anything else, 'check_changed_data' still shows me the same changes. Is there a method I can call after saving the data that will clear u2018er_data_changedu2019? Or should I use a different method to check for modifications?

Thank you,

Christie

4 REPLIES 4
Read only

Former Member
0 Likes
773

Maybe method refresh_delta_tables?

Rob

Read only

Former Member
0 Likes
773

I have done 'refresh_delta_tables' after the save.

As in BCALV_EDIT_04, the check_changed_data method is called at the beginning of the save routine. This triggers an update to the delta tables. It's within the internal method 'update_delta_tables' where I'm able to detect if changes were made.

I'm also calling check_changed_data upon exit. Since this again invokes update_delta_tables, I was hoping there would no longer be any delta to update. This wasn't the case.

Any other suggestions?

Read only

0 Likes
773

I've gotten around the problem by leaving the ALV screen after the save, but would still welcome any advice on how to handle this in the future.

Read only

773

I've figured out how to do this. Found a thread in http://abap-explorer.blogspot.com/2008/09/how-to-get-updated-data-from-editable.html that pointed me to a technique.

I just made a copy of gt_outtab after the initial load and again after the save. Then after check_changed_data, just compared gt_outtab with the saved version to see if there had been any changes.