Types of RFC (Remote Function Call)

Synchronous RFC
The first version of RFC is synchronous RFC (sRFC). This type of RFC executes the function call based on synchronous communication, meaning that the systems involved must both be available at the time the call is made. Example: Communication between different systems and between SAP Web AS and SAP GUI.

Asynchronous RFC
For communication between different systems and for parallel processing of selected tasks.

Transactional RFC (tRFC)
Transactional RFC is an asynchronous communication method that executes the called function module just once in the RFC server. The remote system need not be available at the time when the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID). If a call is sent, and the receiving system is down, the call remains in the local queue. The calling dialog program can proceed without waiting to see whether the remote call was successful. If the receiving system does not become active within a certain amount of time, the call is scheduled to run in batch. Example: Transactional RFC ensures transaction-like processing of processing steps that were originally autonomous.

tRFC is always used if a function is executed as a Logical Unit of Work (LUW). Within a LUW, all calls
• are executed in the order in which they are called
• are executed in the same program context in the target system
• run as a single transaction: they are either committed or rolled back as a unit.

Implementation of tRFC is recommended if you want to maintain the transactional sequence of the calls.

Disadvantages of tRFC
• tRFC processes all LUWs independently of one another. Due to the amount of activated tRFC processes, this procedure can reduce performance significantly in both the send and the target systems.
• In addition, the sequence of LUWs defined in the application cannot be kept. It is therefore impossible to guarantee that the transactions will be executed in the sequence dictated by the application. The only thing that can be guaranteed is that all LUWs are transferred sooner or later.

Queued RFC (qRFC)
To guarantee that multiple LUWs are processed in the order specified by the application, tRFC can be serialized using queues (inbound and outbound queues). This type of RFC is called queued RFC (qRFC). qRFC is therefore an extension of tRFC. It transfers an LUW (transaction) only if it has no predecessors (based on the sequence defined in different application programs) in the participating queues. Implementation of qRFC is recommended if you want to guarantee that several transactions are processed in a predefined order. Example: Ensures that individual steps are processed in sequence.

RFC (Remote Function Call) :-


It is call of a function module i.e. running in different system to the calling program.

• You can also call a function module in the same system as a RFC, however RFC are mostly used in calling different systems.
• RFC is an SAP interface protocol i.e. it is based on the common programming interface for communication (CPI-C) this means that ABAP functions can be called for external applications and tools.

RFC Destinations :-

1) R/3 connection
2) Internal Connection
3) Logical destinations
4) SNA/CPI-C connections
5) TCP/IP
6) Connection using ABAP/4 drivers
• Transaction code for RFC connections SM59

Types of RFC’s :-


1) Synchronous RFC (SRFC) – This is used for communication between different systems and between SAP WAS and SAP GUI.

2) Asynchronous RFC (ARFC) – for communication between different systems and for parallel processing of selected tasks.

3) Transactional RFC (TRFC) – A special form of ARFC. TRFC ensures transaction like processing of steps that are originally defined.

4) Queued RFC (QRFC)
 – QRFC is an extension of TRFC. It also ensures that individual steps are processed in sequence.

Note:
• If the SNC is configured, we get a tab in SU01 – user administration.
• KeyOn is a 3rd party tool configured for single sign-on for SAP systems.
• RFC connection should be bi-directional