Debugging

Depending on the structure of the program to debug, you can use different techniques:

·        setting RFC_DEBUG in the environment

You can set the environment variable to any value to enter the debug mode.

·        setting -debug on the command line

If the program uses RfcConnArgv for scanning the command line, set -debug on the command line to enter debugging mode.

·        setting the trace field to D or E

If you can modify the C code you are using you can set the trace field in the structure RFC_OPTIONS to the value D or E before calling RfcOpen or any other function opening an RFC connection (D: debugging without activated RFC trace; E: debugging with activated RFC trace).

Another way of doing this is to define an entry in the saprfc.in’ file which includes all necessary parameters and the RFC-specific parameter RFC_TRACE in the saprfc.in’ 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.

In Release 3.0C, this functionality is only supported for Windows NT, Windows 95 and all supported UNIX platforms (Motif). In particular, this functionality is not available for 16-bit Windows environments (Windows 3.x, as well as the 16-bit subsystems of Windows NT and Windows 95).

Moreover, you have to install a SAPGUI program on your system which must be of Release 3.0C or later.

Under Windows NT and Windows 95, the SAPGUI program and its DLLs and auxiliary programs can be installed anywhere. However, you must have started ‘SAPGUI’ once before you can use it via RFC, because the program must register itself in the Windows registry.

Under SAP-based UNIX, the SAPGUI program must be installed on the normal SAP path /usr/sap/<system name>/SYS/exe/run.