Show TOC

Using Multiple-Client Server ProgramsLocate this document in the navigation structure


As of Release 3.0C, an RFC server program can register itself at an Gateway under a program identifier and then wait for further RFC requests from any other SAP system.

There are three ways of doing this:

  1. Registration will be carried out by RfcAccept, and the parameter argv must include the following data:

    - a<program-ID>

    e.g. <host name>.<program name>

    - g<SAP gateway host name>

    e.g. hs0311

    - x<SAP gateway service>

    e.g. sapgw00

    - t (optional)

    RFC trace on

  2. You can define an entry in the saprfc.ini file which includes all necessary connection parameters and optionally the RFC-specific parameter RFC_TRACE. An RFC client program can then issue the RfcOpen call with the mode RFC_MODE_PARAMETER and a destination pointed to the defined entry. See

    The SAPRFC.INI File for more details.

    In this case, the parameter argv in RfcAccept must include the following data:

    - D<destination>

    This destination must point to a valid entry in the saprfc.ini file.

    - t (optional)

    RFC trace on

    Until now the contents of argv were defined by the SAP instance which started the server program.

  3. With RfcDispatch or

    RfcListen or

    RfcGetName it can wait or look for the following RFC request. In this case, you must define the destination in the SAP system using transaction SM59:

    - connection type


    - activate kind

    register mode

    - program-ID

    same program-ID as in RfcAccept

    - gateway host

    same gateway host name as in RfcAccept

    - gateway service

    same gateway service as in RfcAccept

    To work with this functionality no changes in both client or server porgram are necessary. Only the configuration with SM59 must be changed as mentioned above, and the server program must be started with other parameters.


    You must use the program name as program-ID, because there may be more programs registered with the same name at an Gateway. Therefore, use at least the host name of the computer where your RFC server program is running as part of the program-ID. For example, you can start the rfcexec program in register mode with RFC trace from the command line as follows:

    rfcexec -ap13387.rfcexec -ghs0311 -xsapgw53 -t


    rfcexec -Drfctest

    The saprfc.ini file contains the entry rfctest.

    Transactional RFC (tRFC) server programs can also work in register mode.

    Additionally, this functionality both enables and eases the use of tRFC server programs in debugging mode.

    For further information on the transactional RFC, see Transactional Remote Function Calls.

See also Registering Server Programs with the Gateway.