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:
The Business Process is activated when an RFM call is received from SAP R/3.
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.
The Adapter returns the results of the RFM execution back to SAP R/3.
If the RFM call returned successfully without exceptions, SAP R/3 informs the Adapter that the data can be committed by calling onCommitTID().
The Adapter updates the TID in the file database as being Committed, commits the data, and sends an onCommitTID() return to SAP R/3.
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().
The Adapter sends an onRollbackTID() return to SAP R/3, confirming that the TID was not committed.