Very recently a customer wanted me to demonstrate the full integration of iDocs coming from S/4HANA with other systems, using the SCP Integration Suite.
In this post, I will show you how to configure your S/4HANA system and create an integration flow in SCPI to perform this. The integration flow I will create will be very simple, getting an iDoc from a S/4HANA system of Master Data Customer information, using DEBMAS, and I will push this data on a SFTP system hosted in Google Cloud.
First, let’s configure our S/4HANA system. We need to define the SCPI logical system. We’ll use transaction BD54 and simply define it here.
Next we will go in transaction SALE to create a distribution model and message type.
First create the model, then create a message type.
For the message type, the model view will be the one we just created, the sender will be our S/4HANA system, the receiver will be our SCPI logical system that we just created in BD54 and the message type will be the one I decided to use in this demo – DEBMAS.
Now we need to define the trust between our S/4HANA system and our SCPI system. For that will import our certificates. Go to your SCPI system. Click on the certificates and export the 3 levels of certificates using Base-64 encoding to files.
You now have the three certificates, ROOT, CA and HCI certificates. Go back to your S/4HANA system and launch STRUST transaction.
Click on SSL Client Anonymous, import the 3 certificates, one by one and each add them to the certificate list.
Now we can configure our RFC Connection to SCPI with transaction SM59, create a new one in HTTP Connections to External Server.
In the technical Settings, we will give information about our SCPI host, the port will be 443 for HTTPS and the prefix will be whatever you will need for your iDoc, in my case, I am using DEBMAS so I used this : /cxf/debmas05.
You will also define this in SCPI, so exactly use the same deploy URL.
In the Logon & Security Tab, define your authentication method and also select anonymous SSL for secure protocol :
You could test you connection here, but since we didn’t create the Integration flow, we will do that afterwards.
Next we need to create the Port for our iDoc processing, we will use transaction WE21, click on XML HTTP and create a new port. Use the settings in the following screenshot.
Hold on, we’re nearly there! 🙂
Now we need to create a partner profile, for that use transaction WE20, click on Type LS and create a new profile. Give it a name. Define an agent and then add an Outbound Message by clicking the add button for outbound parameter.
Choose the message type, for me it is DEBMAS, choose to pass the iDoc immediately and define the iDoc basic type, here I am using debmas05
Now that’s it for all the configuration on the S/4HANA part! Well done! 🙂
Heading to SCPI for designing the integration flow, we’ll do something very basic. I’ll just get the iDoc for S/4HANA, add some information and save it back to my SFTP server in Google Cloud.
Remember when we defined the path prefix in SM59 RFC destination, here I entered just the last part, the cxf will be added automatically. I also won’t go into the details of how I set up the SFTP part. Now I can deploy this Integration flow. Once it is done, I could also go back to SM59 to test the connection but I’ll test the whole thing but sending an iDoc directly.
Going back to my S/4HANA system, I will use transaction BD12. Select the customer information you want to send, choose DEBMAS for the output type and as a target, the Logical System we defined at the very first!
You’re ready to EXECUTE! ^_^
You should see the following :
Going to SCPI to see if everything went fine, we head into the Message monitor.
The message was correctly processed.
You could also verify that by using transaction WE05 in the S/4HANA system.
If we check our destination SFTP system.
The iDoc was sent to our SFTP system.
Hope this blog was helpful. Don’t hesitate to drop a comment.
All the best.