To determine which records in an internal table have to be inserted, updated or deleted you can use the following function module.
The tables need to be sorted by the database key before calling the function module.
Continue reading determine inserted, updated and deleted rows of an internal table