transaction flows

Question:
Hi. I have a function module that calls five(5) BAPI_GOODSMVT_CREATE sequentially. My question is what if SAP goes down while it's executing the 3rd BAPI? ...All 5 transactions must be executed successfully or none at all.For this example, it should return 5 matdocs (mblnr).
Answer:
It depends on when the BAPI_TRANSACTION_COMMIT happens.
If you want all or nothing, you could put the COMMIT at the end of the entire function.
Answer:
Thanks for the reply.
Actually, if I put the commit after the 5th transaction, it does not save the 4 material documents created for the 4 previous Bapi's...
Answer:
Unfortunately that's impossible. I've looked through the source code of BAPI_GOODSMVT_CREATE and it's clear that you can create only one material movement in one DB transaction (say between two COMMITs)
_________________
Best regards, Sergey Korolev

More Articles:

Global SAP memory AND ABAP/4 memory?
How do I refresh a screen in REUSE_ALV_BLOCK_LIST_DISPLAY?
SCHEDULING OF ABAP REPORT?
Export Status GUI, User Interfaces?
Batch Inputs?
mail attachment?