Remote Function Calls Using SAPGUI

Starting with R/3 Release 3.0C, it is possible for an RFC client program to call ABAP function modules which are using ‘Dynpros’ or SAP graphics. This allows you to include normal SAP screens into your programs. Consequently, it is possible to call complete SAP transactions from external programs.

To use this functionality, a SAPGUI front end server (version 3.0C or later) must be installed on the external system where the RFC client program is running.

There are three methods to activate this new functionality:

  1. Use RfcOpen
    You can call the function RfcOpen with the special mode RFC_MODE_VERSION_3 and then set the field use_sapgui to a non-zero value in the structure RFC_CONNOPT_VERSION_3.
  2. Use the saprfc.ini file
    You can define an entry in the saprfc.ini file which includes all necessary connection parameters and the RFC-specific parameter USE_SAPGUI (=1) in the saprfc.ini file. 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.
    You can call the function module RFC_ATTACH_GUI (without any parameter) within the ABAP funtion module you want to use before using any SAPGUI functionality.

This method can be used without modifying the C code of the RFC client program.