IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > SAP Software > SAP interfaces
The BAPI interfaces
WebSphere Adapter for SAP Software supports outbound processing and inbound processing for simple BAPIs. In outbound processing, the client applications call BAPIs and other RFC-enabled functions on the SAP server. In inbound processing, the SAP server sends an RFC-enabled function (such as a BAPI function) through the adapter to an endpoint.
Suppose you want to build a service that creates a new customer on the SAP server.
You first run the external service wizard to discover the BAPI_CUSTOMER_CREATEFROMDATA function. The wizard then generates the business object definition for BAPI_CUSTOMER_CREATEFROMDATA along with other SCA service artifacts. During BAPI outbound processing, the adapter receives the service request and converts the data into a BAPI invocation.
A simple BAPI performs a single operation, such as retrieving a list of customers. The adapter supports simple BAPI calls by representing each with a single business object schema.
Simple BAPIs can be used for outbound or inbound processing. You can specify synchronous RFC processing or asynchronous transactional RFC (tRFC) processing when you configure a module for a simple BAPI. In addition, for outbound processing, you can specify asynchronous queued RFC (qRFC) processing, in which BAPIs are delivered to a predefined queue on the SAP server.
- In synchronous RFC processing, the SAP server and the adapter must be available during processing.
- In outbound processing, the client application sends a request and then waits for a response from the SAP server.
- In inbound processing, the SAP server sends a request through the adapter to an endpoint and waits for a response from the adapter.
- In asynchronous tRFC outbound processing, the adapter associates a transaction ID with the function call to the SAP server. The adapter does not wait for a response from the SAP server.
If the delivery is unsuccessful, the client application can use the TID to make the request again.
- In asynchronous tRFC inbound processing, the adapter does not have to be available when the SAP server invokes the function call. The function call is placed on a list of functions to be invoked, and the call is attempted until it is successful.
To send function calls from a user-defined outbound queue on the SAP server, you also specify asynchronous tRFC inbound processing.
- In asynchronous qRFC outbound processing, the process is similar to asynchronous tRFC outbound processing. A TID is associated with the function call, and the adapter does not wait for a response from the SAP server. Additionally, the BAPIs are delivered to a predefined queue on the SAP server. By sending BAPIs to the predefined queue, you can ensure the order in which they are delivered.
The adapter supports the following data types in the import, export, and changing parameter list:
- Elementary types
- Complex data type
- Table types
- Line types
- Structure (example - BAPIRET2)
- Table type (example - TRTEXTS)
- Data Element (example - TRACKTEXT)
- Views (example - T001W_BIW)
- Predefined types (example - BIC_ADD_DATA_TT)
- Structure
The adapter supports the following data types in the table parameter list -
- Tables with flat line structure (example - BAPIRET2)
If you select the Generate business objects in SAP XI standard option in the Specify the Discovery Properties window, the table type element will have a wrapper anonymous complex type, whose name is appended with a suffix “_Item”.
- Outbound processing for the BAPI interface
In BAPI outbound processing, a client application sends a request to the SAP server. For simple BAPIs, you can request that processing be handled synchronously or asynchronously (the client application does not wait for a response from the SAP server).- Inbound processing for the BAPI interface
The adapter supports inbound processing (from the SAP server to the adapter) for simple BAPIs. A client application on the SAP server invokes a function through the adapter to an endpoint.- Business object structure for a simple BAPI
A business object for a simple BAPI call reflects a BAPI method or function call in SAP. Each business object property maps to a BAPI parameter. The metadata of each business-object property indicates the corresponding BAPI parameter. The operation metadata determines the correct BAPI to call.- Business object structure for a nested BAPI
A nested BAPI business object contains structure parameters that can contain one or more other structures as components.- Coordinating BAPI transactions and passing values between BAPI invocations
The transaction capability of IBM BPM or WebSphere Enterprise Service Bus can be used in a scenario where multiple BAPI requests are to be executed in an atomic fashion.