Seach Makes Easy

Showing posts with label Types of RFCS. Show all posts
Showing posts with label Types of RFCS. Show all posts

Labels:

RFC is an SAP protocol to handle communications between systems which simplifies the programming. A remote function call (RFC) is the call of a function module that runs in a different system to the calling program. It is also possible to call a function module in the same system as an RFC; normally RFCs are used when the caller and the called function module run in different systems. In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables function calls between two SAP systems, or between an SAP system and an external system. RFCs manage

1) Communication process

2) Parameter transfer

3) Errors.

RFC describes an interface to call the function. In RFC communications between two SAP systems, the calling system uses an RFC definition in the target system to access a specific function. The destination of an rfc call might be R/2 connection, R/3 connection, internal connections, logical connections (like to logical systems) or TCP/IP (external systems) connections.

There are five types of RFCs in SAP

1) Synchronous RFC (sRFC)

It requires that the target system is active when the RFC is made. This type of rfc is used for communication between different systems and between SAP Web AS and SAP GUI.

2) Asynchronous RFC (aRFC)

It doesn’t require the target system to be active when RFC is made. This is used for parallel processing jobs and for communication between different systems.

3) Transactional RFC (tRFC)

This is a variation of aRFC. The transactions are divided into steps and are processes step by step. This is an asynchronous transaction. This is helpful in scenarios where there is probability of network failure between the systems.

4) Queued RFC (qRFC)

This is a variation of tRFC. Here the individual steps are executed sequentially.

5) FastRFC

This is used for system internal communications. Interactions between J2ee engine in sap & the abap runtime environment in the same instance are done using these RFC. This type of RFC is possible only if both the source & target are on the same system.

The RFCs are managed using t-code sm59

Use t-code SMT1 to manage trusted systems

Labels:

Use

An application can make calculations and collect data simultaneously by using the various types of asynchronous RFCs. This can also happen indirectly, as with the inbound queue in qRFC. Every RFC request occupies a dialog work process on the application server on which the RFC is executed.

The possible configurations of the SAP System are described below.

Asynchronous RFC with Load Balancing (Parallel RFC)

You can use this RFC type to program parallel RFC calls. The resources are checked and assigned as far as the set quotas allow.

The required ABAP language element is:

CALL FUNCTION remote function STARTING NEW TASK task name DESTINATION IN GROUP group name

With this ABAP command, you are telling the SAP system to process function module calls in parallel. The command implements parallel processing by sending asynchronous RFC calls to the appropriate servers. These are servers in the RFC server group Group Name specified as being available for processing requests. The group name DEFAULT means that all available application servers are being used.

qRFC with Outbound Queue

The qRFC LUWs are executed using the outbound scheduler. The outbound scheduler uses parallel RFC for processing the outbound queue. For this to be possible, you have to maintain the destinations using transaction SMQS.

The outbound scheduler then checks the resources and executes parallel RFCs, if resources are available. If no resources are available, synchronous RFC is used.

qRFC with Inbound Queue

If you are using the inbound queue, the inbound scheduler takes over the processing of the inbound queue. You have to register the queue names to be processed using the inbound scheduler. To do this, use transaction SMQR.

The inbound scheduler then checks the resources and executes parallel RFCs, if resources are available. If no resources are available, the scheduler waits until resources become available..

Transactional RFC

Transactional RFC uses resource checking only. It does not use parallel RFCs.

The required ABAP language element is:

CALL FUNCTION remote function DESTINATION destination IN BACKGROUND TASK

This ABAP command flags the function module remote function for asynchronous processing. The module is not executed immediately. The data transferred with EXPORTING or TABLES is placed in a database table. A COMMIT WORK then triggers the function module. There are various cases:

· The data is updated. In this case the function module is executed within the update following the V1 phase, usually even on a different server.

· The data is not updated. In this case the function module is executed in the same work process.

Caution

Note that RFC calls with CALL FUNCTION are processed in DIALOG work processes. Therefore, the DIALOG limitation for processing a dialog step (default: 300 seconds, system profile parameter rdisp/max_wprun_time) also applies to these RFC calls. Remember to take this limitation into consideration when you are dividing up your data packets for parallel processing.

Followers