ERPClimb logoERPClimb
Debugging
ABAP Developmentadvanced 7 min read

Debugging Part 9: RFC, IDoc and OData Debugging

Preview · a free account unlocks the full lesson

Key takeaway

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 sections

Visual overview

Debugging Part 9: RFC, IDoc and OData Debugging — learning sheetFlow: Find a failed request in /IWFND/ERROR_LOG and replay it in the GW client with a breakpoint → Debug an inbound IDoc with WE19 → Inspect SM58 for tRFC errors in a test system. Key ideas: RFC FROM EXTERNAL SYSTEMS; IDOCS; ODATA / FIORI; ASYNCHRONOUS RFC. Watch out: Asynchronous calls (tRFC/qRFC/bgRFC) execute later in other processes — inspect SM58/SMQ2 and debug by replaying the call, not the original sender.ERPClimb.com / ABAP / LESSON 9/10 / LEARNING SHEETDebugging Part 9: RFC, IDoc and OData Debugging1 · HOW IT FLOWS1Find a failed request in/IWFND/ERROR_LOG andreplay it in the GW…2Debug an inbound IDocwith WE193Inspect SM58 for tRFCerrors in a test system2 · KEY IDEAS EXPLAINEDRFC From External SystemsIdentify the RFC user (caller's SM59 destinationor logs: STAD, SM04 during call).External breakpoint for that user in the calledFM; trigger the call from the partner system.IDocsWE19: enter IDoc number → copy → "Inboundfunction module" → choose FM → foreground /debug.Breakpoints in the FM or its exits beforehand.OData / Fiori/IWFND/ERROR_LOG: error text, request URI, user,payload; "Replay" option to/IWFND/GW_CLIENT./IWBEP/ERROR_LOG: backend-specific errors.Asynchronous RFCSM58: tRFC errors with text; "ExecuteLUW" reprocesses.SMQ1/SMQ2: outbound/inbound queues; lock thequeue, debug the first LUW (SMQ2 → debug LUW) intest systems.3 · REMEMBER · WATCH OUTRememberRFC calls from outside run under the RFC user of the caller'sdestination — set external breakpoints for that user (with permission…IDocs: copy with WE19 and run the inbound function module inforeground/debug mode (test systems) instead of waiting for the real…OData: /IWFND/ERROR_LOG (hub) and /IWBEP/ERROR_LOG (backend) showfailed requests; /IWFND/GW_CLIENT replays requests as your user so…!Watch outAsynchronous calls (tRFC/qRFC/bgRFC)execute later in other processes —inspect SM58/SMQ2 and debug byreplaying the call, not the originalsender.4 · IN A REAL PROJECTA warehouse system's RFC calls to create goods movements failed intermittently. Developers could not reproducethem from SE37. Temporary payload logging showed the failing calls had storage location in lowercase, whichthe partner sent only for one site. With the captured payload replayed in SE37 and an external breakpoint for…Original ERPClimb learning sheet • Verify against your SAP release and edition

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.

Free account

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.

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.