IDoc statusObject04ModuleBTP_INTEGRATION

IDoc status 04 — IDoc Status 04 Control Record Rejected By EDI Subsystem

Status 04 is an outbound error meaning the IDoc left SAP and reached the port successfully, but the external EDI subsystem or middleware rejected it during control record validation, before translation started. The cause sits in a mismatch between the control record fields (partner, message type, IDoc type, test flag) and what the subsystem or partner profile expects, not in the IDoc's data segments.

Covers the outbound status 04, where an IDoc that was dispatched successfully at status 03 is bounced back by the EDI subsystem or middleware because the control information does not match what the receiving side is configured to accept. Walks through the usual partner profile and port mismatches, the check sequence across WE20, WE21 and the middleware logs, and why blind reprocessing does not fix anything until the control record itself is corrected.

Published 16 Sept 2026· 1,028 words

What the status means

Status 04 is an outbound error. It follows status 03, meaning SAP successfully handed the IDoc data to the communication port, but the external EDI subsystem or middleware layer then examined the control record and rejected it before attempting any translation or mapping. Processing stops here on the SAP side because the rejection is reported back into the status record, and the IDoc effectively never got past the gatekeeper on the receiving system. This is distinct from a failure to transmit at all; the file or RFC call reached the subsystem, but something in the header fields, sender/receiver identifiers, message type, or test indicator failed the subsystem's own validation before content processing began.

Why it appears

  • Partner profile mismatch: the sender or receiver partner number, partner type, or qualifier configured in WE20 does not match what the EDI subsystem or trading partner agreement expects.
  • Message type or IDoc type combination not recognized or not mapped on the subsystem side, often after a new message type is enabled in SAP without a corresponding update on the middleware.
  • Test flag inconsistency: the IDoc control record is flagged as a test document while the subsystem is configured only for production traffic, or the reverse.
  • Port or RFC destination pointing to the wrong environment, such as a quality system port accidentally routed against a production middleware instance.
  • Character set or codepage issues corrupting the control record header at file transfer time, making sender/receiver fields unreadable to the subsystem parser.
  • Interchange envelope mismatches for EDIFACT or X12 style interfaces, where the UNB/ISA level sender and receiver codes configured in the translator do not align with the SAP partner profile values.
  • Communication channel reconfiguration on the middleware (PI/PO or a third-party translator) that changed accepted sender IDs or message type mappings without notifying the SAP interface owner.
  • Duplicate interchange control numbers, where the subsystem rejects a resend as a duplicate at the control record level rather than at content level.

What to inspect

  • WE02 or WE05 to open the IDoc and read the exact status 04 error text returned from the subsystem, not just the generic status description.
  • WE20 to check the outbound partner profile for the message type in question, confirming partner number, partner type, and port assignment.
  • WE21 to verify the port definition, RFC destination or file path, and confirm it targets the intended environment.
  • SM58 for related tRFC entries, useful to rule out a transport failure versus a genuine subsystem-side rejection.
  • Middleware or translator logs (SXMB_MONI for PI/PO, or the equivalent log on a third-party EDI tool) to correlate the rejected message and read the subsystem's own error reason.
  • BD87 to confirm the status sequence shows 01 then 03 then 04, ruling out a transport-layer issue further upstream.

How to reprocess safely

Identify and correct the control record mismatch first, whether that means aligning WE20 partner profile settings with the subsystem's configuration, correcting the port or RFC destination in WE21, or coordinating a mapping fix with the middleware team. Because the IDoc never reached translation, nothing was posted or delivered downstream, so reprocessing generally carries no duplicate-posting risk on the receiving business system, unlike inbound statuses that stop after partial posting. The risk instead is duplicate transmission: check whether the subsystem or an automated retry already resent the file before assuming a clean slate. Once the underlying configuration is corrected, reprocess through BD87, selecting the affected IDocs and triggering outbound processing again. For a single problem IDoc used to prove the fix, WE19 can regenerate a test transmission, but production volumes should go through BD87 or the standard reprocessing job so the audit trail in the status record stays intact.

The fix people try first (and why it fails)

Reprocessing the IDoc through BD87 without touching the partner profile or port configuration sends the identical faulty control record back to the same subsystem, which rejects it again with the same status 04. Because a control record mismatch usually affects every IDoc on that message type and partner combination, mass reprocessing the whole error queue multiplies the same rejection across dozens or hundreds of documents instead of fixing one. On some middleware platforms repeated rejected deliveries also trip retry limits or error thresholds, which then blocks legitimate traffic on the same channel.

Whose problem this is

Shared between the SAP interface or basis team and the EDI subsystem or middleware team, since the fix can land on either side of the boundary. SAP side owns the partner profile and port definition; the middleware or EDI translator team owns their partner agreement and mapping configuration. Hand over the exact control record values, sender, receiver, message type, IDoc type, and test indicator, along with the subsystem's raw rejection text.

Common pitfalls

Status 03 reads as success and status 04 as the next step, which leads people to assume the IDoc was delivered when in fact it was bounced immediately afterward; the two statuses sit right next to each other in the flow but mean opposite outcomes. The quality of the error text depends entirely on what the subsystem chooses to report back, and some middleware configurations return a generic rejection code with no readable detail, forcing a manual cross-check against the middleware's own log rather than the IDoc status screen alone. Status 04 is also easy to confuse with status 02 (failed before reaching the port) or status 05 (failed during translation, meaning it did get past control checks), and picking the wrong one to investigate wastes time on the wrong layer.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-idoc/status-04ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.