An RFC (or Remote Function Call) is a Function Module with the attribute…Remote-enabled module…checked. This allows another system to “call” this function.
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 or between an SAP System and a non-SAP system.
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 programs:
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.
You have two options for implementing external RFC programs:
1) Use programs generated by the RFC Interface Generator (see The RFC Generator.
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.
2) Write your own RFC partner program
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:
RFC programs generated by the RFC Interface Generator use API routines to call an SAP function module. In addition, the application you write (that calls the RFC stub program) must also use API routines to establish a connection with the SAP System, prepare table parameter structures, and so on.
User-created programs (if you write your own) must likewise use API routines. Your program must perform all the same communication tasks as an automatically-generated stub and its caller.
Hope this helps.