Try out Web-based HANA XS Development on SAP HANA Cloud Platform
NOTE: THIS TUTORIAL IS OUTDATED AND WILL NOT BE MAINTAINED ANY MORE.
Since this week SAP HANA Cloud Platform enabled Web-based HANA XS Development for Free Trial Developer Accounts!
What do you need to try out Web-based SAP HANA XS Development?
The only thing you really need here is a Firefox or Chrome Web Browser and nothing else.
Then you can launch the new Online Tutorial https://thewebide.hana.ondemand.com/tutorials/hcptrial (use Firefox or Chrome!) which guides you step-by-step through a Web-based HANA XS Development example.
How does the online tutorial work?
1. First the tutorial guides you through some prerequisite steps (e.g. make sure that you have or how you create your free developer trial account etc.)
2. After finishing the prerequisite steps you can start the tutorial step-by-step exercises
3. Execute step by step the short instructions with the pre-configured code snippets according to your settings.
4. Develop step by step the HANA XS PersonsList application on your SAP HANA System by means of SAP HANA Web IDE
Detailed Documentation for the Web-based PersonsList Development Scenario?
Bertram Ganz already provided in his SCN Blog a detailed PDF document for the PersonsList HANA XS Development Example but targeting on premise SAP HANA Platform.
The on-premise development on SAP HANA Platform works partly different than on HANA Trial instance (e.g. on HANA Trial instance you have a dedicated schema you have to develop with, whereas with on-premise SAP HANA Platform you can define your own development schema).
Therefore Bertram is working on a corresponding detailed PDF document which will take the Trial HANA instance specific parts into account.
Questions and Feedback?
I really appreciate your questions or feedback.
Please add your comments below.
Hi Jens,
I got this strange result after finish the step 21 by using Firefox
Please advise.
https://s3hanaxs.hanatrial.ondemand.com/p1793546037trial/dev/perslist/services/pers.xsodata/Persons?$format=json
{"d":{"results":[{"__metadata": {"uri":"https://s3hanaxs.hanatrial.ondemand.com:443/p1793546037trial/dev/perslist/services/pers.xsodata/Persons('1')","type":"p1793546037trial.dev.perslist.services.pers.PersonsType"},"ID":"1","FIRSTNAME":"John","LASTNAME":"Smith"},{"__metadata": {"uri":"https://s3hanaxs.hanatrial.ondemand.com:443/p1793546037trial/dev/perslist/services/pers.xsodata/Persons('2')","type":"p1793546037trial.dev.perslist.services.pers.PersonsType"},"ID":"2","FIRSTNAME":"Lisa","LASTNAME":"Gordan"},{"__metadata": {"uri":"https://s3hanaxs.hanatrial.ondemand.com:443/p1793546037trial/dev/perslist/services/pers.xsodata/Persons('3')","type":"p1793546037trial.dev.perslist.services.pers.PersonsType"},"ID":"3","FIRSTNAME":"Mike","LASTNAME":"Miller"},{"__metadata": {"uri":"https://s3hanaxs.hanatrial.ondemand.com:443/p1793546037trial/dev/perslist/services/pers.xsodata/Persons('4')","type":"p1793546037trial.dev.perslist.services.pers.PersonsType"},"ID":"4","FIRSTNAME":"Minh-Tri","LASTNAME":"Nguyen"}]}}
Thank you in advance
Hi Minh Tri Nguyen,
thank you for your question.
Your output looks correct (see e.g. my screenshot)
Just continue with the tutorial.
Best regards,
Jens
Hi Minh Tri Nguyen,
If you add e.g. JSONView as Extension to your Firefox web browser you get a better formatted JSON web page output (as I used in my screenshot above)
Best regards,
Jens
Thank you for your quickly reply,
Great tutorial and a significant step in making development easier for all developers. Cloud should benefit the developer the same way it is supposed to benefit the business users and this is the first step in that direction. Hopefully SAP will invest in further development, marketing and promotion of the the web IDE.
Hello Jens,
At step 21, where I display person table using pers.xsodata service on the server, I experience the below error.
Request execution failed due to missing privileges
I checked a few times the users, privileges,roles, etc but could not find the reason. By the way I'm running tutorial on Firefox.
What can else cause the error, do you have an idea?
Hi Eralper,
I am also getting same error can some one provide answer ???
Hi Eralper, Hi Gagandeep,
Sorry, for my late answer.
I did many tests with several test p-users to find out why you might run into the reported problem, but unfortunately I always succeeded when executing the tutorial exactly.
I can provoke with a test p-user your reported "Request execution failed due to missing privileges" when I do not execute the sql statements described in step 14 and 21.
But I'm sure this is not the case on your side (as you executed the tutorial precisely).
I can also provoke the reported error when I work with two different test users in the same web browser. Test user 1 executes the tutorial and when calling the OData service at step 21 the user 2 is logged on (via a still available user session). And this user 2 should of course not be able to see the developed data via the called OData service (at least as long as the step 42 is not executed)
I'm also pretty sure that this exceptional "two p-user session" case is not applicable to your case, but that is what I found out so far.
As I didn't find yet a better explanation for the problem you observed I would recommend:
Thanks for testing this. I will continue to test and try to figure out why this error might appear on your side.
Best regards,
Jens
Hello,
I'm not sure if below command is right
call HCP.HCP_GRANT_ROLE_TO_USER('p1940545044trial.kodyaz.perslist.roles::user','p1940545044')
But I also executed following SQL script as well
call HCP.HCP_GRANT_ROLE_TO_USER('p1940545044trial.kodyaz.perslist.roles::user','p1940545044trial')
Actually I have completed the tutorial successfully somehow after getting my second trial account.
I was with the same problem: "Request execution failed due to missing privileges".
I opened my browser in private mode (Incognito mode) and it worked, I was pretty sure that was some cache issue...
Now, I just clear the cache in "regular mode" and it worked as well 😀
Hi Eralper,
I try with Google crome and its showing there...
same answer for the below issue also (i.e. not visible toolbar for content)
Hi Jens,
First of all thanks for sharing.
at first step I am not able to launch "index.html" beacuse it is not showing toolbar can you help me on this:
Hi Gagandeep,
this is a rendering bug, which occurs sometimes (also my experience and I'll report this as an issue)
Just refresh the browser and the toolbar will show up again.
Best regards,
Jens
Try to type the URL in your browser address bar, you can access without clicking on toolbar:
https://s1hanaxs.hanatrial.ondemand.com/YOURUSER/YOURHANAINSTANCE/perslist/ui/perslist-web/index.html
Hi Jens,
I met below authorization issue on Step 14 - Display person Table Content in Catalog when I was trying to execute the SQL statement "call HCP.HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS()":
Statement: 'call HCP.HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS()'.Error calling procedure: insufficient privilege: [258] "HCP"."HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS": line 35 col 14 (at pos 2108): [258] (range 3) insufficient privilege exception: insufficient privilege: Not authorized
I have no idea how to gain myself the authorization, can you please help? Thanks a lot.
PS: I am using a Chrome and I have created myself a new trial instance for this sample building.
Regards, Richard
Hi Richard,
Calling the statement "call HCP.HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS()" should not require any further authorization.
As explained in the documentation (see here SAP HANA Cloud Platform in section "Select Rights for Activated Modeled Views") the HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS statement will grant here in this tutorial SELECT privileges on the person table defined in mymodel.hdbdd for schema _SYS_BIC.
If this doesn't work for you then either you did a small mistake in the steps before or it is a bug.
I myself executed today the entire tutorial once again with a freshly created new account p-user and I can confirm that calling the HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS() statement worked.
If you are sure that you did all steps exactly as described then you might send me your p-user-id which does not work and I will check with my colleagues for root cause.
Best regards,
Jens
Hi,
I am also facing the same insufficient privilege exception: insufficient privilege: Not authorized
exception when called the query 'call HCP.HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS()'.
Is it any bug as you have mentioned?
Thanks
Veera
Hi,
I am facing the same issue in HCP. Created tables under NEO_xx schema, and views. But not able to view the data from Analytical & calculation views.
_SYS_REPO & _SYS_BIC schema's are missing. Please suggest me. I was stuck with this issue from 3 weeks.
Please go through below link for details:
schemas _sys_bi & _sys_repo missing in HCP to preview the data from custom views created.
Regards,
satish
I tried the same tutorial now and everything works as expected . Try Again.
all the tables will get created under _SYS_BIC only .
Regards
Arun
hi
I am getting the following error when saving .xsaccess file
Unknown privilege "p1234trial.dev.perslist::Execute"
Thanks and kind regards
This provided site is a weird site.
I am not able to recognize that this site is an officially trusted website site from SAP?!?!?
And people enter really there account numbers without questioning?
Well, if you don't know (yet?!) the hana.ondemand.com domain (where, btw, also the developer account which you are asked to enter is hosted), then you could at the very least check the certificate in the browser. 😉
Enjoy!
I got this URL: SAP HANA XS Web IDE Tutorial from another site.
And if you got only this URL you don't know nothing.
Not even any legal information/disclosure or anything else what is showing you the relationship to SAP except a little SAP logo
People who trust just an SAP logo on a webpage shouldn't be surprised about identity theft.
Are you checking every time if there is a certificate for every site or domain do you visit?
I know only about one imported certificate regarding SAP.
> People who trust just an SAP logo on a webpage shouldn't be surprised about identity theft.
Certainly I didn't say that.
> Are you checking every time if there is a certificate for every site or domain do you visit?
Well, if you have doubts or concerns about the site, that's definitely one thing you must check (besides confirming the site URL is the intended one).
I agree there could be added a back-link to this blog post from the tutorial page (Jens Glander) or something similar, however if you got there from here you'd know who the author is and what his affiliation with SAP is, etc. On the other hand, if your point here is simply bashing, I'm afraid you've hit the wrong place. Thanks!
A few days ago I downloaded the document from Develop Your First SAP HANA Native Application on SAP HANA Cloud Platform Using the SAP HANA Web-based Development Workbench.
Seems that layout has changed since that document was updated, but with copy & paste (using Google Chrome) from source code 3 on page 25 I am stuck with this message:
11:03:54 >> Error while activating:
Syntax error: Unexpected token "#EOF#" at line 11, column 2
Given this, I have 2 questions:
1) What may I do to keep the indentions as shown in pdf document?
2) What may I change to overcome the error message and activate my data definition?
Thanks and kind regards.
Hi Heiner Geohlmann,
unfortunately there is a whitespace problem when copying the code from the pdf document to the web-based development workbench.
For that I developed the online-tutorial for HANA Cloud Platform Trial accounts, where you get the necessary perslist code snippets which work both for Firefox and Chrome.
As you run already in the mentioned problem I suggest the following to get out of it:
1. Step:
Remove all content from your mymodel.hdbdd file and save (which results into an error as the file expects artifact)
2. Step:
Click on template button in the tool bar
3. Step:
Add manually the file with the needed content as shown in the following screenshot and then save it. Should be successful ...
4. Step: Contiue with the online-tutorial :
Hope that helps you.
Best regards,
Jens
Hi Jens,
in the meantime I found what was hindering me: the closing semicolon ";" was missing in the template to be copied (in the screenshot below it was there, and it helped me out).
I do not know whether this has anything to do with any whitespace.
After a first look into the online-tutorial it seems to me, that copying and formatting are even worse than in "pdf mode": first copy into notepad, then separating lines at semicolons, lastly inserting indentions. In addition, the screenshots of the online-tutorial are to small for me to recognize details.
So for the next time I will follow the pdf document. Maybe, with any next problem, I will start from scratch with the online-tutorial.
Anyway, thanks for your time and help.
Best regards, Heiner
Thanks, Great Demo !
I was capable to finish do all steps with HANA Trial Account:
1) Build XS App. Backend providing XS services "pers.xsodata" and "serverlogic.xsjs"
2) Build XS App Frontend and consume these 2 services.
Now I want to do one more step, and consume these 2 XS backend services by another SAPUI5 App. I made an UI5 project in eclipse:
1) copy&paste&modify the controller, view, index files that I used in this demo.
2) sOrigin variable, used in controller file, was adapted to hit xsodata service.
3) User Name relative URL, used in index file, was adapted to hit xsjs service.
Unfortunately, this is not enough to consume XS services by external UI5 App. Can you suggest what to do now?
Best Regards,
Pedro