Skip to Content
Author's profile photo Shilpa Vij

Blog Series- API Providers: Part 2: Cloud Connector as a bridge connecting SAP API Management and On-Premise System

One of the simple way of connecting SAP API Management to any of the On-premise back-end system is via cloud connector. Here with this blog you will be able to connect SAP API Management to your backend (ABAP System) via cloud connector.

Clod Connector Overview

The SAP Cloud Platform cloud connector (cloud connector) serves as the link between on-demand applications in SAP Cloud Platform and existing on-premise systems. The cloud connector runs as on premise agent in a secured network and acts as a reverse invoke proxy between the on-premise network and SAP Cloud Platform. Due to its reverse invoke support, you don’t need to configure the on-premise firewall to allow external access from the cloud to internal systems

To know more on SAP API Management, refer

https://blogs.sap.com/2016/03/03/sap-api-management-overview-getting-started/

In this blog I have taken an example of my hanatrial account for SAP API Management and EOP as a backend(ABAP) system

 

Let’s get started!

 

For Downloading and configuring cloud connector refer

https://blogs.sap.com/2015/02/11/set-up-your-sap-web-ide-on-hana-cloud-part-2/

 

Open cloud connector on your browser;following screen should come up

Enter User name and password to login as Admin which you have changed as per above link

Click on Add Account to add an account

 

 

Fill in the appropriate details as shown below for your account

Here for SAP API Management I have taken example of my hanatrial account

 

 

Under Account Dashboard; Account should be added

As I have added my hanatrial account as host so my hanatrial account should be added as shown below

Now we will be adding the On Prem system for eg ABAP system

Click on Cloud To On-Premise

 

Add Backend System as ABAP and Click Next

Select Protocol as HTTPS and click Next

 

Add host and port of Back end System and click Next.

In Virtual Host and port don’t put the same name and port as above

 

Select Principle Type as None and Click Next

Check the summary, select internal host checkbox and select Finish

System should get added

Click on Add button under Resources Accessible to add url path as”/” this is to consider all the resources after “/”

With this we have configured our back-end system and now we will check in SAP API Management whether we are able to discover the odata services from back-end system

Let’s start!

Open SAP Cloud Platform Cockpit from where I can see under Connectivity – Cloud Connectors the successful connection to the on-prem system.

That’s All you need. Now let’s go to API Portal

Services->click on API Management Tile->click on Access API Portal.

Click on Develop and Navigate to API Providers

Create API Provider

Fill the following details

Navigate to Authentication and give backend system details

In my case I am connecting to ABAP Backend system and client is 005 and hence catalog URL looks like

Note:Once we create API Provider the corresponding destination automatically  gets created with the same name

Next we create a API Proxy for a service coming from the on-premise backend system. Give API Provider as “Demo” and click on Discover. All the Odata services will be listed. Click on any one and save it.

Created API should get saved.

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Thrilochana Rajappa
      Thrilochana Rajappa

      Thanks for the detailed steps Shilpa.

      Author's profile photo Damien Wieser
      Damien Wieser

      Hello Shilpa,

       

      In order to connect my on-premise SAP Gateway, I followed your Steps but the discovering of services ends allways with the following error :

       

       

      The tutorial learning for connecting the sapes5.sapdevcenter.com Gateway and the discovering of services works well !

      The Services of my on-premise Gateway can all be reached over destinations from WebIDE so I can say that the connection between connector & Gateway works well too !

       

      Thank you for your hint 🙂

       

       

       

       

      Author's profile photo Daniel Endres
      Daniel Endres

      Hi Damien,

       

      where you able to resolve that issue.

      I'm facing the same problem. Connections work fine but while trying to Discover the API Services i get the exact same message.

       

      Thanks and best regards,

      Daniel

      Author's profile photo Christoffer Fuss
      Christoffer Fuss

      I have the same issue. WITH HTTP it is working but not with HTTPS. Has aynbody solved this issue??

       

      Best Regards,

      Chris

      Author's profile photo Michael Kaufmann
      Michael Kaufmann

      Hi Shilpa,

      I try to add an API Provider in API Management which is one of our ABAP-backends

      as we have multiple Cloud Connectors for different on-prem systems I learned firstly one have to know the Location ID of the CC he wants to use ?

      second question which user credentials did you add in your step "Navigate to Authentication and give backend system details" ?

      is it right that for every created API provider a destination is added ?

       

      Regards,

      Michael

       

      Author's profile photo Shilpa Vij
      Shilpa Vij
      Blog Post Author

       

      Hello Michael,

      Yes, now we have this feature of adding location ID for cloud connector.

      In API portal you have to give backend credentials of your ABAP backend system.

      Yes you got it right, for every API provider a destination is added in cockpit.

       

      Regards

      Shilpa

       

      Author's profile photo Michael Kaufmann
      Michael Kaufmann

      Hi Shilpa,

      thanks for your answers!

      Do I need a location ID for CC in the API provider settings anyway ? Because we have several CCs but we did not set up location ID there ...

      And regarding the API provider destination added in the cockpit - I am a little bit confused because the destination in our case has Authentication : "BasicAuthentication" and the credentials of a user we never put in there ... and I can hardly believe this was done automatically by the system (?)

      Regards,

      Michael

       

      Author's profile photo Sathish Kumar
      Sathish Kumar

      Hi Shilpa,

      Thanks for the blog. I followed the steps to connect an On-premise system within SAP Corporate Network and am getting an Unauthorized error. What am I missing?

      Author's profile photo Florian Bähler
      Florian Bähler

      I have the same issue. The Conditional Flow for your service collection does not include HEAD method in API policies. It can be added if the OData backend offers the method

      Author's profile photo Florian Kekule
      Florian Kekule

      Hello Shilpa,

      at first thanks for this really helpful blog.

      I am facing an issue. When setting up the API provider to connect to the service catalog of our gateway system and testing the connection I can see following error:

      System is up and reachable. However, the HTTP HEAD call responded with status code: 405; Message: Method Not Allowed

      I already checked with our BASIS colleagues to check the cloud connector settings but they weren't able to help me. Do you know what could be the issue?

       

      Thanks in advance and best regards,

      Florian

      Author's profile photo Shilpa Vij
      Shilpa Vij
      Blog Post Author

      Hello Florian,

      As per the error, the operation is not supported.For example :

      If your resource is sales order and it does not support "POST" this error comes. And also the make sure the client is correct.

       

      Regards

      Shilpa

      Author's profile photo Florian Kekule
      Florian Kekule

      Hello Shilpa,

      thanks for your hint. Although we are getting the error mentioned we can select the Service from the catalouge.

      Sadly i am experiencing another issue. After creating the API (with SAP GW as API provider) I want to test the API with the test tool implemented on API management. I am receiving following error in the response body.

      URL called: https://******.apimanagement.hana.ondemand.com:443/****_****_EXPENSE_SRV/****Set

       

      Error in response body

      {
      “fault”:{
      “faultstring”:“Unable to identify proxy for host: ******.apimanagement.hana.ondemand.com:9448 and url: \/****_****_EXPENSE_SRV\/****Set”,
      “detail”:{
      “errorcode”:“messaging.adaptors.http.flow.ApplicationNotFound”
      }
      }

       

       

      Somehow the error shows that the requested port in host switched from 443 to 9448 and the url slashs are escaped…

      Do you have an idea what could be the issue?

       

      Thanks in advance and best regards,

      Florian

      Author's profile photo Saurabh Jog
      Saurabh Jog

      Hi Florian,

      We are facing the same issue. Could you please share the solution in case you were able to fix it?

      Thanks,

      Saurabh

      Author's profile photo enio ferreira
      enio ferreira

      Hi All,

      I have an error trying to create a new API, have you ever had the same error?

      Error: The server encountered a temporary error and could not complete your request. [Request ID: 7f7d0470-ee78-4658-90b3-0334034b1981]

      Author's profile photo Nichol Davis
      Nichol Davis

      Hi Shilpa,

      How would i do a post call to GW via apim? Is there a way to by pass x-csrf-token? Is there a way to use on prem system in service call out?

       

      Regards,

      Nic

      Author's profile photo Mattias Johansson
      Mattias Johansson

      Nichol Davis Did you get this to work? I'm also trying to call an on prem system through cloud connector, but cannot get it to work and don't find any logs.