Skip to Content

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
    • ARCKEY
    • SERIAL
    • DOCNUM
  • 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
    • SERIAL
    • DOCNUM
  • 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
    • SERIAL
    • DOCNUM
  • 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 🙂

    To report this post you need to login first.

    12 Comments

    You must be Logged on to comment or reply to a post.

    1. Madina Shiela Andres

      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,

      • Navigate to Default Host –> bc –> srt –> IDoc. Right Click & Test Service

      should be

      • Navigate to Default Host –> sap –> bc –> srt –> IDoc. Right Click & Test Service

      Cheers!

      (0) 
    2. Biral Gajjar

      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

      (0) 
      1. Bhavesh Kantilal Post author

        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 ,

        • Use a Web Dispatcher on premise in the DMZ that acts as the entry point for HCI.
        • Use a HANA Cloud Connector that acts as a Reverse Invoke Proxy.

        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

        (0) 
    3. naresh Kumar

      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.Idoc receiver connection test.PNG

      (0) 
      1. Bhavesh Kantilal Post author

        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.

        (0) 
    4. Marek Piotrowski

      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

      (0) 
    5. Marek Piotrowski

      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

      (1) 
    6. Parag Jain

      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.
       

      (0) 
    7. Rajesh Gharpure

      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

      Message processing failed.
      org.apache.cxf.binding.soap.SoapFault: E/EA/719/E1FIKPF (The control record must begin with <EDI_DC40 segment=”1″> instead of E1FIKPF)
      Kindly help.
      Thanks in advance. 🙂

       

      (0) 

    Leave a Reply