Skip to Content
Author's profile photo Martin Bachmann

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
topics:

  • 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.

Demo 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

  /wp-content/uploads/2013/09/gwaas_1_276181.jpg

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.

Hands-on Exercise

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.

http://sapes1.sapdevcenter.com:8080/sap/opu/odata/iwbep/gwdemo/?sap-ds-debug=true

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

/wp-content/uploads/2013/09/gwaas2_276218.jpg

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:

http://sapes1.sapdevcenter.com:8080/sap/opu/odata/iwbep/gwdemo/?$format=json&sap-ds-debug=true

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.

/wp-content/uploads/2013/09/gwaas3_276219.jpg

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’.

/wp-content/uploads/2013/09/gwaas4_276220.jpg

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

/wp-content/uploads/2013/09/gwaas5_276224.jpg
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.

/wp-content/uploads/2013/09/gwaas6_276225.jpg

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.

Destinations

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.

/wp-content/uploads/2013/09/gwaas7_276226.jpg

       
That was all – after saving the setting up of the destination is finished and can be used in the next steps.

Services

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.

/wp-content/uploads/2013/09/gwaas8_276227.jpg

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.

/wp-content/uploads/2013/09/gwaas9_276228.jpg

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.

/wp-content/uploads/2013/09/gwaas10_276229.jpg

/wp-content/uploads/2013/09/gwaas11_276230.png

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.

/wp-content/uploads/2013/09/gwaas12_276231.jpg

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.

Additional Information

Assigned Tags

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

      Hi Martin,

      this is a very useful blog, thank you for taking the time to publish it.

      Question, it is common good practice to physically locate servers which interact with an ECC based system and/or a Java stack as physically close to each other as possible to avoid potential problems with delays caused by latency.

      11 years ago I worked on a SAP Portal project (EP5 and PDK) where the Portal was in Canada and the SAP R/3 (there was no ECC in those days)  was in Germany and because of network delays between the Portal and R/3 we had to put [waits] in the code on the Portal side to compensate for the delay in the R/3 system responding.

      Do you or anybody else know of mitigations which will be in place to reduce or avoid latency issues between on-premise and the cloud ?

      The alternative I can foresee is to some extent in the Hana Cloud there will be data replication and persistency periodically sychronised with the on premise.

      All the best,

      Andy.

      Author's profile photo Chris Paine
      Chris Paine

      Hi Andy, with SAP HANA Cloud platform sites all over the world there _shouldn't_ be any significant latency. Will be interesting to see if this is the case though, as given use case is to transport data for consumption on internet (potential by mobile devices) latency will be a particularly important point.

      Author's profile photo Andy Silvey
      Andy Silvey

      Hi Chris,

      yep, this is an interesting 'watch this space' question.

      All the best,

      Andy.

      Author's profile photo Martin Bachmann
      Martin Bachmann
      Blog Post Author

      Hello Andy,

      thanks for the interesting feedback!

      Here my thoughts on this - first of all I think that any unrequired replication of data should be avoided. So when possible using a single source of truth helps to avoid additional problems with databases running out-of-sync - but yes, in some cases it cannot be avoided.

      With the architecture that I explained above you are developing the OData Service directly in the ABAP business suite - optimized for your individual use-case. So you would only create an interface / service with the required fields -> only e.g. 10 fields instead of 500 fields of a generic API / Service. This reduces the time spent in the backend also massively - you can program optimized.

      In addition the usage of JSON is reducing the payload - though latency would not be massively affected by this.

      We also just released some guidelines about 'Performance Best Practices': http://help.sap.com/saphelp_gateway20sp07/helpdata/en/39/11d351e2fff33ae10000000a44176d/frameset.htm

      Additionally there is ACCAD (even if I have never seen it together with OData): http://help.sap.com/nw-accad

      Hope this helps,

      Martin

      Author's profile photo Mikael Gurenius
      Mikael Gurenius

      In a 'mobile first' approach, you should always expect high latency and slow connections; design your application for it from the start.

      Use techniques for asynchronous calls to the backend data where you don't block the UI.

      Author's profile photo Syambabu Allu
      Syambabu Allu

      Excellent Blog.

      Thanks,

      Syam

      Author's profile photo Former Member
      Former Member

      Very good blog.

      A question, when i try to put my user, i don't see the application gwaas, do you know why.

      I have a trial version of Sap hana cloud paltform.

      Thanks for your help.

      Author's profile photo Syambabu Allu
      Syambabu Allu

      Hi Nicolas,

      You should create your own application in dashboard with using SAP GW Services as provided by SAP Sample GW Services.

      Thanks,

      Syam

      Author's profile photo Rahul Muraleedharan
      Rahul Muraleedharan

      Thanks for sharing the information! Really wonderful blog...

      Author's profile photo Vijay Vegesana
      Vijay Vegesana

      Thanks Martin, very helpful...

      Thanks,

      Vijay

      Author's profile photo Mikael Gurenius
      Mikael Gurenius

      Any chance I can publish Fiori-scenarios using Gateway as a Service?

      Author's profile photo Christian Stemmer
      Christian Stemmer

      Hei Martin,

      when I try to open the service document in the browser I receive this one:

      <error><code/><message xml:lang="en">Forbidden</message></error>

      Do you know what I am missing?

      Thanks

      Author's profile photo Chris Paine
      Chris Paine

      I just noticed the connection from GWaaS to the trial GW stack is using basic auth and HTTP connection. Although there is a caveat " Of course in a productive scenario other authentication types should be used." one would have thought that this was bad enough practice in any system. (I'd almost expect the HCP to disable this option, but it might be useful for debugging of issues.) Perhaps at the very least adding a warning if selecting unsecure authentication, might be added to the backlog as something to address in a future release?

      Cheers!

      Author's profile photo Former Member
      Former Member

      Hi Martin,

      I am trying to get the service from an on-premise (ERP)system using HCI OData Provisioning. I did not used SAP Gateway.  I have configured SAP Cloud Connector, created Destination and Services. When I test the Service, I am getting the Service document also. In the explore tab, I got the metadata as well. But when I click the Runtime button, I am not getting any value.

      I have attached the screenshot also.

      Please help.

      Regards,

      Dhani.

      Screen Shot 2015-03-03 at 12.49.31 pm.png

      Author's profile photo Prakash Saurav
      Prakash Saurav

      Great document ! I was about to as that I am unable to see GaaS even after adding the roles.

      And then I saw these golden words

      'Gateway as a Service' is now 'HCI OData Provisioning'

      Author's profile photo Former Member
      Former Member

      Hi Martin

      I get as far as the step to register manually but on my system there is no register manually tab. Is this a feature that has been removed since you created this guide?

      My destination tests ok.

      Under Configure HCI OData Provisioning if I go to trouble shooting I see a message ERROR - Service Name = REPOSITORYSERVICE, Service Namespace = RESERVEDFORSAPIGW Description = Could not find Source Services for the destination

      Can you advise?

      Thanks

      Cliff