In the article Introduction to SAP HANA XS, we explained the basic feature of SAP HANA XS.
In this article we will show you how to create a basic Hello World Project in SAP HANA XS using HANA Studio.
Prerequisite:
In this article we will show you how to create a basic Hello World Project in SAP HANA XS using HANA Studio.
Prerequisite:
- You have access to a HANA system
- You have SAP HANA Studio installed on your machine.
- You have added an SAP HANA system in HANA Studio
- You have all the role and privileges required.
2. Select “Repositories” tab in the left side. Right click and select “Create Repository Workspace”. In the popup window, provide Workspace name. You may keep everything as default.
Click on “Project Explorer” tab. Right click and select “XS Project”. Provide a name for your project and click Next.
3. Select the Workspace. Click on the browse button and select the package where you want to create the XS project.
Note: If you need to create a new package, go to System tab and create it under Content.
4. Leave everything else blank and click on Finish. Later we will explain the components like hdbschema, xsjs etc. But in this article we will only focus to create a simple Hello World application.
5. An XS project will be created as shown below. Note that it automatically creates 2 mandatory files - .xsapp and .xsaccess. To read more about these files read SAP HANA XS Application descriptor and Application access files
6. Right click and go to New à File. Give file name as “HelloWorld.html”.
7. Copy paste below code.
<HTML>
<HEAD>
<TITLE>
HANA XS Hello World Application
</TITLE>
</HEAD>
<BODY>
<H1>Hi</H1>
<P>This is my first "hello world" example.</P>
</BODY>
</HTML>
Save the file. Right click and select Team à Activate.
9. Done. You have created your first HANA XS Application. Now let’s run it. Right click on the file once again and select “Run As” à HTML. It will open in your default browser. Provide HANA user id and password. It should open like image below.
Continue reading:
No comments:
Post a Comment