Background
In Part 1 of this blog series, we looked at steps to trigger an IDoc from SAP ERP to HCI from the scratch using Basic Authentication.
In Part 2, we looked at how to use IDoc Numbers to search for IDocs in HCI Message Monitoring.
In Part 3 , we looked at how to use Client Authentication aka Certificate Based Authentication when triggering IDocs from ERP to HCI.
In Part 4 (this blog), we will look at how to trigger IDocs from HCI to SAP ERP using Basic Authentication.
Configure SAP ERP Settings
Martin Dejl in his blog SOAP for IDOC demystified has explained how you can use SOAP messages to send IDoc’s to a SAP ERP system.
Well, guess what, the HCI IDoc adapter uses the same logic. Due credit to Martin Dejl for his blog as that lays the foundation to understand how IDoc’s can be sent over SOAP protocol. Firstly, we will also look at some of the prerequisite that need to be taken care of on ECC to enable IDoc communication over SOAP Protocol.
Configuration |
Screenshot |
- Ensure SAP Note: 1487606 is implemented in your SAP ERP System. As per this note this feature is supported from SAP ERP 6.20 onwards.
- If the note is not implemented please make sure that you get this note implemented in your SAP ERP system.
|
|
System : ERP
Transaction: SRTIDOC
- Execute with the default values in the transaction with the option “Register Service” selected
- Registration should be successful with the message “Registration Successful”
- If this service has already been registered, you may get the error message – “Access Address already used for Webservice …”.
- In such a case, this step can be ignored as the SOAP Service is already registered and running.
|


![]()
|
System: ERP
Transaction: SICF
- Hierarchy Type: SERVICE & Execute
- Navigate to Default Host –> sap –> bc –> srt –> IDoc. Right Click & Test Service
- Note the URL that comes in your browser. This is the URL where your IDoc adapter in HCI needs to point. The URL will be of format,
- Do note – When you use HCI the URL can change as HCI will be accessing your ERP system from the Internet
- http or https – depending on what you network admin has allowed
- Hostname – either a Reverse Proxy / Web-dispatcher or HANA Cloud Connector Host Name etc.
- Port – either a Reverse Proxy / WebDispatcher or HANA Cloud Connector Port etc.
|


|
Configure your Partner Profile in SAP ERP in Transaction WE20
- We use the same partner that was defined in previous blog series and add an inbound entry for ORDERS05 IDoc.
|
 |
Test Configuration using SOAP UI
Before we look at how to configure a receiver IDoc adapter, lets get this working from SOAP UI considering this works using SOAP
Configuration |
Screenshot |
- Create a SOAP UI Project with any WSDL.
- In the SOAP URL, provide the SOAP URL from the previous step.
- Add the Basic Authentication in SOAP UI and add your user name / password for SAP ERP
- In the SOAP Payload, provide your IDoc XML within the SOAP Body
- The IDoc Control Record parameters that need to be populated are,
- IDOCTYP – IDoc Type
- MESTYP – Message Type
- SNDPOR – Sender Port
- SNDPRT – Sender Partner Type
- SNDPRN – Sender Partner Name
- RCVPOR – Receiver Port
- RCVPRT – Receiver Partner Type
- RRVPRN – Receiver Partner Name
- The response will be contain the IDoc Number in SAP ERP.
|

Click on image where required
|
- Submit the request now with 2 IDoc’s in the request XML
- You will see both IDoc’s are accepted and 2 IDoc numbers returned back confirming that IDoc Packaging is also supported.
|
 |
HCI Configuration
Configuration
|
Screenshot |
Integration Flow
- The Integration Flow being developed is a File to IDoc Point to Point Integration Flow.
- There is no Mapping that is being done and the input File is a IDoc XML file with all the EDI_DC40 Control Record filled in as described in the previous section
|
 |
IDoc Adapter Configuration
- As mentioned previously your host name and port will need to be provided by your Network Admin / Basis Admin as to the Host name and port accessible via the Internet by HCI.
- Make sure a Credentials with your SAP user name and password is deployed to your HCI tenant and the same is used here.
- IDoc Content Type
- Application/x-sap.idoc : This will make sure that the IDoc that is sent is processed in Exactly Once Order with an ARCKEY being added by the HCI IDoc Adapter to ensure EO processing. In this mode, IDoc Packaging is not supported
- Text/XML : This supports multiple IDoc’s in the IDoc Payload. HCI IDoc Adapter will not add the ARCKEY to the Control Record in this case.
- HCI will always add the SERIAL and DOCNUM field to the Control Record (We will see this when we test the flow)
|
 |
Test Your Configuration
Scenario |
Results |
Scenario 1
- Input File – Contains 1 IDoc XML
- IDoc Receiver Content Type: Application/x-sap.idoc
Expected Results
- IDoc sent to ECC
- IDoc Control Record Contains below fields populated by the IDoc Adapter
- Message Log in HCI will contain the ARCKEY Details and the associated IDoc Number Info
|



|
Scenario 2
- Input File – Contains 2 IDoc XML
- IDocReceiver Content Type: Application/x-sap.idoc
Expected Results
- IDoc not sent to ECC as Application/x-sap.idoc does not support IDoc Packaging
- Error occurs in HCI.
|
 |
Scenario 3
- Input File – Contains 1 IDoc XML
- IDoc Receiver Content Type: text/xml
Expected Results
- IDoc sent to ECC
- IDoc Control Record Contains below fields populated by the IDoc Adapter
- Message Log in HCI will contain the the associated IDoc Number Info
- ARCKEY will be blank in the IDoc as the ARCKEY is no more populated by the HCI IDoc Adapter
|


|
Scenario 4
- Input File – Contains 2 IDoc XML
- IDoc Receiver Content Type: text/xml
Expected Results
- 2 IDoc’s sent to ECC
- IDoc Control Record Contains below fields populated by the IDoc Adapter
- Message Log in HCI will contain the the associated IDoc Number Info
- ARCKEY will be blank in the IDoc as the ARCKEY is no more populated by the HCI IDoc Adapter
|


|
Application/x-sap.idoc vs Text/XML recommendation
- If IDoc Packaging is required, use Text/XML ( as it is the only supported way )
- If IDoc Packaging is not required,use Application/x-sap.idoc as it provides End to End Tracking of IDoc using ARCKEY.
IDoc Receiver Adapter using Client Authentication
I had blogged previously about using IDoc Receiver Adapter and Client Authentication using HANA Cloud Connector – HCI: Integrate On Premise ERP with HCI IDoc Adapter using HANA Cloud Connector & Client Authentication
In case you would like to use IDoc Receiver Adapter directly with Client Authentication but without HANA Cloud Connector, the previous blog of mine still holds true. The only difference being ,
- No HANA Cloud Connector Configuration is required.
- All the ECC Configuration remains the same.
- HCI Configuration – IDoc Receiver Adapter
- URL will contain URL of ECC ( Not HCC URL )
- Channel will have Client Authentication Selected and Private Key for Client Authentication provided.
Final Summary
With this blog and my reference to HCI: Integrate On Premise ERP with HCI IDoc Adapter using HANA Cloud Connector & Client Authentication , this blog series comes to a end. The Key Message that is required from this series is HCP-IS/ HCI uses IDoc over SOAP as its protocol for IDoc communication and this demands additional configuration / changes in your ECC as with compared to SAP PI.
Feel any info is missing? Any scenario for the IDoc adapter is not covered feel free to drop in a comment and will see if the gap can be addressed.
Hope this series was as enjoyable to read as was to blog on ๐
Thanks, Bhavesh! The blog series was indeed very helpful especially since IDOCs will only be processed via the IDOC SOAP adapter in HCI. ๐
A very slight correction on above though,
should be
Cheers!
Hello Madina,
Thanks for the feedback and catching the typo path error! This has now been updated!
Regards
Bhavesh
Hello Bhavesh,
Nice work!. Since i have few question,i hope you will help me out to clear. I have tried to test HCI with the help of A Simple HCI to SAP Cloud Connector to On-Premise Scenario
So here the Scenario is ERP SYTEM (On Premise System)<----->Cloud connector<-------> HCI
And you also explained in your blog ,you connected to HCI directly.
ERP SYTEM (On Premise System)<----->Authentication<-------> HCI
I thought to connect to ON-Premise System ,we must use Cloud connector.Could you please explain a bit about Cloud connetor: when to use and when not?
Regards
Hello Biral,
In a typical customer landscape, your on-premise ERP system will not be accessible directly via the Internet ( where HCI runs ). Due to security needs, the only way a Internet based system typically connect to a ERP system running on-premise is ,
In my blog - I have not used that - as my ERP system is directly accessible on the Internet as it is hosted on AWS Cloud. So - if you ERP system is accessible on the Internet then there is no need to use HCC or a Web Dispatcher. In a customer landscape though, this would not be the case and hence you would typically use HCC / a On-Premise Web Dispatcher.
Regards,
Bhavesh
Hi Bhavesh,
I followed this blog and tried sending data from HCI to ECC system and getting stuck with a error.
I checked with our Basis team on the web dispatcher.
They have confirmed that the Reverse Proxy is available to the ECC System and the Endpoint which i am configuring at the receiver Idoc adapter is open to internet but still i am getting this below error.
org.apache.cxf.interceptor.Fault: [IDocSoapUtils][IDocSoapProtocol][IDocSoapResponseInvalid]:IDoc SOAP generic response invalid, cause: javax.xml.stream.XMLStreamException: [IDocSoapUtils][IDocSoapProtocol][IDocSoapResponseInvalid]:IDoc SOAP generic response invalid
Any suggestion please.
I have testing this using the outbound connection test and its working fine.
Sorry for the delayed response.
Were you able to test this with SOAP UI as per my blog?
I would take your IDoc XML that is being generated in HCI and use the same in SOAP UI and see what the response is.
You can also monitor your webservice call in SRTUTIL transacation in ECC. This will provide you info with what is going wrong in ECC.. It could possibly be a data issue.
Hello Bhavesh,
Thank you for this blog series, it's really helpfull and well explained.
Hope to see more blogs/guides regarding HCI - maybe about creating new adapters?
Regards,
Mark
Thanks for the feedback Marek. I am still trying to figure out the new site and had not received the comment notification as an email ๐
For custom adapter creastion, I would suggest 2 options,.
Thank you Bhavesh again for your answer. I've already made OpenSAP course for HCI, but still I'd like to find more information. This blog series looks very promising and I hope to improve my knowledge.
Regards,
Marek
Hello Bhavesh,
In IDoc Adapter Configuration, the proxy type is "Internet", have you tried with "On-Premise" ? Somehow this isn't working via SAP Cloud Connector and always give "unknowhnhostexception". It seems to be working only with a public URL and ignoring the proxy type.
Regards,
Parag.
Hello Parag,
If you are using HANA Cloud Connector, I would suggest you look at my blog : https://blogs.sap.com/2016/03/30/hci-integrate-on-premise-erp-with-hci-idoc-adapter-using-hana-cloud-connector-client-authentication/
You can ignore the steps to do with Client Authentication but remaining steps will hold good.
From your error it seems the hostname you have used is not what you have maintained in HCC.
Regards,
Bhavesh
Hi All,
my scenario is SOAP to IDOC On-premise scenario using Hana coud connector.
i'm trying to post a standard idoc to ECC.
Iflow is deployed successfully but when the message is triggered it gets failed
Hi,
We are able to post data to GSAP successfully using the soap URL as per the steps and we are getting the idoc number in the response in the below format.
Query: Is there any way where we can get more details on the gsap IDOC status back on the processing, along with the IDOC Number (Status like 60, 64 or IDOC Metadata, etc.).
Thanks in advance,
Vikas Kerehalli
Thanks for the blog, it was very helpful to us. One note Iโd like to add is that if you want to use a dedicated service user representing SAP CPI to connect to the SAP ECCbackend system, it is important that in one of the roles assigned to this user (for example role: SAP_XI_APPL_SERV_USER), the additional authorization object B_ALE_REC is added to it. (See also note: 1487606 โ IDoc inbound processing via HTTP/SOAP)
If the dedicated service user does not have this authorization object B_ALE_REC assigned, the Idoc-SOAP web service in SAP ECC that listens on http://host:port/sap/bc/srt/idoc?sap-client=<clientnumber>; will respond with a http 500 error like below after posting an SOAP Idoc using a tool like SoapUI:
or like this:
ย
Hi Bhavesh,
Thanks for the detailed blog.
I am a newbie to CPI
I followed this blog and tried sending data from CPI to the ECC system and getting stuck with the below error.
"com.sap.sod.utils.idoc.soap.protocol.IDocSoapProtocolException: [IDocSoapUtils][IDocSoapProtocol][IDocSoapNamespaceInvalid]:Invalid IDoc SOAP namespace received"
I checked the error in ECC with SRTUTIL t-code and the error is "No Web service configuration for this access path: "/sap/bc/srt/idoc?sap-client=130"
But this path has been configured under resources available in CC and tested as well.
I don't see any connection issues as well.
I have attached my IDOC XML.
Please let me know if I am missing something.
Regards,
Pavan
Hi Bhavesh,
Thanks a lot for the detailed blog.
Please can you let me know the configuration required to exchange IDOC information between CPI and S4 HANA On-Premise..
Hi Bhavesh,
I have followed your blog to post IDoc in S4.
I am able to post IDoc using SOAP UI but when trying to post the same payload using CPI then getting below error:
org.apache.cxf.transport.http.HTTPException: HTTP response โ409: input_not_correctโ when communicating with http://s4s.onpr:4400/sap/bc/idoc_xml?sap-client=101
ย
The payload is as below.
Hi,
I am trying to post IDOC in S4 using CPI, IDOC is getting successfully created except for a certain specific segment not getting created. On logging the output in CPI, segment is visible in payload xml in CPI monitoring but getting lost in S4.
Any suggestion on what could possibly be causing this issue would be helpful.
Thankyou!