Supporting BAPI transactions

A BAPI transaction, also referred to as BAPI Logical Unit of Work, consists of a set of BAPIs that are executed in sequence so as to complete the entire transaction.

For example, to update an employee record in the SAP system, the record needs to be locked before being updated. This is accomplished by calling three BAPIs, in sequence, in the same transaction. The following three BAPIs illustrate the kind of sequence that forms such a transaction:

The first BAPI in the transaction locks the employee record, the second updates the record, and the third approves the update. The advantage of using a transaction is that the client can invoke the employee record change with a single call, rather than with three separate calls. In addition, if SAP requires that the BAPIs execute in a specific sequence for the business flow to complete correctly, the transaction supports this sequence.

The adapter supports a BAPI transaction, or sequence of BAPIs, using a top-level wrapper business object that consists of multiple child BAPIs, each one representing a simple BAPI in the sequence. The BAPI transaction wrapper object represents the complete transaction. Each second-level child business object represents a structure parameter or table parameter of the method. Simple attributes correspond to simple parameters of the method. The adapter uses the application specific information set on the operation to determine the sequence of BAPI calls. BAPI_TRANSACTION_COMMIT can be issued after each BAPI call by specifying the keyword COMMIT in the ASI sequence. The adapter will call BAPI_TRANSACTION_COMMIT at the end of a sequence of BAPI calls even if the application specific information sequence does not specify any COMMITs.

The adapter does not provide an automated rollback mechanism for BAPI transactions. Rollback of a BAPI transaction can be achieved in one of the following ways:


Terms of use |

Last updated: Sun Mar 12 11:15:18 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)