Skip to Content

Accessing HANA XS OData in Web IDE and beyond

THIS BLOG POST IS FROM 2015 where there were some issues in the SAP Cloud Platform TRIAL edition. Everything works now like a charm!

And just to be clear: everything which involved on-premise SAP HANA + Cloud Connector always worked!!!

Hello everybody,

here I’d like to share what I have learned while trying to access a HANA XS OData service in our SAP Web IDE (cloud) trial edition. I’ve have been asked by several people if it is possible – and the answer is: it depends.

You could also access the services with a node.js solution by Gregor Wolf!

With this blog post I don’t want to start a discussion about “why is it not possible under certain circumstances?” – because there are lots of technical internal details involved. I’ve talked with a bunch of people and addressed the actual circumstances there.

Here I just want to highlight what you can do TODAY to give it a try. This is not a detailed step by step tutorial here, I just give you hints what you can do with certain examples, because the whole HCP/HANA topic is quite big and there are a lot of resources out there:


So if you have any questions concerning the HANA (privileges, shine app, sflight…) / HCP (destinations…) topics highlighted here in this blog post I’d kindly ask you to go to the corresponding SNC spaces for HANA and HCP or have a look into the openSAP courses to learn more.

If you are new to the SAP Web IDE visit our SCN space with lots of tutorials.

SAP Web IDE and SAP HANA Trial: not yet

I’ve been in discussions with Eduard Bartsch and Martin Raepple about this topic and currently it is not possible to consume the HANA XS OData services via the HCP cloud destinations in our SAP Web IDE.

It also has been asked if you could change the settings in the of the .xsaccess file to Basic or anonymous -> no it is not possible, these settings are ignored, SAML2 only.

So this means this setup is not possible yet:


SAP Web IDE and SAP HANA via SAP CAL: yes

Last week I got great help from Craig Cmehil in setting up my SAP HANA system via the SAP CAL (Cloud Appliance Library) – this is basically a system hosted on AWS where you just pay for the time the machine is running. The AWS setup is also used in the openSAP courses at the beginning – later they are also using the SAP HANA Web based development environment. SAP CAL is just an super easy user interface for controlling your AWS machine.

Here is the info about the AWS with the “Getting started guide” and here is the info about the included SAP HANA.

I have used the SFlight service and used the Basic Authentication which was available by default with my database user. Here the destination settings in the HCP cockpit – the URL points to the IP-address of my AWS machine:


Working in SAP Web IDE with SAP HANA by SAP CAL:


Mock in SAP Web IDE and “importing” into SAP HANA trial Web IDE: yes

This is maybe not the most elegant solution, but you can leverage our SAP Web IDE for creating the SAPUI5 application with our SAP Fiori template, code completion, … and use the mock data service to preview the app without the working connection. After that you could put this app into your SAP HANA trial account, make some adaptions and continue the development there.

For this I’ve used the sample SHINE application from SAP:


I executed the service and saved the response from $metadata as metadata.xml:


In the SAP Web IDE I created a project based on the SAP Fiori Starter Applications and uploaded the metadata.xml from my local pc:


To test the application you have to run it with mock data:


Mocked data:


After that I have downloaded the project as zip (and then unpacked it):


Then I switched over to the SAP HANA Web IDE:


In my shine application I created the corresponding packages and drag & dropped the files in the corresponding packages (no dragging of folders possible and no automatic zip-extraction possible yet):


Here are the additional steps I had to do:


I had to change the location of the sapui-core.js:

<script id="sap-ui-bootstrap"

The one provided from the shine application (/sap/ui5/1/resources/sap-ui-core.js) had problems with the Icon Tab Bar.


I had to reference the location of the XS service:

var sServiceUrl = "../../services/poWorklist.xsodata/";

Additional pitfalls

During development sometimes I had to run the application again so that the source was updated:


And sometimes I even had to clear the cache:


Here the final running XS application:


Maybe the steps with the file replacement are easier within your local Eclipse and the HANA tools connected to your trial cloud system, I haven’t tried it out yet – I must continue with my openSAP course 😉 I will update this section after that.

HANA XS trial and beyond <<update>>

SAP Mentor Gregor Wolf also played around with the SAP HANA trial XS services and came up with a node.js solution which he hosts here on github.

Update 15th January 2015

With the combined power of a blogging SAP developer girl, a hands-on SAP Mentor and a knowledge spreading SAP employee (HANA Academy) – we could fix an issue in the setup wich led to the final solution:

  • node.js SAML2 app by Gregor on your computer
  • + with running SAP HANA cloud connector on your computer
  • => which is then maintained in the HCP destinations
  • => and then consumed in the SAP Web IDE
  • => based on this you can create and deploy an HTML5/SAPUI5 app
  • = awesome stuff!!!

Here is a rough sketch which tries to illustrate this solution – I tried my best – I am a developer and not architect 😉

Bildschirmfoto 2015-01-15 um 22.51.38.png

>>> The solution is described here at theclosed github issue. Thank you very much Gregor for your great support! That’s how communities work! YEAH!!! <<<


  • HANA trial consuming in SAP Web IDE via HCP destination service: not yet
    .xsaccess settings could not be set to Basic or anonymous -> service is always SAML2 based due to trial restrictions
  • HANA productive or HANA on AWS through SAP CAL via HCP destination service consuming in SAP Web IDE: yes –> AWS link
    (I’ve seen also CORS settings in the XS seetings so maybe this is even possible without HCP destination service)
  • Mocking in SAP Web IDE and “importing” into SAP HANA Web IDE: yes
  • Accessing service via node.js with Cloud connector and destinations in SAP Web IDE: yes


I hope I could have given you some hints on how you can consume the SAP HANA XS services in the SAP Web IDE or even with node.js – thanks to Gregor Wolf. If you are taking the openSAP about software development on SAP HANA you would probably already have your AWS machine up and running. The SAP HANA trial is at the moment ( ! )  from my understanding an isolated system where you can develop your XS applications, but you normally can not consume the services from the outside or via the HCP destination service (without destination service you could not consume them in your browser because they are not CORS enabled).

You must be Logged on to comment or reply to a post.
  • Thx, Denise, for this clear status report and recommendations. Some of us have struggled with these points for some time, from now on, people can just read it all here. Really useful!



  • Amazing complexities for a newbie.

    I am trying to create a simple UI5 based mobile app that can directly consume XS oData service hosted on HANA trial instance.

    Have hit the authentication roadblock. 🙁

    One quick question about the node.js based proxy for authentication. For hybrid mobile app (UI5 + cordova) scenario - will it work? Can the proxy be generated on mobile device?

    • Hello Rahul,

      please note that this authentication issue does only exist on the HCP trial (which is free for developers). I think including the proxy inside the app is not the right approach as in a hybrid app when you also want to use the HCP Mobile Service. If you want to be independent from your local computer then setup the hanatrial-auth-proxy on a system in the cloud with HTTPS.

      Best regards


      • Hi Gregor,

        can you confirm that this solution should only be necessary in the trial HCP account scenario? I'm trying to do this (connect Web IDE to HCP xsodata services) within a productive HCP environment, but getting blocked. Not sure why; still playing around with setting up destinations correctly. Any confirmation that this should work out of the box on a non-trial system would be nice.



        • Hi Trond,

          there are reports that using HANA .XSODATA Services in HCP Production without my "Hack". But you have to check if the authentication methods offered for the Web IDE destinations match the authentication that is set-up for HANA. Hope someone from SAP can give guidance here.

          Best regards


        • Hello Trond,

          you see in my blog, that I have used the SAP CAL also, this is not a "trial" machine, it is a real HANA with a free developer licence. I have used my in the Web IDE, in the destination screenshot you see, that I've used the SYSTEM user of the HANA and the additional parameters like WebIDEEnabled and so on. I have used Basic Auth.

          I guess I have checked via the xsadmin and enabled Basic Authentication, because I did not want to work with certificates/SAML and so on. For those authentication questions please open a question in the dedicated HCP/HANA SCN spaces, Martin Raepple is active in HCP and has a lot of security know how.

          • Hi Denise, thanks for the info. I'm not using AWS but a dedicated HCP for my company. We're doing first steps here 🙂

            Did you use port 443 in the URL to your AWS system? I see from the documentation in HCP itself that this seems to be the "preferred" port for Internet connections.

            If still not working, I will get in touch with Martin to get this resolved. We have a complex setup with proxies and firewalls so there might be some other obstacles I don't know about. I'm not a security/network guy - couldn't even explain "SAML" if I wanted to...



          • Hi again,

            you were right. We had to set the Basic Authentication in the XS Admin console... of course I did not have access to do this since this is not my private system, but with some help we managed to do this as a workaround. Thanks for the input!!

          • Hi Gregor,

            happy to do this. Our working solution is not the "industrialized" one we will use for the future, but it works for now. Ideally we would use some kind of SSO authentication to avoid using a named user/pwd in BasicAuthentication, but I'll write up the steps we followed and post it as a blog. Guess I can then follow up later when the final solution is established.



  • I hacked together something similar (also with Martin Raepple's help) available here: Measure the Sun with Hana Cloud Platform – Hands On Tutorial

    It ties together the Java and the XS side on the same XS database schema with authentication either via OAuth (java side) or Basic (XS Side for analysis) - all in the trial account and all from the comfort of your browser (no eclipse or other servers required).

    Would love to see how the Web IDE could be used for Hana development in trial accounts.

  • Hello Gregor Wolf

    Nice job! I discovered your solution testing the demo "Live3 - SAP HANA Cloud Platform for Advanced Real-Time Social Media Analytics", from SAP HANA Academy.

    I have some trouble with proxies and could finally test the solution inside SAP using a different network. However, sometimes it works, but most of the time I get the following message in the nodejs app, when requesting the data:

    "Response is undefined

    problem with request: read ECONNRESET"

    So I wonder if it might be the network, or some problem in the HANA trial server, or any other problem with the configuration. Do you have any idea that could help?

    Best Regards

    Luis Becker

  • Hello Denise,

    Thanks for consolidating all the important information.

    Do you know if oData service is working now with HCP trial instance or still this is a challenge ?


    Ankit Gupta

    • Dear Ankit,

      still now change on the SAML authentication requirement. So please still use my authentication proxy project. Open an issue at GitHub if you face any problem.

      Best regards


  • Hi Denise/ Gregor,

    I would like to consume OData services from native HANA XS system in my trial SAP Web IDE. Reading through the blog it seems it was not possible when it was written. Is it possible to do so now? I have HANA XS system in cloud connector and have added it as a destination in wed ide. Still now able to call OData services. My goal was to develop UI in Web IDE and consume OData services from native HANA XS system.



    • Dear Mukul,

      unfortunately until now nothing has changed. You still have to use my GitHub project. Hope you have no issues to set it up.

      Best regards


      • Hi Gregor,

        As I understood - code is for accessing HanaXS on I have a native Hana XS engine that is accessible using VPN. I normally access it using http://<IP address>:8000 after logging into VPN.

        I looked at your Github code in 3 files config.js, server-basic-auth.js, saml-client.js. I replaced host name with native HANA system <IP address>:<port> in 3 files. Followed the instructions as you indicated in Github

        • Install node.js from
        • Clone this repository and run npm install in the root folder
        • Start the proxy server using node examples/server-basic-auth.js

        After the port is opened - it gives error message "Connection refused" Connection timeout

        I am sure there are other sections where I need to make change. Can you please explain to me the steps to follow or point me to link where you have already discussed it?

        Also it wasn't very clear on what kind of configuration I need to maintain in Hana cloud connector. Would internal host be http://local host and internal port be 7891 now?

        Let me know if this is not the right place to raise this issue.



        • Dear Mukul,

          my GitHub project is exclusively to fix the authentication issue with the HANA instances on HCP Trial. If you have an on premise HANA system then the HANA Cloud Connector is the right thing. But before you setup the Cloud Connector please talk to your security officer if that is allowed.

          Best regards


    • SAP has announced that the backend browser tools (for modelling etc) and the Web IDE (for Fiori/UI5) will finally merge into one holistic IDE, some time in the mid/near future).

      Of course, this makes complete sense and will greatly will facilitate things. Instead of being forced to use (cloud-based) HCP for UI5 development, you will be developing your frontend components (Fiori/UI5)on the same XS (Advanced) server as your backend components (business logic) reside - basically doing "holistic" development the same way we are doing it today in the Netweaver/ABAP world.

      Also, if you have (as we have) umpteen HANA tracks, there will be no need to create all those umpteen destinations from HCP back into each HANA system, whether you plan to finally deploy there or just consume services.

      I guess this is part of the reason why SAP is not moving too fast on this issue.



      • Hi Trond,

        Thanks for your response. It can be looked at from 2 perspectives:

        All in one development environment - I agree, there is a need for a tool on HANA XS side that allows holistic development right from modelling, creating OData services to developing UI. At the moment we have it split between Web IDE for UI and XS IDE for modeling and OData services.

        Different UI and Data environment - Other side of the argument could be to keep the two units separate and build easy integration features between data and UI world. I think SAP is trying to pursue this strategy at the moment though not sure how long they would pursue it. Also integration features are quite in-adequate at the moment.

        Regarding your point on multiple HANA tracks - no need to create them as destinations in HCP? I didn't quite follow it. How do you propose consuming or deploying if you were to use Web IDE? Are you suggesting we should use any other workaround?



  • Thanks Denise for this nice article.  Since the article is almost two years old I was wondering if there have been changes to the approach.

    I have a few questions for you:

    For the section - "SAP Web IDE and SAP HANA Trial: not yet"  - you have a comment in the article - "currently it is not possible to consume the HANA XS OData services via the HCP cloud destinations in our SAP Web IDE."  Since it's a while this article was written, is this still the case?

    I will try out the steps in section "Mock in SAP Web IDE and “importing” into SAP HANA trial Web IDE: yes.  Looks like this work around will do the trick without having to go through the node.js approach on the local machine.

    Your feedback is appreciated.




    • Hello Jay,

      I'm facing the same problem and unable to consume xsodata with my sapui5 application. did you solve your problem? and can you share your solution. I'm stuck right now ..

      • Hi Nafees,

        I did solve the issue.  Let me get that information to you.  Unless you have already solved this.  Sorry for the delayed response.

        Is your SAPUI5 app on the WebIDE?  Is your XSODATA for the MDC trial instance?