Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_TRANSACTION_COMMIT

Former Member
0 Likes
401

hello gurus,

what is the use of "WAIT" parameter in BAPI_TRANSACTION_COMMIT ?

2 REPLIES 2
Read only

Former Member
0 Likes
361

If you set wait = 'X', It will act like COMMIT WORK AND WAIT.

Means, the program flow will wait there till the work is complete..this is synchronous.

Please assign points.

Read only

Former Member
0 Likes
361

Hi,

A set of related tables will get affected while executing a BAPI.

While doing any operations to those tables using a BAPI those table will be holded and will be released after database operations.

Until those tables or released another database operation cannot be made, Inorder to process all the entries to the table using the BAPI, a span of time will mentioned to WAIT, by that time the tables will get released and will be ready for processing another entry.

It means your program'll waits for end of the commit, i.e.:

The updating of the BAPI start after calling the COMMIT (so BAPI_TRANSACTION_COMMIT), now your program can:

1) go on to work while database is beeing updated:

COMMIT WORK

2) wait for the end of database updating:

COMMIT WORK AND WAIT.

The first case is better for performance, the second case is better if it wants to make sure to continue only if the data are really saved.

BAPI_TRANSACTION_COMMIT will return or not return the message depending on whether the value of parameter WAIT is set to 'X'. If it has failed it will return 'Posting could not be carried out'

Regards.