11-29-2017 7:01 AM
Hi Experts,
I have some problems about commit transaction.
in my function module which the processing type is remote-enabled mode (already used for web service)
i have calling function of 'BAPI_GOODSMVT_CREATE' and put
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
after the 'BAPI_GOODSMVT_CREATE' function.
There is a problem with 2 cases:
the first one is error when modify data of Transparent Table
and the second is some network fail.
my question is why there is an error like above but the commit still working?
i assume when i put wait = 'X' is mean if there is some error in function module, it should not commit the transaction.
here is some of my code:
Thank you in advance 🙂
*Sorry for my bad english
11-29-2017 7:51 AM
Hey, The Bapi_transaction_commit is basically running this command with message handling and buffer cleaning. The "WAIT" variable of the function is a flag decision for using (or not) the "AND WAIT" addition. Read the link and note especially this part: "If the addition AND WAIT is not specified, the program does not wait (in non-local updates) until the update work process has executed it (asynchronous updates), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating)."
11-29-2017 7:51 AM
Hey, The Bapi_transaction_commit is basically running this command with message handling and buffer cleaning. The "WAIT" variable of the function is a flag decision for using (or not) the "AND WAIT" addition. Read the link and note especially this part: "If the addition AND WAIT is not specified, the program does not wait (in non-local updates) until the update work process has executed it (asynchronous updates), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating)."
12-12-2017 3:03 AM
Thank you for your answer, after i read your answer i realize it i was wrong. i think i want to try to replace the commit work at the end of the code. Thank you for your answer. 🙂
11-29-2017 8:34 AM
This information is available and easy to find in online help, look for SAP Transaction Concept or COMMIT WORK statement