Receive IDoc from SAP S4 to SAP Cloud Integration
Configure secure IDoc transmission from SAP S/4HANA to SAP Cloud Integration via HTTP, covering setup, testing, and troubleshooting.
Receive IDoc from SAP S4 to SAP Cloud Integration

What This Covers
This document explains the process of setting up IDoc transmission from an on-premise SAP environment to an integration flow (iFlow) running on SAP Business Technology Platform.
Architecture Overview
The setup involves configuring your on-premise SAP system to send IDoc messages to a cloud-based integration flow. The communication happens over HTTP/HTTPS, with the BTP platform receiving and processing the incoming IDoc data.
Prerequisites
Before starting the configuration, ensure you have:
On-Premise SAP System:
- Authorization for transactions: SM59, WE21, WE20, WE19, WE05
- Authorization to create RFC destinations
- Authorization for IDoc configuration (ALE configuration)
- The IDoc type you want to send must exist in the system
BTP Side:
- Active SAP Integration Suite subscription
- Deployed iFlow with IDoc Adapter configured
- iFlow endpoint URL (e.g.,
https://<tenant>.it-cpi.cfapps.eu10.hana.ondemand.com/http/idoc_receiver) - Authentication credentials (user/password or OAuth2 token)
Network:
- Firewall rules allowing outbound HTTPS traffic from SAP to BTP
- SSL certificates trusted (BTP certificate chain)
Configuration Workflow
1. BTP Side: Integration Flow Setup
Your iFlow should already be deployed on BTP with an IDoc Adapter configured as the entry point. You’ll need the endpoint URL and authentication details for the on-premise configuration.
2. On-Premise: RFC Destination Configuration
Using transaction SM59, create a new RFC destination:
Technical Settings Tab:
- Click “Create” button
- Enter a destination name (e.g.,
BTP_IDOC_HTTP) - Connection Type: Select G (HTTP Connection to External Server)
- Description: Enter meaningful description (e.g., “BTP iFlow IDoc Receiver”)
- In the Technical Settings tab:
- Target Host: Enter only the hostname from your BTP URL
Example:
mytenant.it-cpi.cfapps.eu10.hana.ondemand.com
DO NOT include
https://
- Port:
443- Path Prefix: Enter the path from your iFlow endpoint
Example:
/http/idoc_receiver
Logon & Security Tab: 6. Switch to “Logon & Security” tab 7. SSL: Set to Active 8. SSL Certificate: Select “Default SSL Client (Standard)” or your custom certificate
- Authentication Settings:
- User: Enter BTP service user (from service key)
- Password: Enter the password
- OR configure OAuth2 if using token-based authentication
-
System ID and Client: Leave empty for BTP connections
-
Save the configuration
-
Test Connection using “Connection Test” button (should show green success)
Tip: When you do connection test in SM59, it returns http error and you should see an error message in the SCI message log. This is because connection test sends just blank message and IDoc adapter expects xml structured body of IDoc. Its just mark, that connection works as it should — no infrastructure problems, no authorization problems.
3. On-Premise: XML HTTP Port Setup
Navigate to transaction WE21 to create a port configuration:
- Expand the node XML HTTP in the left tree
- Click the Create button (or right-click → Create)
- Enter a Port Name (e.g.,
BTP_XML_HTTP) - Description: Enter descriptive text (e.g., “BTP IDoc Port”)
- In the port configuration screen:
- RFC Destination: Select the RFC destination created in SM59 (e.g.,
BTP_IDOC_HTTP) - Content Type: Usually
application/xml(may be pre-filled)
- Save the configuration
This port acts as the bridge between IDoc processing and the HTTP connection to BTP.
4. On-Premise: Outbound Partner Configuration
In transaction WE20, configure the outbound processing:
-
Select Partner Type LS (Logical System) from the left tree
-
Find and select your sending logical system
- If it doesn’t exist, create it using transaction SALE (IMG → Define Logical System)
-
Double-click on the logical system to expand it
-
Navigate to the Outbound Parameters section
-
Click the Create Outbound Parameter button
-
Configure the message type:
- Message Type: Enter the IDoc message type (e.g.,
MATMASfor material master) - Receiver Port: Select the XML HTTP port created in WE21 (e.g.,
BTP_XML_HTTP) - Receiver Partner Number: Enter the receiver identifier (can be logical system name or custom value)
- Receiver Partner Type: Select LS (Logical System)
- In the Outbound Options tab:
- Transfer IDocs Immediately: Check this box (recommended for testing)
- Basic Type: Should auto-populate based on message type (e.g.,
MATMAS05) - Queue Processing: Can be left unchecked for immediate processing
- Save the configuration
Now your system knows to send IDocs of this message type through the BTP port.
5. Testing Your Configuration
Use transaction WE19 for testing:
- Enter the IDoc Type (e.g.,
MATMAS05) and click Create - Fill in mandatory segment fields with test data
- Click Control Record (EDIDC) button and configure:
- Sender Port: Can be left blank
- Sender Partner Number: Your logical system
- Sender Partner Type:
LS - Receiver Port: The XML HTTP port (e.g.,
BTP_XML_HTTP) - Receiver Partner Number: Receiver identifier
- Receiver Partner Type:
LS - Message Type: The message type configured in WE20
-
Click Standard Outbound Processing button
-
Check the status — should show success message with IDoc number
You can verify in transaction WE05 that the IDoc status is 03 (Data passed to port OK).
Monitoring and Verification
On-Premise Monitoring
Transaction WE05 provides IDoc status tracking. You can see:
- Whether the IDoc was sent
- Any error messages
- Processing status codes
BTP Monitoring
Access the BTP integration monitoring dashboard to:
- Confirm message receipt
- View processing logs
- Enable trace mode for detailed debugging
Working with IDoc Data in iFlow
Once the IDoc reaches your iFlow, you can extract specific field values using:
- Content Modifier step: Define custom properties
- Property extraction: Pull values from specific IDoc segments and fields
- This allows you to map IDoc data to other systems or transform it as needed
Troubleshooting
Common IDoc Status Codes (WE05)
- Status 03: Data passed to port OK (successful transmission)
- Status 30: IDoc ready for dispatch (not yet sent)
- Status 29: Error in ALE service (communication failure)
- Status 25: Processing with errors
Common Errors and Solutions
- HTTP 401 Unauthorized
- Check username/password in SM59 RFC destination
- Verify BTP service key credentials are correct
- Ensure the user has proper authorizations in BTP
- HTTP 403 Forbidden
- Check that the iFlow is deployed and active
- Verify the endpoint URL path is correct
- Ensure BTP service user has permission to access the iFlow
- HTTP 404 Not Found
- Verify the Path Prefix in SM59 matches the iFlow endpoint
- Check for typos in the URL path
- Confirm the iFlow is deployed to the correct tenant/space
- SSL Certificate Errors
- Import BTP SSL certificate chain into transaction STRUST
- Set SSL to “Active” in SM59
- Check that “SSL Certificate” field is set correctly
- IDoc Status 29 (Error in ALE Service)
- Check SM59 connection test — must be successful
- Verify WE21 port points to correct RFC destination
- Check network connectivity and firewall rules
- IDoc Stuck in Status 30
- Ensure “Transfer IDocs Immediately” is checked in WE20
- Check that the receiver port is correctly set
- Verify outbound parameters are complete
Debugging Tips
- Enable trace mode in BTP monitoring dashboard for detailed logs
- Use transaction WE02 to display IDoc contents
- Check SM58 for transactional RFC errors
- Review SLG1 application log for detailed error messages
- Test the RFC connection in SM59 before testing IDocs
메타데이터
- post_id
- 2cea82cf97c7
- slug
- receive-idoc-from-sap-s4-to-sap-cloud-integration-2cea82cf97c7
- url
- https://medium.com/@vbalko/receive-idoc-from-sap-s4-to-sap-cloud-integration-2cea82cf97c7
- canonical_url
- https://medium.com/@vbalko/receive-idoc-from-sap-s4-to-sap-cloud-integration-2cea82cf97c7
- author_url
- https://medium.com/@vbalko
- status
- ok
- fetched_at
- 2026-06-12 07:40:50