2019 Oct 14 3:01 PM
hi all,
there is a transaction which involves HEADER+Multiple Line Items
when user press save button how to perform a transaction that it should create records in corresponding DB tables
at the end either the complete transaction could successful or fail but not partial.
how can we achieve such case with ACID Database properties
i had searched many SCN posts but still i didn't get the correct one.
so can any one please share a blog or document on it
thanks in advance.
2019 Oct 14 4:15 PM
Hi Bala,
You can keep your INSERT/MODIFY statements in different function modules. You can keep calling these function modules in UPDATE task and then call COMMIT WORK once all validations are passed. Data will be updated at one point only.
Or
You can keep using INSERT/MODIFY statements and use COMMIT WORK / ROLLBACK WORK based on the validation results.
Regards
GK
2019 Oct 14 4:15 PM
Hi Bala,
You can keep your INSERT/MODIFY statements in different function modules. You can keep calling these function modules in UPDATE task and then call COMMIT WORK once all validations are passed. Data will be updated at one point only.
Or
You can keep using INSERT/MODIFY statements and use COMMIT WORK / ROLLBACK WORK based on the validation results.
Regards
GK
2019 Oct 14 6:06 PM
hi Gaurav Karkara,
thanks for your reply. among this two options which one is preferable for industry best standard practices.
2019 Oct 14 5:02 PM
You know what ACID is, but you didn't find the ABAP statements COMMIT WORK and ROLLBACK WORK?