Debugging Part 9: RFC, IDoc and OData Debugging
Preview · a free account unlocks the full lesson
Debug calls that arrive from outside: RFC function modules called by external systems, inbound IDocs (WE19), OData/Fiori requests (external breakpoints, /IWFND/ERROR LOG, /IWBEP/ERROR LOG, /IWFND/GW CLIENT), and asynchronous tRFC/qRFC calls in SM58/SMQ2.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 3 introduced external breakpoints in general. This lesson applies them to the main integration channels you're likely to meet: RFC, IDocs and OData.
For RFC calls coming in from external systems, the call runs under the RFC user of the caller's destination — RFC calls from outside run under the RFC user of the caller's destination — set external breakpoints for that user (with permission and debug authorization).
You can identify that user from the caller's SM59 destination, or from logs such as STAD, or from SM04 while the call is actually in progress. Setting an external breakpoint for that user inside the called function module, then triggering the call from the partner system, lets you step through it live.
An alternative that avoids depending on the partner system at all is to capture the input via logging and then simply test the function module directly in SE37 with that same input.
For IDocs, WE19 lets you enter an IDoc number, copy it, select "Inbound function module," choose the function module, and run it in foreground or debug mode — IDocs: copy with WE19 and run the inbound function module in foreground/debug mode (test systems) instead of waiting for the real partner.
Setting breakpoints in the function module or its exits beforehand lets you step through exactly as if the IDoc had just arrived. For outbound IDocs, the equivalent is repeating the output from the original document in a test system, with breakpoints set in the output function module.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
- SM59RFC Destination Maintenance
- SMQ1qRFC Outbound Queue Monitor
- SM58Transactional RFC Monitor
- WE19IDoc Test Tool
- SM04User Sessions Monitor for the Local Instance
- /IWFND/GW_CLIENTSAP Gateway Client
- /IWBEP/ERROR_LOGSAP Gateway Backend Error Log
- SE37Function Builder for testing and building function modules
- SLG1Application Log Display
- /IWFND/ERROR_LOGSAP Gateway Error Log
- SMQ2Inbound qRFC Queue Monitor
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.