‎2014 Dec 08 5:18 PM
We need to create a BAPI/Remote enabled Function Module for creating Sales Order for integration with 3rd party application. We are using the standard BAPI BAPI_SALESORDER_CREATEFROMDAT2 for creating SO, after the successful execution BAPI_TRANSACTION_COMMIT is needed to be called for updating the database because of which we have created a wrapper remote enabled function module inside which we have called both the above BAPIs.
Now I recently read the documentation of creating BAPI where it is written COMMIT WORK should not be called inside a FM.
Please let me know what is the SAP recommended best practice in such case.
‎2014 Dec 08 11:31 PM
Hi,
When SAP provides BAPIs they do not put a COMMIT WORK inside them.
This is so that you can call multiple BAPIs in a row, and then COMMIT the whole lot at once.
You are free to do whatever you like in your own FM/BAPI.
cheers
Paul
‎2014 Dec 08 11:31 PM
Hi,
When SAP provides BAPIs they do not put a COMMIT WORK inside them.
This is so that you can call multiple BAPIs in a row, and then COMMIT the whole lot at once.
You are free to do whatever you like in your own FM/BAPI.
cheers
Paul
‎2015 Feb 11 6:04 AM
Hi Paul
Thanks for the reply.
So I am assuming this is one of the best ways to go ahead for integrating SAP with other apps.
‎2015 Feb 11 7:26 AM
Hi,
Sure, but use standard BAPIs wherever you can!
cheers
Paul
‎2021 Oct 26 4:00 PM
BAPI_EQMT_MODIFY is an example of SAP putting COMMIT WORK inside
‎2021 Oct 27 3:05 PM