RFC with External Systems
In the SAP System, the ability to call remote functions is provided by the Remote Function Call (RFC) interface. This interface allows for remote calls between two SAP Systems (R/3 as of Release 2.1 and R/2 as of Release 5.0D), or between an SAP System and a non-SAP system.
The present section describes how to write RFC partner programs that run in non-SAP Systems.
If you are writing RFC programs in an SAP System, see RFC-Programming in ABAP.
Client and Server Programs
RFC programs for non-SAP Systems can function as either the caller or the called program in an RFC communication.
There are two kinds of RFC programs: RFC client and RFC server
The RFC client is the instance that calls up the RFC to execute the function which is provided by an RFC server. In the following, the functions that can be executed remotely will be called RFC functions, and the functions provided by the RFC API will be called RFC calls.
How to implement external RFC programs
You have two options for implementing external RFC programs:
These are stub programs you can install on your workstation or PC to call up SAP function modules. The RFC Interface Generator in the SAP System lets you generate the stubs and download them to your machine.
RFC stubs are written in C, and are stored either in libraries (in R/3-based UNIX systems) or in DLL's ("dynamic-link libraries" in Windows systems). With dynamic-link libraries, you can call the stubs from any programming language whose compiler offers DLL options.
With the RFC Interface Generator you can also create example programs that show how to call an RFC stub. These programs can serve as a basis for programming your own application.
You can write an RFC partner that makes (or receives) the remote call directly. This program can call up any SAP function module or be called by any ABAP program. You must write the program in C.
Both methods above use the RFC API.
What is the RFC API?
The SAP System provides the RFC API (Remote Function Call Application Programming Interface) that you install on non-SAP systems to help you implement RFC partner programs. The RFC API is a set of C-language routines that perform certain communications tasks for you.
The RFC API supports several external systems, such as OS/2, Windows, WindowsNT and Windows95, and all R/3-based UNIX platforms and makes it possible to use the RFC functionality between an SAP System and a C program on the above platforms. It is of no significance whether the remote function is provided in an SAP System or in a C program.
For each supported platform, there is an RFC SDK including the RFC library specific for each of these platforms, SAP RFC header files and some sample RFC programs.
The RFC API is always required
Both methods for implementing RFC programs use the RFC API:
For information about the RFC API components you need for your RFC projects, see Contents of the RFC SDK.