Outbound processing for the BAPI interface
In BAPI outbound processing, a message flow sends a request to the SAP server. For BAPI units of work and BAPI result sets, processing is handled synchronously (the message flow waits for a response from the SAP server). For simple BAPIs, you can request that processing be handled synchronously or asynchronously (the message flow does not wait for a response from the SAP server).
For BAPI units of work and BAPI result sets, the processing is handled as described in Synchronous RFC. For simple BAPIs, you make a selection, during configuration, about the type of remote RFC call you want to make.
Synchronous RFC
If you select Synchronous
RFC (the default) during configuration for a simple BAPI,
or if you are using BAPI units of work or BAPI result sets, the following
processing steps occur:
Asynchronous transactional RFC
If you select Asynchronous
transactional RFC during configuration, the following
processing steps occur:
- The adapter receives a request from a message flow in the form of a BAPI business object.
- The adapter checks the business object to see whether the SAP
transaction ID attribute has a value assigned. (The SAP transaction
ID (TID) is a field in your message.)
- If the SAP transaction ID attribute has a value, the adapter uses that value during processing.
- If the attribute does not have a value, the adapter makes a call to the SAP server and gets a transaction ID from the SAP server.
- The adapter converts the BAPI business object to an SAP JCo function call.
- The adapter uses the transactional Remote Function Call (tRFC)
protocol to make the call to the SAP server.
The adapter does not wait for a response from the SAP server.
- After the function data is passed to the SAP application,
control returns to the adapter.
- If the call to the SAP server fails, the SAP server throws an ABAPException.
- If the call to the SAP server succeeds but contains invalid data, no exception is returned to the adapter. For example, if the adapter sends a request that contains an invalid customer number, the adapter does not respond with an exception indicating that no such customer exists.
- The request node builds a message tree that contains the transaction ID as one of the fields.
Asynchronous queued RFC
If you select Asynchronous
queued RFC during configuration, the following processing
steps occur:
- The adapter receives a request from a message flow in the form of a BAPI business object.
- The adapter checks the business object to see whether the SAP
transaction ID attribute has a value assigned. (The SAP transaction
ID (TID) is a field in your message.)
- If the SAP transaction ID attribute has a value, the adapter uses that value during processing.
- If the attribute does not have a value, the adapter makes a call to the SAP server and gets a transaction ID from the SAP server.
- The adapter converts the BAPI business object to an SAP JCo function call.
- The adapter uses the tRFC protocol to make the call to the specified
queue on the SAP server.
The adapter does not wait for a response from the SAP server.
- After the function data is passed to the SAP application, control
returns to the adapter.
- If the call to the SAP server fails, the SAP server throws an ABAPException.
- If the call to the SAP server succeeds but contains invalid data, no exception is returned to the adapter. For example, if the adapter sends a request that contains an invalid customer number, the adapter does not respond with an exception indicating that no such customer exists.
- The request node builds a message tree that contains the transaction ID as one of the fields.