How to connect the SAP Business Suite to the SAP HANA Cloud Platform using Gateway as a Service Trial Edition
Update April 10th 2014: ‘Gateway as a Service’ has been renamed to ‘HCI OData Provisioning’: ‘Gateway as a Service’ is now ‘HCI OData Provisioning’
What are the advantages of using the SAP HANA Cloud Platform?
Cloud technologies offer many new concepts and possibilities to create innovative scenarios. So if for example a new business scenario has to be implemented by the corporate IT quite often the following questions have to be solved:
- How will the new scenario impact the existing systems and scenarios?
- Are the right people available – from a skills and from a time perspective?
- Is it a scenario that involves external collaboration? Is alignment with my corporate security team required?
- When is the new process expected to be ready?
As with the typical workload in the IT organization many questions cannot be answered in a sufficient way typically work-arounds will be created – that are likely to cause additional effort later…
With the SAP HANA Cloud Platform now a new platform is available to serve as foundation for developing own scenarios offering the following advantages to address the
- independent from the maintenance windows of the company’s SAP system landscape, decoupled development cycles
- independent from lengthy hardware purchasing processes
- based on open standards like Java or HTML5 which makes the recruiting of team members easier (no special skills required)
- SAP standard solutions are being used – which should make the discussion with the companies security team easier
In this blog I will show how to bring data from a Business Suite System securely into the HANA Cloud via Gateway as a Service. Everything I am showing will be based on the Developer Center and the SAP HANA Cloud Platform Trial landscape – so you are welcome to test it by yourself as well for free. For simplification reasons I am leaving out a few steps (but I will talk about them) which would be required for a productive scenario.
This demo explains how to connect a SAP Business Suite System to the SAP HANA Cloud Platform by using the capabilities offered by the SAP HANA Cloud Platform based ‘Gateway as a Service’. As a result the data of the SAP Business Suite will be available to authorized users internally and externally:
- as a REST-based service with defined interactions (update, read, delete, …)
- based on open standards (www.odata.org)
- allowing the decoupled development of additional business scenarios – still based on relevant SAP Business Suite Data for hybrid solutions
To do this inside of the Business Suite the ‘Gateway Backend Enablement’ Add-On has to be available as a minimum. It has the technical name IW_BEP.
Registering / creating users at the demo systems
SAP Developer Center for the SAP ERP Backend
At http://developer.sap.com you will find the starting page for test-driving many of SAP’s solutions. To find SAP NetWeaver Gateway please select the ‘Tools and SDKs’ section and click here on ‘SAP NetWeaver Gateway’. This will navigate you to this page: http://scn.sap.com/community/developer-center/netweaver-gateway .
Here please sign up (if you have not done it already) to access the SAP Business Suite system (‘Sign-up for SAP NetWeaver Gateway Service Consumption’). Or directly here: http://scn.sap.com/docs/DOC-40986
You will receive as a result user credentials to access a SAP ERP system which has the required IW_BEP Add-On already installed. For convenience reasons several Services are already implemented in the system – so there is no need to really access the system. The demo service we will use in this example (GWDEMO) is based on the EPM data model that is used quite often for demoing and testing (http://scn.sap.com/docs/DOC-31458).
If you want to develop an own service (which will be required most likely for an own, optimized service) please have a look at the Service Builder (which is part of SAP NetWeaver Gateway) – this tool will support you during the required development: http://help.sap.com/saphelp_gateway20sp07/helpdata/en/1b/c16e1e20a74746ad386bc10b60b6c3/frameset.htm
In this SAP system not only the IW_BEP component is installed, but additionally the complete SAP NetWeaver Gateway. This means, you can now already have a look at the service document provided by the ‘on premise’ edition of SAP NetWeaver Gateway. In order to test it please try the following link – in order to make the result more readable I added the ‘sap-ds-debug’ parameter.
A click on the BusinessPartnerCollection then directly returns a list of all available Business Partners in the system – this is a nice thing about OData: https://sapes1.sapdevcenter.com/sap/opu/odata/iwbep/gwdemo/BusinessPartnerCollection?sap-ds-debug=true
Especially with mobile devices the payload plays a role. In these cases JSON is used quite often. To receive the same content in JSON please use this link: http://sapes1.sapdevcenter.com:8080/sap/opu/odata/iwbep/gwdemo/?$format=json
And to receive a nice looking result in JSON you can of course combine both elements:
But in this blog I also want to have the service document available ‚in the cloud‘ in order to make it available externally. In addition this would reduce the required installation effort on the SAP System side – no need to install the complete SAP NetWeaver Gateway system. Installation of the IW_BEP component on the backend is the minimum requirement.
SAP HANA Cloud Platform – Trial Edition
A next step for this demo scenario is to register at the trial program from the SAP HANA Cloud Platform. This can be done from here: https://account.hanatrial.ondemand.com/
Once you are registered please go to the SAP HANA Cloud Platform Cockpit.
In order to activate Gateway as a Service the next step is to assign yourself the right authorizations in the Cockpit. To do this please navigate to ‘Authorizations’.
In the Authorization Management the next thing is to enter your user credentials from the SCN – please do not mix them up with your Account name. The Account number is ending with …trial. Your user typically is the account number without the ‘trial’.
- Account Number: p1234trial
- User: p1234
Here please assign from Account ‘gwaas’ and Application ‘gwaas’ the two roles ‘GW_User’ and ‘GW_Admin’ to your user. In a new session (important!) the newly assigned credentials can be tested by navigating to ‘Gateway as a Service’ from the ‘Services’ section in the Cockpit.
Hopefully you can now see the Administration Cockpit from Gateway as a Service. This means everything is now set up correctly and we can start with the next step, the setting up of the connectivity between the backend and the cloud.
Connecting the cloud with the Backend
In a productive environment the usage of the SAP Cloud Connector is the typical way to connect the well protected backend system with the SAP HANA Cloud Platform. You can find more details here: https://help.hana.ondemand.com/help/frameset.htm?e6c7616abb5710148cfcf3e75d96d596.html
To make this demo scenario simpler we are not using the SAP Cloud Connector now, as the SAP ERP system is already in the Internet – which is not a very likely scenario in the real life.
In the ‘Destinations’ tab please create now a new destination.
- Destination Name: in order to do so you have to assign a Destination Name. You can enter any name you want.
- Destination URL: the URL has to point to a prepared service in the backend system. This service gets provided by the IW_BEP Add-On.
The IW_BEP Add-On has to be at least on SP6 and the note 1816779 is required. With SP7 no additional note is required.
In this example please use this URL: http://sapes1.sapdevcenter.com:8080/sap/iwbep?sap-client=520
- Proxy Type: in order to connect directly (without using the SAP Cloud Connector) you have to select the Proxy Type ‘Internet’.
- Authentication Type: this has to be set to ‘Basic Authentication’. Of course in a productive scenario other authentication types should be used. In the section for the user credentials please add the username and password you received for accessing the SAP backend system from the SAP Developer Center.
That was all – after saving the setting up of the destination is finished and can be used in the next steps.
In this step we have to register the many available services from the backend system to make the service available on the cloud. This step is somehow comparable to the activity required at the ABAP-based SAP NetWeaver Gateway in the Service Activation and Maintenance transaction (/IWFND/MAINT_SERVICE).
The user, that was generated at the developer center for the SAP backend system earlier, unfortunately is not having enough authorizations to make use of the ‘Search Services’ functionality in the ‘Services’ -> ‘Register a new Service…’ -> ‘Search Services’ tab.
Luckily there is a work-around – the manual registration is working even with the missing authorizations. So please go to the ‘Register Manually’ tab and enter the missing fields. More Details are listed here: https://help.hana.ondemand.com/gateway_gwaas/frameset.htm?bcd66a91489f4da8b7b1cf36758d5499.html
- Service Name: the service name from the SAP backend you would like to expose. In our example it was GWDEMO.
- Service Description: provide a description for the new service
- Version: please enter the version number of the service
- Service Namespace: this is the namespace for the service
- Model ID: You can assign an own unique ID of the Model here.
That should be all – after registering the service we can now test the service.
Testing the Service
You can test the service either by opening the Service Document link or – more interesting – by navigating to the ‘Explore’ tab. This gives you the possibility to explore the metadata of the service and the data from the backend. There are two visualizations possible – the tabular view and the graphical view. Both help a lot to better understand how the service coming from the SAP system is organized.
Additionally a very nice feature is the possibility to browse through the backend data with the built in data browser. You can access it under the ‘Runtime’ button.
As a next step you can now leverage all the possibilities that the SAP HANA Cloud platform is offering and bring in the data coming from the SAP Business Suite in a secure way.
- Documentation HCI OData Positioning: HCI OData Provisioning
- Documentation SAP HANA Cloud Platform: https://help.hana.ondemand.com/
- SAP Developer Tools for Eclipse: https://tools.hana.ondemand.com/
- SAP HANA Cloud Platform – Trial: https://account.hanatrial.ondemand.com/
- SAP Community Network for SAP NetWeaver Gateway: https://account.hanatrial.ondemand.com/
- SAP Developer Center: http://developer.sap.com
- SAP NetWeaver Gateway Online Help: http://help.sap.com/nwgateway