Registering Server Programs with the SAP Gateway

An RFC server program can be registered with the SAP gateway and wait for incoming RFC call requests.

This new registering feature has the following features:

·        An RFC server program registers itself under a program-ID at an SAP gateway and not for a specific SAP system.

·        If an RFC call request from any R/2 or SAP system is transferred to this SAP gateway with the option ‘connect to an already registered program’ with the same program-ID, it will be connected to this RFC server program.

·        In R/2, this option requires the parameter setting PROTOCOL=R in the sideinfo file for the gwhost program.

·        In an SAP system, the destination must be defined with transaction SM59, using connection type T and Register Mode. Moreover, this entry must contain information on the SAP gateway at which the RFC server program is registered.

·        After having executed an RFC function, the RFC connection will be closed. If this RFC server program works with RfcDispatch in a loop (this procedure is recommended), it will be automatically registered again at the same SAP gateway under the same program-ID and can then wait for further RFC call requests from the same SAP system or from other SAP systems.

·        An RFC server program can be run on all Windows PCs with this new functionality. There are no restrictions for server programs on systems that do not support remote shell. In addition, you can now run RFC server programs easily in debugging mode.

How to Work with this Functionality

In order to use this new functionality, no changes in ABAP programs are needed. Only the destination in an ABAP program must have the new feature defined with transaction SM59, using connection type T and Register Mode.

There are two ways of working with this new registering functionality in external systems:

·        With a few additional parameters:

All correctly running RFC server programs can work with this new feature without changing the source code. They must only be started with a few additional parameters needed to connect to the SAP gateway.

·        Using the saprfc.ini file:

The RFC call RfcAccept must include a destination referring to an entry in the saprfc.ini file with type R and containing some parameters needed by the SAP gateway.

See also Using Multiple-Client Server Programs.