Show TOC

Establishing an RFC Connection from an SAP SystemLocate this document in the navigation structure

Use

Call from an ABAP program:

               

               CALL FUNCTION "ABC" DESTINATION "RFCEXTERNAL"
                       IMPORT...
                       EXPORT...
                       TABLES...
                       EXCEPTIONS...
               

            

The destination "RFCEXTERNAL" identifies an entry in the RFCDES table.

The RFCDES table in Release 3.0C onwards

From Release 3.0C onwards, you can define an RFC server program which is already started, registered at an Gateway and waiting for RFC call requests by using transaction sm59.

You must define an RFC server program with registering as activating action, and a program-ID.

Program-ID

The program-ID is an identifier of the RFC server program for the Gateway to distinguish between different RFC server programs. It is recommended to use both the name of the RFC server program and the host name of the RFC server program.

Information about the Gateway

Note

The Gateway of the relevant application server will be used if nothing else is specified. It is recommended to define the Gateway explicitly, because an RFC server program usually registers at a specific Gateway.

Configurations

SAP recommends you to specify the complete name of the RFC server program (including the full path name) when defining an entry in the RFCDES table using transaction sm59.

The RFC server program can be started by the currently running SAPGUI, by the currently running application server or by an Gateway, but it has to communicate via a specified Gateway.

Consequently, the following prerequisites must be met:

  • The user under which the SAPGUI or the application server or the Gateway runs must have execution rights for the RFC server program.

  • Both Gateway and RFC server program are running on the same computer:

    • The IP address of this computer must be specified in the hosts file.

    • The service name of the Gateway must be specified in the services file.

  • The Gateway and the RFC server program are running on different computers:

    • The IP-addresses of both computers must be specified in both hosts files.

    • The service name of the Gateway must be specified in the services file.

    • The Gateway must have the authority to start the RFC server program on the target computer via remote shell:

      1. The user of the Gateway must be defined on the target computer.

      2. The.rhosts file which contains the host name of the gateway computer must exist in this user's home directory on the target computer

      3. Since the remote shell command is different on different UNIX platforms (remsh, rsh, etc.), the command can be defined in the gateway profile parameter gw/remsh, if necessary (e.g. gw/remsh=/usr/ucb/remsh). The default is 'remsh'.

        Note

        For very large hosts files on OS/2, it is recommended to define the entries for all computers involved at the beginning of this file, because it may take a long time to get all IP-addresses used.

Starting an RFC server program

An RFC server program can be started by the currently running SAPGUI, by the currently running SAP application server or by an Gateway, as described in the above section.

Using the registering feature of the Gateway (from Release 3.0C onwards), RFC server programs can be started before, register at this Gateway and then wait for RFC call requests from System Release 3.0C onwards.

Here, the RFC server program of the RFCDES table (transaction sm59) must be defined as registering for activating action. See The SAPRFC.INI File for more details.