Condition to use Auto-Commit in the 'Invoke RFC BAPI in SAP' activity

Condition to use Auto-Commit in the 'Invoke RFC BAPI in SAP' activity

book

Article ID: KB0077911

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for SAP Solutions 8.2.x

Description

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:
  1. The transaction or logic unit of work(LUW) consists of only one RFC BAPI call. 
  2. 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. 
  3. 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:
  1. There is no RFC error when invoking the RFC BAPI.
  2. There is BAPIRET* data returned in the response.
  3. 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.  

Issue/Introduction

Condition to use Auto-Commit in the 'Invoke RFC BAPI in SAP' activity

Environment

ALL