2020 Jan 30 1:30 PM
Hi,
I have a scenario where I have to call 2 BAPIs in an enhancement. These 2 BAPIs are dependent, first BAPI need to be committed first before the second can be called.
Now, in enhancements we cannot call COMMIT, if I use IN UPDATE TASK I also cannot call COMMIT. In this situation, how could I achieve it?
Thank you.
2020 Jan 30 1:39 PM
Why did you wrote "if I use IN UPDATE TASK I also cannot call COMMIT" you don't need it in UPDATE TASK
2020 Jan 30 2:01 PM
Calling BAPIs while another object is being saved to database is not a good idea. What if there are errors?
It should be developed more like a workflow: Enter object 1 to be created -> User saves -> BAdI to start workflow event in update task -> Commit work -> update task runs, database updates for object 1 -> event is started asynchronously -> actual database commit -> workflow starts -> BAPI 1 is called -> BAPI 2 is called. You can monitor workflow.