Error Analysis

You can use the following utilities for error analysis:

System Logs

In accordance with the dialog system, the SAP Gateway records system logs for all error situations. You can evaluate the system logs with the usual tools.


In addition you can record detailed traces. To do this you have to set a trace level in the parameter rdisp/TRACE :

rdisp/TRACE = 0  no trace
rdisp/TRACE = 1  error trace
rdisp/TRACE = 2  complete process trace, short data trace
rdisp/TRACE = 3  complete process trace, short data trace

The traces are to be found in the following files:


Trace File

Gateway read process:


Gateway monitor:


All trace lines describing an error begin with ***.

All trace lines corresponding to a system log (syslog) begin with ***LOG, followed by the system log number and the version of the variable parts of the system log.

You can Activate the trace function for the gateway and for external programs.

See also:

Trace Functions

Return Codes

For troubleshooting purposes, it is often helpful to understand the meaning of the return codes. You will find a list of the most important error codes in the section Error Codes.

If an error occurs, you can view the error codes on the initial screen of the Gateway Monitor. If you choose F1 help, a list is displayed.

The CPI-C return codes and the return codes from the SAP Gateway are listed in the SAP note 63347.

SAP Gateway Memory Problems

Some error messages and trace entries indicate gateway problems as regards memory allocation. For more information about this, see Memory Management of the SAP Gateway and Parameters for Resource Management

Error Starting CPI-C Programs

Local Programs

The gateway starts locak CPIC programs using fork/execlp. This implies that the program must be located in the search path of the (gateway) UNIX ID and must be executable for the (gateway) UNIX ID.

You can test this by logging on with the gateway ID and using the command which checking whether the program you want to start is in the search path of the gateway ID: Enter  which <program>.

Remote and Registered Programs

For information about errors that may occur when starting remote and registered CPI-C programs see Errors When Starting CPI-C Programs.

Useful SAP Notes relating to the SAP Gateway

Note Number

Short Text


Resource Management for tRFC and aRFC


SIDEINFO; Problems after changing the CICS name       


No side info entry for dest ...                  


Gateway, Connection reset by peer, errno 232     


Activating the CPIC trace


List: CPIC error codes


Automatic start of a gateway instance under  NT


RC=668 R/2 restarted during R/3 R/2 communication


NiIHostToAddr: Host name too long


Dr.Watson in gwhost.exe under Windows NT         


Hanging update because of  “stopped CPIC”        


Test tool for RFC connections:  sapinfo           


Required documents when analyzing RFC problems


List of network products supported by SAP


Check list: Problems SNA gateways (R/3 ==> R/2)


Using the secinfo file (gateway ACL)