Business object structure for a BAPI work unit

A business object that represents a BAPI work unit (also known as a BAPI transaction) is actually a wrapper object that contains multiple child BAPI objects. Each child BAPI object within the wrapper object represents a simple BAPI.

The adapter supports a BAPI work unit using a top-level wrapper business object that consists of multiple child BAPIs, each one representing a simple BAPI in the sequence. The BAPI wrapper object represents the complete work unit, while the child BAPI objects contained within the BAPI wrapper object represent the individual operations that make up the work unit.
Figure 1. Example of a top-level wrapper object for a BAPI work unit
A screen capture of a BAPI work unit object, SapCustomerTxn, which contains two BAPI objects.

The adapter uses the sequence of operations in the operation metadata to process the BAPIs in the work unit.

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.

Note: This object, which contains the results of the BAPI operation, is named according to the convention Sap + Name of the structure. For more information about naming conventions, refer to Naming conventions for BAPI business objects.
Additional information about the business object can be found in the application-specific information of the business object. For example, the application-specific information for a BAPI work unit lists the type of BAPI and the operations that make up the work unit.
Figure 2. Application-specific information for a BAPI work unit
Screen capture of BAPI work unit business object metadata
Note: The adapter does not provide an automated rollback mechanism for BAPI work units. Rollback of a BAPI work unit can be achieved in one of the following ways:
  • Do not put explicit COMMITs in the application-specific information sequence. When an error occurs in one of the BAPIs, the sequence of BAPI calls is terminated and BAPI_TRANSACTION_ROLLBACK is called. If there is no intrinsic COMMIT in any of the BAPIs already called, no further steps are required. Most BAPIs do not have an intrinsic COMMIT.
  • Call another BAPI that can compensate for the work that is already committed, as in the case of the BAPIs that have an intrinsic COMMIT.



Feedback

(C) Copyright IBM Corporation 2005, 2012. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)