RFC in SAP Systems
RFC in SAP Systems
In all SAP systems, CALL FUNCTION represents an integral part of the ABAP
language. This statement executes a function (a function module) in the same system.
By using the RFC Library ( RFC API ), you can also use the functions of the RFC
between an SAP system and a C program on different platforms. It is of no significance
to the caller whether the remote function is provided in an SAP System or in a C
program.
RFC frees the ABAP programmer from having to program his own communications
routines. When you make an RFC call, the RFC interface takes care of:
Handling communications errors, and notifying the caller, if desired. (The caller
requests notification using the EXCEPTIONS parameter of the CALL FUNCTION
statement.)
A distinction is made between an RFC client and RFC server . RFC client is the
instance that calls up the Remote Function Call to execute the function that is provided
by an RFC server. In the following, the functions that can be executed remotely will be
calledRFC functions and the functions provided via RFC API will be called RFC calls.
All RFC functions available in a remote RFC server system, which are called by an RFC
client, are processed transactionally . This means that after execution of the first RFC
function in the RFC server system the complete context (all globally defined variables in
the RFC server program or in the main program of a function module) is available for
further RFC functions. The RFC connection is closed only
when the context of the calling ABAP program has ended or
You can either assign an application server directly, or assign it through a message
server, as part of a load distribution. This applies to RFCs between two SAP systems
and to RFCs between an SAP system and an external system.
To make the execution of RFC functions reliable, safe and independent from the
availability of the RFC server or RFC server system, the transactional RFC (tRFC) is
available for SAP systems. This ensures that the called function module is
executed only once in the RFC server system.
In transactional RFC calls, the data that belongs to an RFC function must first be stored
temporarily on the SAP database in the RFC client system. When processing is
completed, this must be reported back to the calling ABAP program. Everything else is
handled by the tRFC component in the SAP system.
Since a database is not always available on external systems, the link to the tRFC
interfaces is implemented such that the client or server programs based on RFC API
must take on some administrative functions to ensure that the respective function
module is executed only once.