— UPDATE 03.02.2017 —
The steps outlined below are no longer required. SAP HCP, API management has now a direct support for SAP HANA Cloud Connector. For more details on how to use it, check out, SAP API Management – Connecting on-prem made simple
— UPDATE —
Ever since we released SAP API Management on Trial we got some very good feedback. The scenarios to connect to an OData service, or to consume SOAP service, protect these service, … are very well received. We have started to collect all the information here,SAP API Management – Overview & Getting started
However, there is one piece missing: how can I — easily — connect to my on-prem system?
Unfortunately SAP API Management does not yet “natively” support SAP HANA Cloud Connector. We are currently working on a scalable solution. Until that (and mainly in order to get you unblocked) I want to outlined steps on how you can still use SAP API Management together with SAP HANA Cloud Connector. We will do this by using a small workaround 🙂
Since SAP API Management does not have a proxy which can use SAP HANA Cloud Connector based Destinations we will use a proxy that is created by WebIDE and used by a simple SAP UI5 app . Then SAP API Management will connect to the services used by this app and connect from there to the backend system. This is not supposed to be a productive solution, but it should be good enough for a test on HCP trial or for a POC.
With that: lets get started!
Connecting on-prem system to HCP
At first you need to install and connect SAP HANA Cloud Connector to your HCP Trial landscape. I will not go through the installation, the official documentation is here and there are also some blogs / and multi-part blogs to get you started with this.
As a result you should have a working Connectivity in your HCP Trial Cockpit:
Now lets create a Destination which can be used in WebIDE. For me the resulting destination looks like this:
Creating WebIDE Project
Again I will not outline the steps, there are plenty of good blogs out there, like:
Once you have your SAP UI5 project in WebIDE, there is one step that we need to do in order to make the setup simpler. Right now the project is protected by SAML. Since I don’t want to add the required policies in SAP API Management to enable SAML, I will just change the authentication to None.
For this open the neo-app.json and add the line
Once that is done we can deploy the application on HCP:
You will get some pop-ups to authenticate, but in the end you just need to click on Deploy.
Once the deployment is finished, you can start the active version of the application…
… and see the UI in the browser.
What we are interested in is actually not the UI, but the underlying services. So start a network trace (-> “F12 Developer tool”) and look for the call to the backend system:
This is the URL we are interested in:
via this URL we can connect to our backend system.
SAP API Management
Now we can open SAP API Management and use this URL to connect. I will use the direct route, but of course you could create a system, add resources, documentation, policies, … and all the fun stuff that SAP API Management provides.
When you now click on Save
You have the API Proxy URL that you can use to connect to your on-prem backend systems:
When you call this URL now then SAP API Management will use the service used by the SAP Fiori WebIDE project that we created, leverage the SAP HANA Cloud Connector to connect to the SAP Backend system and of course require you to authenticate there. Once you do that, you get the data from your on-prem SAP system:
That’s it! Now you can use SAP API Management to connect to your on-prem systems. I want to highlight that this setup should not be used in a productive environment — but should get you started connecting your on-prem systems to HCP Trial (without having to open ports in your firewall and installing a reverse proxy!)