How to receive an IDOC sent from SAP on-premise system on the SAP BTP iFlow?

Regardless of your area of expertise within SAP, whether it's HCM or PM (Plant Maintenance), you may encounter IDOCs used for various business needs. The steps outlined below can help you understand what is required to process an IDOC developed in the SAP on-premise system and consume it with the iFlow hosted on the SAP BTP. Let's get started.

Step # 1.

Create a Simple iFlow triggered via the IDOC Adapter.

See IDoc Adapter

Deploy the changes.

Step # 2.

Prepare the on-premise system to send the IDOC to BTP. Firstly, create an RFC connection to the BTP tenant where the iFlow resides or will reside. Open the SM59 transaction and create a connection of type 'HTTP Connections to External Server'. Populate the host field with the iFlow's URL created in the first step and enter the prefix into a separate field.

Refer to this Set Up an RFC Connection example for setting up an RFC connection

Switch to the 'Logon & Security' tab to provide the user and password for the iFlow, system ID, client, and ensure the SSL option is active.

Step # 3.

Open the WE21 transaction to configure the 'XML HTTP' port for BTP.

Step # 4.

Ensure that the logical system you're using to send the IDOC has added the required message to the 'Outbound' section.

Step # 5. Testing

Open transaction WE19 to generate the IDOC to be sent to the BTP iFlow.

Populate the required segment fields for the new IDOC.

Click on EDIDC, populate the required sender and receiver information, and then press the green tick button.

Press the 'Standard Outbound Processing' button after completing all preliminary activities.

Confirm the outbound of the created IDOC to the selected destination on the next screen.

If everything is successful, you should see a confirmation screen.

💡
Check the status of the generated IDOC using transaction code WE05.

Verify the created message on the BTP side on the Monitoring dashboard.

If the 'Trace' log level for the iFlow is activated, you should be able to access the IDOC's context.

How to access IDOC fields within the iFlow?

To access IDOC fields, add a 'Content Modifier' step to the iFlow and define Exchange properties. For example:

Deploy the changes and resend the IDOC to BTP. Check the created message.

Thank you for your time here today!

Read more