Application Development 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: 

bapi_transaction_commit

Former Member
0 Kudos

what is the difference if we use bapi_transaction_commit it and if we dont use it

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Reward Points..

2 REPLIES 2

Former Member
0 Kudos

Reward Points..

Former Member
0 Kudos

Hi,

When ever we run a BAPI that is changing the database we should do commit work to write the changes to database.

Function module "BAPI_TRANSACTION_COMMIT" is a FM which does the commit work.

When a BAPI is used in transaction called externally to change data in SAP system BAPI_TRANSACTION_COMMIT function should be called to write the changes to the database.

PATTERN

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT =

IMPORTING

RETURN =

It has 2 parameters.

wait = If it is blank then the function commits changes to database but doesnot wait.If wait is set to some value then after commit work the system waits.

return = It gives messages when commit fails only when wait is set to some value else if wait is blank and commit fails the system crashes without any message.

If a BAPI is run from a program where it changes the database and a commit work doesnot follow it then the system crashes also it locks certain database elements.

Thanks

Nayan