We’re experiencing critical issues with quality inspection lot data not reaching our MES system from S/4HANA 2020. The IDoc QMINSPORDER isn’t being delivered to the MES inbound queue.
Our IDoc port configuration looks correct:
Port: SAPMES01
RFC Destination: MES_RFC_DEST
IDoc Record Type: Pass Through to Port
Partner profile WE20 is configured for message type QMINSP with process code ZMES_INSP. However, inspection lots created in QM show status 03 (data passed) in WE02, but MES team confirms no data arrives.
Production release delays are mounting as operators wait for inspection instructions. We’ve checked SM58 for RFC errors - nothing there. The MES inbound queue monitoring shows zero messages received in the last 48 hours despite 47 inspection lots created.
Is there a specific configuration step we’re missing for quality-MES integration?
You mentioned the RFC connection tests successfully in SM59, but have you checked if the RFC user has the proper authorizations on the MES side? Also, in your port definition WE21, verify the ‘IDoc Record Types’ setting. For external systems, it should typically be ‘EDI compatible’ not ‘Pass Through to Port’.
Another thing - check transaction SALE and verify your logical system is properly configured in the distribution model. The IDoc might be getting created but not distributed if the logical system configuration is incomplete.
I found your issue - you’re using Pass Through to Port in WE21, which is incorrect for MES integration. Let me walk through the complete fix addressing all three critical areas.
IDoc Port Configuration (WE21):
Change your port SAPMES01 settings:
Port: SAPMES01
RFC Destination: MES_RFC_DEST
IDoc Record Type: EDI compatible (NOT Pass Through)
Version: SAP Release 4.x or higher
Pass Through is for file ports, not RFC destinations. This causes IDocs to be marked as processed without actually sending them.
Partner Profile Setup (WE20):
Verify your outbound parameters include:
- Message type: QMINSP
- IDoc type: QMINSPORDER01
- Process code: Leave BLANK for outbound
- Port: SAPMES01
- Output mode: Transfer IDoc immediately
- Basic type: QMINSPORDER01
The process code ZMES_INSP should only be on the INBOUND side (if you’re receiving confirmations back from MES).
MES Inbound Queue Monitoring:
On the MES side, ensure:
- The RFC server program is registered and listening (check gateway using SMGW in SAP)
- MES has an IDoc listener service running on the expected RFC destination
- Check MES application logs for connection attempts from SAP
The key issue is the IDoc Record Type. Change it to EDI compatible and restart the RFC connection. Then create a test inspection lot and monitor in WE02 and WE05. You should see the IDoc transition through statuses correctly and actually reach MES.
If you’re using middleware (SAP PI/PO), you’ll also need to verify the sender IDoc adapter is configured to pick up QMINSPORDER from your logical system. But fix the port configuration first - that’s your primary blocker.
After making these changes, use transaction BD87 to reprocess any stuck IDocs from the past 48 hours so your 47 inspection lots get sent to MES.
I’ve seen this exact scenario. The problem is usually that the IDoc is being sent but the MES middleware isn’t acknowledging receipt. Check if your MES system has an IDoc receiver adapter configured and running. Also look at transaction WE19 - try manually sending a test IDoc to see if it reaches MES. If the test works but production doesn’t, you might have a filter issue in your partner profile that’s silently dropping certain inspection lot types.
Check your partner profile outbound parameters in WE20. For MES integration, you need both the message type and the IDoc type correctly mapped. Also verify the RFC destination is actually pointing to your MES system - use SM59 to test the connection.
Status 03 in WE02 means the IDoc was processed successfully by SAP, so the issue is likely in the outbound communication layer. Check transaction WE21 to verify your port definition includes the correct RFC destination and that it’s set to ‘immediate processing’ not ‘collect IDocs’.