Skip to Content
author's profile photo Former Member
Former Member

BAPI_TRANSACTION_COMMIT with WAIT = 'X' Still work after error modify table

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

sap.png (29.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 29, 2017 at 07: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)."

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2017 at 08:34 AM
    • You must always read/loop at return parameter when you call a BAPI before committing the work. This Is not optional.
    • The wait option only waits for the high priority update task FM (VB1) to be executed
    • There can be delay due to database or buffering update
    • When using WAIT option BAPI_TRANSACTION_COMMIT can return an error in RETURN parameter, else if some update FM aborts/dumps the error can be seen in SM13 (and trigger a message)

    This information is available and easy to find in online help, look for SAP Transaction Concept or COMMIT WORK statement

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.