2010 Jan 13 7:38 PM
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
2010 Jan 13 8:01 PM
2010 Jan 13 8:15 PM
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?
2010 Jan 15 2:35 PM
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.
2010 Jan 18 4:52 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |