A transactional RFC BAPI call requires to call 'BAPI_TRANSACTION_COMMIT' or 'BAPI_TRANSACTION_ROLLBACK' at the end of the call sequence to explicit commit or rollback the transaction. Typically such call requires at least 2 'Invoke RFC BAPI in SAP' activities.
In the TIBCO ActiveMatrix BusinessWorks™ Plug-in for SAP Solutions 8.2.x, There is an 'Auto-Commit' option in the 'Invoke RFC BAPI in SAP' activity, which allows the 'Invoke RFC BAPI in SAP' activity call the 'BAPI_TRANSACTION_COMMIT' automatically at the end of the call. To use this option, the RFC BAPI call should meet the following criteria:
- The transaction or logic unit of work(LUW) consists of only one RFC BAPI call.
- The RFC BAPI call defines BAPIRET* type(in most cases, it should be BAPIRET2, but legacy code may use BAPIRET1 or BAPIRETURN) in return parameters. Such as in EXPORT or TABLE.
- If the BAPIRET* type is in the TABLE, it does not return empty table in response.
If the RFC BAPI does not use BAPIRET* structure to report call status, or the transaction contains multiple RFC BAPI calls, an explicit commit must be used.
When enabled Auto-Commit, the Auto-Commit would be triggered if:
- There is no RFC error when invoking the RFC BAPI.
- There is BAPIRET* data returned in the response.
- The BAPIRET* data has not TYPE "E' (error) record.
If any of the above criteria is not meet, the Plugin will skip the Auto-Commit, and the changes would be no update in SAP.