Syntax
RFC_OPTIONS rfc_opt; /* Parameter for RFC connection */
RfcEnvironment(...); /* Install error handling function */
rfc_opt.destination = “K50”; /* Destination in saprfc.ini */
/* and in sideinfo for the SAP */
/* gateway */
rfc_opt.connopt = NULL; /* Connect parameters in */
/* saprfc.ini file */
rfc_opt.client = “000”; /* Client in SAP R/2 */
rfc_opt.user = “RFCTEST”; /* CPIC user */
rfc_opt.password = “SECRET”; /* Password */
rfc_opt.language = “E”; /* Logon language */
rfc_opt.trace = 0; /* No RFC trace */
rfc_handle = RfcOpen(); /* Open RFC connection */
...
The saprfc.ini file must be in the same directory as the RFC client program or be defined with its path and file name by the environment variable RFC_INI.
includepicture /SAPIrExtHelp/standard.asp?name=beispiel.gif \bmc \d
Windows: set RFC_INI=d:\rfctest\saprfc.ini
The sideinfo entry for the above test could be as follows:
Syntax
DEST=K50
TYPE=2
GWHOST=is0001
GWSERV=sapgw00
For more information on the saprfc.ini file, see The SAPRFC.INI File.