An RFC server program is a program containing RFC functions to be called by ABAP programs.
The RFC API provides routines for implementing RFC server programs. After having started, the RFC server programs must inform the RFC library about all RFC functions that can be called within this server program. It then waits for incoming call requests, and the RFC library dispatches the requested calls (using RfcListenAndDispatch in a loop).
A typical server looks as follows:
RFC Server Program
There are two methods of receiving an RFC call. The most simple way of receiving an RFC call in an external program is to register a C function to be called when a call request is received. The function RfcInstallServerFunction registers a C function to be called when receiving the request for an RFC call. After RfcRegisterServer (RfcStartServer) or after receiving the return code RFC_CALL when calling RfcInvoke, the program must use RfcListenAndDispatch to internally call the corresponding registered function. The return code of the registered function is again returned by RfcListenAndDispatch.
There are always some standard functions which are installed automatically. Apart from some internally-used functions, the function modules are as follows:
Is used to test the connection.
Returns some information about the library and its environment.
Returns the function documentation which was installed during the calls of RfcInstallServerFunction.
RFC_DOCU does not return information of functions that have been implemented in a way other than using RfcInstallServerFunction (e.g. functions implemented via RfcInstallGenericServerFunction).
For information on security issues, see: