You shoul use this new call instead of all other calls such as RfcOpen, RfcConnect, RfcOpenExt, RfcOpenExtV3 to open an RFC connection.
An RFC client can define all necessary connection data as parameters in this call. It can also use the saprfc.ini file. The client can connect to any R/2, SAP or external system using this call.
See the saprfc.h header file and the sample program srfctest.c in the RFC-SDKfor more details.
If you
use
Load Balancing to connect to an SAP system and there is no
information about the host name of the message server (in connect_param of
RfcOpenEx or in saprfc.ini), the RFC library will try to get the host name
from the sapmsg.ini file customized
for the SAPLOGON on Windows.
Usually, these files are installed in the Windows directory. You can also copy them in a directory which is specified by the environment variable RFC_LOGON_INI_PATH.
On non-Windows platforms, you can work with this environment or copy these files to your working directory.
See saprfc.h and sapinfo.c or srfctest.c for more details.
Using the call RfcOpenEx, you can log on to an SAP system from 4.0 onwards by specifying a 2-byte ISO-language key instead of the 1-byte SAP-language.
If you execute logon with a language that is supported in Unicode systems only (UC Language), the PCS parameter has to be set to 2.
Example:
RFC_HANDLE hRfc = RfcOpenEx(cU("ashost=binmain sysnr=53 client=000 user=hallo passwd=world lang=VI PCS=2"),&errInfo);
The support of UC Languages is supported only for Unicode backend (AS ABAP) systems.
The UC Language mode can be used with any language. If the backend (AS ABAP) system is not a Unicode system the error code RFC_ERROR_LOGON_FAILURE is returned in errinfo.group.