Introduction to RFC Client Programs

All RFC client programs have to establish an RFC connection to an SAP System:

Possible Logon Users

Getting Connected with the RFC Library before Release 3.0C

There are different ways of and conditions for establishing an RFC connection to an SAP System (R/2 or R/3):

  1. using a local sideinfo file
  2. using no local sideinfo file, but a sideinfo file for the SAP gateway
  3. without using any sideinfo file

A sideinfo file is needed for communication via CPIC.

For RFC connections to an R/2 System in IBM environments, a sideinfo file for the SAP gateway for communication via SNA LU6.2 protocol is always required.

RFC connections in SNI environments require the SAP gateway to run on the BS 2000 host. Apart from that, there are no differences for establishing an RFC connection to an R/2 System (SNI) or to an R/3 System.

Getting Connected with the RFC Library as of Release 3.0C

An RFC connection can be established via an entry in the saprfc.ini file. Using this feature, you need not have any sideinfo file except for connecting to an R/2 System (IBM).

The sideinfo file is needed for communication via CPI-C and includes some parameters necessary for establishing a CPI-C connection.

If the local sideinfo is not used, all the parameters required must be passed on to the RFC library using the call RfcConnArgv before the RfcOpen is submitted or defined in the parameter RFC_OPTIONS of RfcOpen.

An RFC function is called by RfcCall. The function RfcCall returns after the call request is sent.

The function RfcReceive allows to receive the answer to an RFC call and must be called after RfcCall was issued. The function RfcReceive waits until the answer is received.

Moreover, there is a function which can issue an RFC call synchronously: RfcCallReceive waits until the returned answer will be received.

Typical examples of RFC client programs are sapinfo.c, startrfc.c and srfctest.c which are included in the RFC SDK.