Anfang des Inhaltsbereichs

Funktionsdokumentation TRFC and QRFC Support Dokument im Navigationsbaum lokalisieren

Transactional RFC (TRFC) guarantees that a function module is executed in the target system exactly once. Queued Transactional RFC (QRFC) is a type of TRFC that is executed only once and in a particular order.

Client applications can be used with normal synchronous RFC, TRFC and QRFC. Normal Remote Function Calls (RFCs) are synchronous and are not guaranteed to execute only once or to execute in any particular order. Normal RFC calls return some value to the calling application, for example a list of customers. Transactional Remote Function Calls (TRFCs) and Queued Remote Function Calls (QRFCs) do not return anything if the function was successfully added to the SAP system. If the function was not added correctly, they throw an exception.

In the connector there are separate method signatures generated for TRFC and QRFC versus the normal synchronous RFC method. In the case of TRFC and QRFC, an additional parameter called a transaction ID (TID) is used as a unique identifier within the SAP system and when adding the function module execution request to the SAP system. A TID is similar to a GUID. In fact, GUIDs can be mapped back and forth to SAP TID using helper functions in the RFC library.

TRFC or QRFC should be used when information is added only once to the SAP system (for example, when adding a sales order or submitting an IDOC). In the case where a client application needs information from the SAP system, for example a list of customers, it makes no sense to use TRFC as the SAP system will return nothing back to the application other than an exception should something go wrong.

Queued RFC enforces the order of execution of the functions in the SAP system. To use QRFC you must have the following:

·         A name for the RFC queue to use on the SAP system. If the queue does not already exist it will be automatically created.

·         A TID

·         A queue index to determine the sequence. The queue index begins with zero.

 

Ende des Inhaltsbereichs