AdvancedSAP ECC / S/4HANAPP ALE / IDoc Integration

IDocs for SAP PP: LOIPRO, LOIROU and PORDCR Configuration and Monitoring

Question
idoc for sap pp

Also searched as

  • LOIPRO IDoc
  • LOIROU IDoc routing
  • PORDCR IDoc process order create
  • sap pp production order idoc configuration

Short answer

SAP PP exchanges production data with other systems such as an MES or APS through ALE IDocs. Message types commonly met are LOIPRO for production and process orders, LOIROU for routings and PORDCR for creating process orders. The setup is the usual ALE chain: logical system, port, partner profile, distribution model and monitoring in WE02 and BD87.

Applies to: SAP ECC 6.0 and S/4HANA on-premise; exact basic types and availability depend on release, so confirm in WE81/WE30 before building

How to configure and monitor PP IDocs

  1. 1Confirm the message type and basic type you need: check WE81 (message types) and WE30 (IDoc types) for the PP types in your release.
  2. 2Create the logical systems and RFC destination for the partner (SALE, SM59) and a port (WE21), for example a tRFC or file port.
  3. 3Create a partner profile in WE20 with the message type, process code and the processing mode: immediate or collected, with a trigger.
  4. 4Define a distribution model in BD64 with the sender, receiver and message type, and generate partner profiles if needed.
  5. 5Test an outbound document using WE19 or by triggering the business event, then see the IDoc in WE02 (list) or WE05.
  6. 6For inbound, assign the process code (WE42) and function module (WE57) and enable the correct authorization and user.
  7. 7Reprocess failed IDocs with BD87 after fixing the cause, and set up a monitoring job or alert for status 51 and 02 errors.

Which IDocs belong to PP

LOIPRO carries production or process order data out of SAP, typically to an MES or a scheduling system, and is generally paired with a trigger on release or change of the order. LOIROU carries routing data. PORDCR creates process orders from an external request, and is used in process industry set-ups.

Others exist for BOMs, materials and work centers (for example BOMMAT and MATMAS). Confirmations from the shop floor commonly arrive by BAPIs or interface-specific inbound types rather than a standard IDoc, so check what your integration partner actually sends.

Treat the names above as pointers, and confirm basic types and segments in WE60 for your release before you design the interface.

Configuration chain

ALE configuration follows the same pattern for any message type: logical system names (SALE), RFC destinations (SM59), ports (WE21), partner profiles (WE20) and the distribution model (BD64). Errors almost always come from one link in that chain, such as a missing partner profile entry for the message type or a wrong process code.

For outbound PP data, the trigger is often a change pointer or output determination. Check that the message type is active for change pointers (BD50, BD52) if the interface depends on them, and that the batch job RBDMIDOC runs.

Monitoring and error handling

WE02 and WE05 show IDoc status. Outbound problems commonly show as status 02 (error passing data to port) or 29 (ALE service layer error). Inbound problems show as status 51 (application document not posted). Fix the cause, then use BD87 or WE19 to reprocess.

Most 51 errors in PP are data problems: missing material in the plant, a closed period or a missing production version. See the status 51 page for general handling.

Build a daily check that counts IDocs by status and message type. A growing count of 51 or 02 is the earliest warning sign of a broken interface.

WE02 / WE05  IDoc lists and display
WE19         Test tool
WE20         Partner profiles
WE21         Ports
WE42         Inbound process codes
BD64         Distribution model
BD87         Status monitor and reprocessing

Try it here, free

SAP IDoc Partner Profile (WE20) Setup Template

Open full tool

A fill-in setup sheet for WE20 partner profiles, WE21 ports and the inbound and outbound parameters behind each IDoc partner.

Common pitfalls

  • !Assuming IDoc names from forums without checking WE30 and WE81 in your release.
  • !Setting up the partner profile but not the distribution model, so nothing is sent.
  • !Reprocessing in bulk without fixing master data, which only recreates the same errors.
  • !Leaving the collect and send job unscheduled so outbound IDocs wait at status 30.
  • !Using a dialog user that is later locked for the inbound processing user.

How an ERP-grounded AI assistant handles this

Integration teams spend most of their time finding why a specific IDoc failed and which data it refers to. Netray's ERPray can run this kind of lookup in plain language against your own SAP system, read-only by default, showing the query it ran and respecting SAP authorizations, with the model served on your own hardware when the system is on-prem. It explains and finds the data; it does not replace configuration decisions or post documents without human approval.

Frequently asked questions

What is LOIPRO in SAP?

LOIPRO is the message type used to send production or process order data from SAP, typically to an external execution or scheduling system. Confirm its basic type and segments in WE30 for your release.

How do I resend a failed PP IDoc?

Fix the cause, such as the missing master data, then reprocess with BD87 for inbound errors. For outbound, use WE19 or re-trigger the document, after checking port and partner profile settings.

Which transactions monitor IDocs?

WE02 and WE05 list and display IDocs, BD87 shows a status monitor and reprocesses, and WE19 is the test tool. SM58 shows stuck tRFC calls on outbound ports.

Do I need IDocs, or can I use BAPIs?

Both work. IDocs suit asynchronous, queued exchange between systems, while BAPIs and APIs suit synchronous calls. Many modern interfaces use APIs or the SAP Integration Suite instead.

Related

Error fix

SAP IDoc Status 51: Application Document Not Posted

Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.

How-to

Teamcenter to SAP BOM transfer: why releases fail and how to fix them

Most failed Teamcenter to SAP transfers come from order and master data problems: the BOM was sent before its materials existed, a unit of measure or plant is missing, the SAP change number or status does not allow the update, or a mapping produced a value SAP rejects. Read the SAP-side message first (IDoc status, application log, BAPI return), then correct the Teamcenter data or the mapping.

How-to

How to Use BAPI_TRANSACTION_COMMIT Correctly

SAP's BAPI programming model separates business logic from the database commit on purpose, so a caller must explicitly call BAPI_TRANSACTION_COMMIT after a successful BAPI - usually with WAIT = 'X' - or the created object never actually persists. Skipping this step, or forgetting WAIT, is the most common reason a BAPI 'runs fine' but nothing gets saved.

Error fix

SAP M7 021: Deficit of SL Stock Quantity

M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.

Error fix

SAP Short Dump TIME_OUT: Maximum Runtime Exceeded

A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.

How-to

How to Read MD04 Exception Messages in SAP

The exception indicator in MD04 flags procurement elements whose date or quantity no longer matches the current demand situation - it is SAP's built-in change signal, read element by element in the detail screen, not just the header icon. Triage by exception group first, then decide to reschedule, cancel, or accept each one.

AI for ERP

AI Agents for SAP Production Planning, MRP, and Exception Triage

AI agents that triage SAP MD04 exceptions, explain predictive MRP shortages, and draft planned-order actions, grounded on your own SAP data, deployed on-prem.

Stuck on SAP ECC / S/4HANA?

Talk to engineers who work inside SAP ECC / S/4HANA every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP