When the SAP adapter is used with the BAPI interface, you must consider certain factors when you design transactional flows.
You can configure message flows to be transactional so that updates to resources such as databases can be coordinated; changes are committed or rolled back together within the same transaction. This transactional coordination can be extended to external system updates, such as SAP databases, when you use the BAPI interface with SAPRequest nodes.
The SAP adapter can control whether it waits for SAP to commit the updates synchronously, or issues a commit and returns while the SAP commit happens asynchronously. You can determine this behavior by using the Use wait parameter before calling BAPI commit parameter on the Configure Objects pane of the Adapter Connection wizard. The adapter relies on the transactionality setting of the message flow to determine whether to issue the commit call.
In earlier releases of SAP, some BAPIs were coded with a commit. From SAP Release 4.0A onwards, it is more effective for BAPIs to issue a separate BAPI_TRANSACTION_COMMIT to force the update, instead of doing commit work. By using this method, BAPI calls can be made before the work is committed as a batched unit of work. To find out if a BAPI is coded with a commit, see the documentation for the BAPI.
When the Transaction mode property on the SAPRequest node is set to Yes, the adapter is instructed to issue the SAP commit on completion of the message flow in line with other database commits. You can set the Use wait parameter before calling BAPI commit parameter in the Adapter Connection wizard that determines whether the commit is synchronous or asynchronous.
If the Transaction mode property on the SAPRequest node is set to No, the adapter does not issue an SAP commit and the parameter that you set on the Adapter Connection wizard has no relevance. However, the commit can still be issued as part of a BAPI work unit COMMIT verb (to which the property on the wizard does apply) or a call to the BAPI_TRANSACTION_COMMIT (to which the property on the wizard does not apply).
If the BAPIs are coded with commits and you set Transaction mode to Yes, the BAPI is called as part of the same transaction as those from other SAPRequest nodes in the same flow and using the same adapter. Therefore, any BAPIs that were called previously in this message flow are committed.
If you set Transaction mode to No, the BAPI is not committed now or at the end of the message flow; it is not guaranteed ever to be committed.