06-25-2008 4:33 AM
what is the difference if we use bapi_transaction_commit it and if we dont use it
06-25-2008 4:37 AM
06-25-2008 4:37 AM
06-25-2008 4:51 AM
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