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).
During
configuration you can make a selection 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, the following processing steps occur:- The adapter receives a request from a client application in the
form of a BAPI business object.
- The adapter converts the BAPI business object to an SAP JCo function
call.
- The adapter uses the Remote Function Call (RFC) interface to process
the BAPI or RFC function call in the SAP application.
- After passing the data to the SAP server,
the adapter handles the response from SAP and converts it back into
the business object format required by the client application.
- The adapter then sends the response back to the client application.
Asynchronous transactional RFC
If you select
Asynchronous
transactional RFC during configuration, the following
processing steps occur:
- The adapter receives a request from a client application in the
form of a BAPI business object.
- The adapter checks the business object to see whether the SAPTransactionID
attribute has a value assigned.
- If the SAPTransactionID 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 adapter passes the TID information to the client.
Asynchronous queued RFC
If you select
Asynchronous
queued RFC during configuration, the following processing
steps occur:
- The adapter receives a request from a client application in the
form of a BAPI business object.
- The adapter checks the business object to see whether the SAPTransactionID
attribute has a value assigned.
- If the SAPTransactionID 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 adapter passes the TID information to the client.
Wait on BAPI Commit
When
using the BAPI interface to create data on SAP, the data will not
be committed to the SAP Database until the BAPI_TRANSACTION_COMMIT BAPI
is invoked explicitly. When creating a large amount of data using
a BAPI, if you invoke the BAPI_TRANSACTION_COMMIT without
setting the WAIT parameter, the Update process is
initiated on SAP and exits immediately without waiting for the Update
process to complete.
If you select Wait until commit
call to SAP database is completed and returned during
configuration, the adapter will wait until all time critical updates
to SAP database are completed before invoking the commit call. You
can set the value for the Wait on a BAPI Commit call
to be either a non-space character, which is interpreted as ‘True',
or set it a space character, which is interpreted as ‘False.'
If you set the value to ‘True', then the BAPI call will wait
indefinitely until the update process is completed before exiting.
There
is a performance impact when you use the WAIT parameter
as processing is delayed till the database update is completed. The
need for a Wait on a BAPI Commit should to be evaluated
based on your requirement.
If it is not selected, the commit
call is performed immediately regardless of whether all the execution
within a transaction is complete or not.
Note: This functionality
is supported for BAPI interface and BAPI work unit interface.