How to Set Trace for ERPMA

How to Set 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 out 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. 

<See source page: it provides a link to copy the 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.statcounter

Leave a Comment
  • Please add 4 and 4 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Maheshkumar S Tiwari edited Revision 6. Comment: Added tags

  • Ed Price MSFT edited Revision 3. Comment: Updated title case and grammar standards. See Title Style Guide for more info on that.

  • Peter Geelen edited Revision 1. Comment: Fixed broken link to copy script code

Page 1 of 1 (3 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Peter Geelen edited Revision 1. Comment: Fixed broken link to copy script code

  • Ed Price MSFT edited Revision 3. Comment: Updated title case and grammar standards. See Title Style Guide for more info on that.

  • Maheshkumar S Tiwari edited Revision 6. Comment: Added tags

Page 1 of 1 (3 items)