ILM Quickie – setting trace for ERPMA

While troubleshooting an SAP ERP MA in ILM 2007 FP1 (for example because of no data returned at import), it comes handy to trace the SAP connection on client side.

And for this case, the helping hand comes from another MS platform….

Check this article on the Microsoft Developer Network.

(quote) “

“Enabling and Disabling SAP RFC and CPIC Trace

Issue: You want to capture statistics about which remote calls your application or the SAP System are executed. The RFC trace captures the information below.

  • Which function modules have been called remotely by the program to be analyzed
  • Whether the RFC was executed successfully
  • The total time used to process the remote call
  • The type of RFC communication (RFC client or RFC server)
  • The instance the remote call was executed on
  • The technical parameters characterizing the instance
  • The number of bytes sent and received at the RFC

The CPIC trace captures error information including the following information.

  • How the error occurred
  • When the error last occurred
  • Error number and description

One way you can enable and disable tracing is by using a script and setting three environment variables or within the SAP system using transaction SE37. To enable or disable tracing, use the following script.

Copy Code

Set oShell = CreateObject("WScript.Shell")
Set oUserEnv = oShell.Environment("SYSTEM")
'RFC_TRACE
'0 = No trace
'1 = Trace
oUserEnv("RFC_TRACE") = 1
' CPIC_TRACE
' 0 = No trace
'1 = Write error messages in trace file
'2 = Full trace
'3 = Include trace data blocks
oUserEnv("CPIC_TRACE") = 1
oUserEnv("RFC_TRACE_DIR") = "c:\RFCTrace" 

The script is configured to do an RFC trace and error message CPIC tracing. Change the values to disable tracing or to include more detail in the CPIC trace.

You can also use SAP transaction SE37 to initiate a trace. One benefit of using the SAP system is automatic formatting which is not available in the connector. ‘ (end quote)

When using this script on the ILM server, check the ILM program files directory tree for the trace file.

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s