RFC Programming in ABAP
A remote function call is a call to a function module running in a system different from the caller's.
In the SAP System, the ability to call remote functions is provided by the Remote Function Call interface system (RFC).
RFC allows for remote calls between two SAP Systems (R/3 or R/2), or between an SAP System and a non-SAP System.
RFC functions running in an SAP System must be actual function modules, and must be registered in the SAP System as "remote".
When both caller and called program are ABAP programs, the RFC interface provides both partners to the communication.
The caller may be any ABAP program, while the called program must be a function module registered as remote.
REMOTE FUNCTION CALL (RFC) is an extension of CALL FUNCTION in a distributed environment.
Existing function modules can be executed from within a remote system (R/2 or R/3) via an RFC call.
This is done by adding a DESTINATION clause to the CALL FUNCTION statement.
RFC frees the ABAP programmer from having to program his own communications routines.
Parameters declared as type REFERENCE cannot be used in remote function calls.
TYPES OF Remote Function Calls :
Synchronous Remote Function Call.
Asynchronous Remote Function Call.
Transactional Remote Function Call.
Queue Remote Function Call.
Web Remote Function Call(Not Covered)
Synchronous Remote Function Calls :
Synchronous remote function calls (RFCs) are those where the user have to wait for their completion before continuing the calling dialog.
In simple terms , “ calling program must wait for the return values to perform further processing”.
Asynchronous Remote Function Calls :
Asynchronous remote function calls (aRFCs) are those where the user does not have to wait for their completion before continuing the calling dialog.
There are three characteristics of asynchronous RFCs :
When the caller starts an asynchronous RFC, the called server must be available to accept the request.
The calling program can receive results from the asynchronous RFC.
In simple terms , “ calling program need not wait for the return values to perform further processing”.
You must not use IMPORTING when calling aRFCs.
Transactional Remote Function Calls :
From Release 3.0 onwards, data can be transferred between two R/3 Systems reliably and safely via transactional RFC (tRFC).
The called function module is executed exactly once in the RFC server system.
The remote system need not be available at the time when the RFC client program is executing a tRFC.
If a call is sent, and the receiving system is down, the call remains in the local queue until a later time.
The calling dialog program can proceed without waiting to see whether or not 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.
Transactional RFCs use the suffix IN BACKGROUND TASK.
Queue RFC :
qRFC With Send Queue
To guarantee an LUW sequence dictated by the application, the tRFC is serialized using queues.
It is therefore called queued RFC (qRFC). Due to the serialization, in R/3 a send queue for tRFC is created. This results in the general term qRFC with send queue.
Tuesday, March 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment