Creating a trace file with Rfc Connector
Symptoms
You want to create a trace file to get more detailed information about an error or problem.
Solution
When the trace.file
option is set before calling session.connect()
, Rfc Connector will create a detailed trace file at the specified location. Additionally, debug traces from the RFC library are created in the current working directory.
The following examples show how to create a trace file:
Example: Visual Basic ( VB.NET / VBA / VB6 )
Dim session As New RfcSession ' [...] ' enable trace session.Option("trace.file") = "C:\\tracefile.txt" ' connect to SAP system via RFC session.Connect() ' [...]
Example: C#
RfcSession s = new RfcSession(); // [...] // enable trace Session.set_Option("trace.file", "C:\\tracefile.txt"); // connect to SAP system via RFC Session.Connect(); // [...]