RFC Interface
When a function module is called that is defined in another system as a calling program, this is referred to as a remote function call
( RFC). The RFC interface facilitates
this kind of program communication, supporting function calls between different SAP systems (or SAP Web application servers), or between an
ABAP system SAP system and an external
system. An RFC client calls the function module, and an RFC server provides and executes the module. The RFC interface provides the following services:
- Calling and controlling the communication routines needed to communicate with the remote system
- Log-on and log-off to and from the remote system and authorization checks for the function groups used
- Converting actual parameters to the format required in the remote system and vice-versa. This includes any platform-dependent conversions (for example, for differing
code pages or byte sequences). The conversion supports all ABAP data types.
- Handling any communication errors and, if requested, forwarding them to the caller.
If different ABAP systems are in communication with each other, two ABAP programs communicate using
the RFC interface. If an SAP system and an external system are communicating, an ABAP program communicates with a program in another programming language ( C, C++, Visual Basic, Java or .NET).
RFC Libraries are available for communication with programs in other languages for all the operating systems supported by SAP, such as MS Windows, Unix (RS/6000, SUN Solaris, HP-UX), Linux, z/OS (OS/390) and AS400:
- Java Connector (JCo) for Java
- .NET Connector for .NET (C#, VB.NET)
- RFC Software Development Kit (SDK) for C and C++
The following additions of the CALL FUNCTION command cause a remote function call:
- DESTINATION (synchronous RFC)
If the DESTINATION addition is specified without either of the following two additions, the calling program waits until the remotely called function is ended.
- STARTING NEW TASK (asynchronous RFC, aRFC)
The STARTING NEW TASK addition continues processing of
the calling program as soon as the remotely-called function is started, without waiting for it to end. The results can be stored in callback routines.
- IN BACKGROUND TASK|UNIT (transactional RFC, tRFC, and qRFC)
The IN BACKGROUND addition pre-marks the remotely called function for execution and starts it with the COMMIT WORK command.