Skip to Content
0
Former Member
Oct 24, 2008 at 09:32 AM

How to get deleted items from an ALV list (get_context_change_log)

128 Views

Hi there,

I have a WDP with an ALV table, with activated delete row and save buttons. I have also activated the field editors. After the user does some changes, I want to write the current table content back to the database.

I have implemented a method to save the changes, just as in WDT_TABLE sample. For reasons of efficiency, I would write only the updated/inserted/deleted items back to the database. However, the method get_context_change_log() gives me headaches. It returns all the updated and inserted rows but not the deleted rows; I have debugged the table. function and fields long enough >:(

Now theoretically I could write the whole table back to database, but with several thousands items in the table, this would be absolute unacceptable (the sysadmin would kill me, heh). I could save the old contents in an attribute/context table and compare it to the current table but this also would be resource-wasting.

Is there any way to get the deleted rows as well as the others? My last resort is to get rid of the standard delete button, put a custom button there, and implement an event handler to log all deletion events. Would this work?

All answers will be rewarded.

TIA,

Cüneyt