ERPClimb logoERPClimb
IDoc
ABAP Developmentintermediate 8 min read

IDoc Part 4: Outbound IDocs, Distribution Model and Reprocessing

Lessons are open to try during our launch period. Some advanced content may move to Pro later. AI practice limits apply separately.

Key takeaway

Create and send outbound IDocs: ALE distribution model (BD64) for master data and transactional messages, partner profile outbound parameters (receiver port, basic type, transfer immediately vs collect), MASTER IDOC DISTRIBUTE, status 30/03/02, RSEOUT00 and resending.

In this lessonShow sections

Visual overview

IDoc Part 4: Outbound IDocs, Distribution Model and Reprocessing — learning sheetFlow: BD64: display a model view and its message types → WE20: check outbound parameters for a partner (port, basic type, mode) → Send a material with BD10 in a test system and follow the status in WE02. Key ideas: SOURCES OF OUTBOUND IDOCS; DISTRIBUTION MODEL (BD64); PARTNER PROFILE OUTBOUND (WE20); STATUS SEQUENCE. Watch out: Status 30 means "ready for dispatch" — the IDoc has not left SAP yet. Status 03 means passed to the port, not that the partner processed it.ERPClimb.com / ABAP / LESSON 4/10 / LEARNING SHEETIDoc Part 4: Outbound IDocs, Distribution Model andReprocessing1 · HOW IT FLOWS1BD64display a model view and itsmessage types2WE20check outbound parameters for apartner (port, basic type, mode)3Send a material with BD10in a test system andfollow the status in WE022 · KEY IDEAS EXPLAINEDSources Of Outbound IDocsOutput control (NACE, medium 6 EDI / A ALE): e.g.order confirmation ORDRSP, invoice INVOIC (Part7).Change pointers for master data (BD21) — Part 7.Distribution Model (BD64)Model view with sender logical system, receiverlogical system, message types and optional filters(e.g. only plant 1000).Distribute the model to the receiving system;generate partner profiles from it.Partner Profile Outbound (WE20)Receiver partner + message type → receiver port(WE21), basic type, output mode: transferimmediately or collect.For output control: message control tab withapplication, output type and process code (e.g.V1/BA00/SD10).Status Sequence01 created → 30 ready for dispatch (collected) →03 passed to port OK.02 error passing to port (e.g. RFC destinationissue) → check SM58 / port.3 · REMEMBER · WATCH OUTRememberOutbound IDocs are created by applications (output control, changepointers, ALE programs like BD10) or by custom code with…The distribution model (BD64) defines which message types go fromwhich sender to which receiver logical system (ALE).Partner profile outbound parameters define receiver port, basic typeand "transfer IDoc immediately" or "collect IDocs"…!Watch outStatus 30 means "ready fordispatch" — the IDoc has notleft SAP yet. Status 03 means passedto the port, not that the partnerprocessed it.4 · IN A REAL PROJECTMaterial master changes were not reaching the warehouse system. WE02 showed hundreds of MATMAS IDocs in status30: the partner profile was set to "collect IDocs", but the RSEOUT00 job had been deleted during asystem copy. After rescheduling RSEOUT00 every 10 minutes and sending the backlog through BD87, the warehouse…Original ERPClimb learning sheet • Verify against your SAP release and edition

Expert visual walkthrough

ABAP DEVELOPMENT ACADEMY · Integration pathERPClimb.com

Outbound IDocs, Distribution Model and Reprocessing

IDoc · Chapter-specific technical teaching map

Integration path

1Concept

Change / output

2Concept

Dispatch config

3Concept

IDoc creation

4Concept

Partner receipt

Tutor's chapter takeaway

Create and send outbound IDocs: ALE distribution model (BD64) for master data and transactional messages, partner profile outbound parameters (receiver port, basic type, transfer immediately vs collect), MASTER_IDOC_DISTRIBUTE, status 30/03/02, RSEOUT00 and resending.

In a real project

Material master changes were not reaching the warehouse system. WE02 showed hundreds of MATMAS IDocs in status 30: the partner profile was set to "collect IDocs", but the RSEOUT00 job had been deleted during a system copy…

Watch out for

• Collect mode without an RSEOUT00 job (IDocs stuck in 30). • Missing distribution model entries for ALE message types. • Treating status 03 as "processed by receiver". • No COMMIT after MASTER_IDOC_DISTRIBUTE. • Resending…

Conceptual study map, not an SAP configuration screenshot or a guaranteed runtime sequence. Consult the lesson for implementation prerequisites and exceptions.

The situation: a real project scenario

Material master changes were not reaching the warehouse system. WE02 showed hundreds of MATMAS IDocs in status 30: the partner profile was set to "collect IDocs", but the RSEOUT00 job had been deleted during a system copy.
After rescheduling RSEOUT00 every 10 minutes and sending the backlog through BD87, the warehouse received the data. The team added "status 30 older than 1 hour" to their IDoc monitoring alerts.

Explanation

Part 3 covered inbound IDoc processing. Now the other direction: SAP sending data out.

Outbound IDocs are created by applications (output control, change pointers, ALE programs like BD10) or by custom code with MASTER_IDOC_DISTRIBUTE. Output control, reached through NACE with medium 6 for EDI or A for ALE, generates IDocs such as an order confirmation (ORDRSP) or an invoice (INVOIC) — the mechanics of this are covered further in Part 7.

Change pointers, maintained through BD21, drive master data distribution and are also covered in Part 7. Direct send programs exist for specific object types: BD10 for materials, BD12 for customers, BD14 for vendors. And custom programs can trigger distribution directly by calling MASTER_IDOC_DISTRIBUTE.

The distribution model, maintained in BD64, defines which message types go from which sender to which receiver logical system (ALE) — a model view holds the sender logical system, the receiver logical system, the message types involved, and optional filters, such as restricting distribution to plant 1000 only.

Once defined, the model needs to be distributed to the receiving system, and partner profiles can be generated directly from it. This model is required for ALE master data distribution specifically; EDI driven through output control relies on partner profiles alone, without needing a distribution model.

On the partner profile side, in WE20, the outbound parameters for a receiver partner and message type define the receiver port (set up in WE21), the basic type, and the output mode — whether IDocs transfer immediately or get collected for later. Partner profile outbound parameters define receiver port, basic type and "transfer IDoc immediately" or "collect IDocs" (sent later by RSEOUT00). For output-control-driven IDocs specifically, the message control tab also needs the application, output type and process code — for example V1, BA00, SD10.

The status sequence for an outbound IDoc typically runs: 01, created; then 30, ready for dispatch, if it was collected rather than sent immediately; then 03, passed to the port successfully. Status 30 means "ready for dispatch" — the IDoc has not left SAP yet. Status 03 means passed to the port, not that the partner processed it.

Status 02 means an error occurred passing the IDoc to the port — commonly an RFC destination issue — and is worth checking in SM58 or at the port itself. Where ALE audit or acknowledgements are in use, statuses like 12 or 41 can confirm that the IDoc was actually received or processed on the other side.

For sending and resending: RSEOUT00, scheduled as a background job, sends any IDocs sitting in status 30 waiting to be collected and dispatched. BD87 is the status monitor, and lets status 30 or 02 IDocs be reprocessed once the underlying port issue is fixed. Resending an IDoc that has already gone out — whether by copying it in WE19 or triggering the application's output again — should always be agreed with the receiving side first, to avoid creating duplicates on their end.

As an exercise, display a model view and its message types in BD64, check the outbound parameters for a partner in WE20 — its port, basic type and mode — and send a material using BD10 in a test system, following its status through WE02. By the end you should be able to configure, send and monitor outbound IDocs.

Code example

ABAP Code
* ===== Custom outbound IDoc with MASTER_IDOC_DISTRIBUTE =====REPORT zidoc_send_custom. DATA: ls_control  TYPE edidc,      lt_data     TYPE STANDARD TABLE OF edidd,      ls_data     TYPE edidd,      lt_comm     TYPE STANDARD TABLE OF edidc,      ls_comm     TYPE edidc,      ls_seg      TYPE z1projhdr.            " own segment (WE31) START-OF-SELECTION.* ===== Step 1: control record (receiver determined via partner profile) =====  ls_control-mestyp = 'ZPROJECT'.           " own message type (WE81)  ls_control-idoctp = 'ZPROJECT01'.         " own basic type (WE30)  ls_control-rcvprt = 'LS'.                 " logical system  ls_control-rcvprn = 'EXTSYS_100'. * ===== Step 2: data records =====  ls_seg-projid  = 'PRJ-2026'.  ls_seg-descr   = 'Warehouse extension'.  ls_data-segnam = 'Z1PROJHDR'.  ls_data-sdata  = ls_seg.  APPEND ls_data TO lt_data. * ===== Step 3: create and distribute =====  CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'    EXPORTING      master_idoc_control            = ls_control    TABLES      communication_idoc_control     = lt_comm      master_idoc_data               = lt_data    EXCEPTIONS      error_in_idoc_control          = 1      error_writing_idoc_status      = 2      error_in_idoc_data             = 3      sending_logical_system_unknown = 4      OTHERS                         = 5.   IF sy-subrc <> 0.    ROLLBACK WORK.    WRITE: / 'IDoc creation failed, sy-subrc =', sy-subrc.  ELSE.    COMMIT WORK.                             " IDocs are dispatched after commit    LOOP AT lt_comm INTO ls_comm.      WRITE: / 'IDoc', ls_comm-docnum, 'status', ls_comm-status.    ENDLOOP.  ENDIF. * ===== Send collected IDocs (status 30): program RSEOUT00 as job =====

Watch out

Common mistakes

  • Collect mode without an RSEOUT00 job (IDocs stuck in 30).
  • Missing distribution model entries for ALE message types.
  • Treating status 03 as "processed by receiver".
  • No COMMIT after MASTER_IDOC_DISTRIBUTE.
  • Resending IDocs without agreement (duplicates at receiver).

Do this

Best practices

  • Maintain BD64 and generate partner profiles consistently.
  • Choose immediate vs collect deliberately and schedule RSEOUT00.
  • Monitor status 30/02 regularly.
  • Commit after creating custom IDocs.
  • Agree resend procedures with receivers.

In the interview

Interview angle

Questions: "How are outbound IDocs created?", "What is the distribution model?", "IDocs stuck in status 30 — why?"
Strong answer: output control, change pointers (BD21), send programs (BD10), custom MASTER_IDOC_DISTRIBUTE + COMMIT; BD64 defines sender/receiver/message types for ALE; WE20 outbound: port, basic type, immediate or collect; status 30 waits for RSEOUT00, 03 passed to port, 02 port error; reprocess via BD87.

Practice this lesson

Quick check

0 of 3 questions attempted

Question 1 of 3

Outbound IDocs are in status 30. What does this mean?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1When would you still use IDoc instead of OData or modern APIs in S/4HANA?

2After a system restart, outbound IDocs to a partner stayed in status 30 and 02. How do you recover without sending duplicates?

Try a related Code Lab

This published exercise covers the same SAP topic. Apply the ideas in a hands-on scenario, then return to review your answers.

Open: Custom Segment Added at Wrong Hierarchy →

See it in code

Each example starts from a requirement, shows the design, then the code step by step with a plain-language explanation of every part.

Was this lesson helpful?

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.