About Application Adapters

The SAP BAPI Adapter Data Flows

When the SAP BAPI Adapter communicates with the SAP R/3 software, it uses the RFC protocol. The list below shows the RFC types of communication used:

Outbound Data Flow: Java CAPS to SAP R/3

Outbound communications occur when the Adapter receives data from Java CAPS and sends it to SAP R/3 by calling a specific BAPI or RFM. The figure below shows a non-transactional outbound process.

The figure above shows the following steps for the outbound data flow:

  1. The Collaboration or Business Process populates the appropriate BAPI or RFC Import, Changing, and Table parameter nodes on the BAPI/RFC OTD with data from an inbound OTD.

  2. The Adapter logs onto the SAP R/3 application using preconfigured properties.

  3. The Adapter calls the BAPI OTD’s execute() method. Any work performed is immediately committed by SAP R/3 through autocommit.

  4. The SAP R/3 applications returns successfully.

Inbound Data Flow: SAP R/3 to Java CAPS

For the inbound data flow, the SAP BAPI Adapter can receive data from SAP R/3 via RFC or tRFC. The sections below describe each protocol.

To enable the SAP BAPI Adapter to receive data from SAP R/3, configure the Environment properties with an RFC destination created within SAP R/3.

Inbound Data Flow via RFC

The sequence diagram uses a sample CostCenter OTD to describe the RFC inbound sequence.

The figure above shows the following steps for the inbound data flow via RFC:

  1. The Business Process is activated when an RFM call is received from SAP R/3.

  2. Finding that data from an RFM is available, the Business Process accesses all pertinent data nodes and sends the gathered information to other Java CAPS components.

  3. The Adapter returns the results of the RFM execution back to SAP.

Inbound Data Flow via tRFC

Communication via tRFC is the similar to RFC, except that it adds transactional verification steps prior to committing or rolling back. tRFC is preferred over RFC because of the additional reliability. By using unique TIDs associated with a BAPI/RFM call, SAP R/3 processes the data once, and only once. The figure below shows inbound data flow via tRFC.

The figure above shows the following steps for the inbound data flow via tRFC:

  1. The Business Process is activated when an RFM call is received from SAP R/3.

  2. Finding that data from an RFM is available, the Business Process accesses all pertinent data nodes and sends the gathered information to other Java CAPS components.

  3. The Adapter returns the results of the RFM execution back to SAP R/3.

  4. If the RFM call returned successfully without exceptions, SAP R/3 informs the Adapter that the data can be committed by calling onCommitTID().

  5. The Adapter updates the TID in the file database as being Committed, commits the data, and sends an onCommitTID() return to SAP R/3.

  6. If the RFM call did not return successfully for any reason, SAP R/3 informs the Adapter that the data must be rolled back by calling onRollbackTID().

  7. The Adapter sends an onRollbackTID() return to SAP R/3, confirming that the TID was not committed.