Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavesh_kantilal
Active Contributor

Background

Hana Cloud Integration / Hana Cloud Platform - Integration Services provides a IDoc adapter that enables you to Integrate with your back end SAP ERP system using IDoc Adapters. This blog series is a detailed startup guide for the set up tweaks required to Integrate HCI and ERP using IDocs.In this multi part series we will look at sending IDoc's from SAP ERP to HCI and vice versa.

There already exists a few blogs on SCN that covers the various individual pieces of this puzzle but the intent of this series is to collate this info from a PI Developer's perspective. Where required I will also point to additional links / references that had helped me in my journey! Due credit to those content as well.

In Part 1 (this blog), we will look at steps to trigger an IDoc from SAP ERP to HCI from the scratch using Basic Authentication.

In Part 2 - we will look at using IDoc Number to search for IDocs in HCI

In Part 3 - we will then extend this to use Client Authentication.

In Part 4 - we will look at the steps to trigger an IDoc from HCI to SAP ERP using Basic Authentication.

HCI Configuration

Description
ScreenShot

HCI Integration Flow Configuration

  • Point to Point Integration Flow with No Mapping.
  • Sender IDoc Adapter and a Receiver SFTP Adapter
  • Make sure Role Based Authentication is selected.

Sender IDoc Adapter Configuration

  • Select Adapter Type IDOC
  • Note the Message Protocol used by the IDoc adapter is IDoc SOAP
  • Provide a end point address to which the ERP system should trigger the IDoc to - in this case : /orders05 .

Receiver SFTP Configuration is like any other SFTP configuration and is not described here.

Get the End Point URL for your Integration Flow

  • Go to your Runtime Node ( IFLMAP ) --> Properties --> Services
  • Copy End Point URL

SAP ERP Configuration

Description
Screen Shot

Transaction : BD54

  • Define Logical System Name
  • You can provide any logical system name you deem fit.
  • In our case we have called the Logical System Name "HCI"

Download HCI SSL Certificate

  • Go to your HCI URL, View Certificate ( from padlock ) --> Details --> Copy to File  --> Select Default Options
  • Save the certificate to your local desktop


Transaction :STRUST

  • Go to view - SSL Client SSL Client ( Anonymous )
  • Import your HCI SSL Certificate here.
    • Click on Import Certificate
    • Select your certificate from previous step
    • Click on Add to Certificate List
  • This is required to establish a SSL connection between your SAP ERP and SAP HCI.

Transaction: SM59

  • In PI you would create a TRFC Destination, in the case of HCI as the communication happens using SOAP over HTTP you create a Connection Type G
  • Connection Type: G ( HTTP Connections to External Server)
  • Target Host: <HostName from the Endpoint URL copied from HCI>
  • Service No: 443
  • Path Prefix : /cxf/<Path in Address Field of IDoc Adapter> ( In our case the Idoc adapter had Orders05 and hence, /cxf/Orders05
  • Proxy Settings is any
  • LogOn & Security
    • Basic Authentication - Provide your HCI User & Password
    • Security Options,
      • SSL - Active
      • SSL Certificate - Anonym SSL Client ( Anonymous ) - The view where the HCI SSL Certificate was loaded in previous steps in STRUST

Transaction SM59

  • Perform a Test Connection
  • If everything is Good,
    • You should get a HTTP 500 Response
    • Response Body should contain the text referring to check HCI Monitoring for More details
    • In HCI Monitoring you should see a message with error "Unexpected EOF in Prolog"
  • If the user name / password is wrong
    • You should get a HTTP 401 UnAuthorized Error
  • If the HCI SSL Certificate has not been loaded correctly in STRUST Keystore,
    • You will get error -  ICM_HTTP_SSL_Error

Transaction WE21

  • In PI, you create a TRFC Port. In HCI, you create a XML HTTP Port as the connection happens using SOAP Over HTTP
  • Port Type : XML HTTP
  • RFC Destination : HTTP Destination Type G from Previous Step
  • Content Type - Default Setting - Text/XML
  • SOAP Protocol - Selected
    • As HCI is expecting the IDoc as a SOAP over HTTP, do ensure that SOAP Protocol is selected here. This will make sure that the message that goes out from ERP is a SOAP message.

Transaction : WE20

  • Add an outbound entry for your Logical System as per the IDoc being used.
  • In our case we are using ORDERS.ORDERS05 IDoc and hence the outbound entry will contain the ORDERS.ORDERS05 details
  • The Port will be the port created in Previous Step.

Test Your Flow

You are done! Trigger the IDoc using either your standard transaction or using We19. The IDoc should now be sent to HCI and processed by HCI.

Test Case#1 : HCI Integration Flow Executes Successfully

  • IDoc triggered using WE19

  • HCI Integration Flow Status

         

  • IDoc Status in WE02

Test Case#2 - HCI Integration Flow Fails

  • Make HCI Integration Flow Fails ( In my case SFTP Adapter is updated to have a invalid User Name )
  • HCI returns a status HTTP 500 back to SAP ERP
  • IDoc in WE02 will go into status 02 ( Failure )
  • As the Integration happens using SOAP Over HTTP this is technically a Synchronous Integration and if a HTTP 202 / 200 is not received back from HCI, SAP will mark the IDoc status as failed.

Test Case#3 - IDoc triggered in WE19 with No of IDocs to be repeated as 2

  • Single Message received at HCI.
  • IDoc XML will contain 2 IDoc tags - 1 for Each IDoc

Summary

  • HCI's IDoc adapter uses SOAP over HTTP and hence this ends up becoming a Synchronous Flow.
  • In SAP ERP,
    • Make sure your Port in WE21 is of type XML HTTP & has SOAP Protocol Enabled.
    • Make sure your RFC Destination in of Type G
  • The status of your IDoc in WE02 will be 03 / 02 depending on the status of your Integration Flow in HCI.
    • If HCI Integration Flow successful, Status = 03
    • If HCI Integration Flow fails, Status = 02
33 Comments
Labels in this area