SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Create an SAP HANA XS Classic Hello World Application Using SAP HANA Studio

Create and test a simple SAP HANA XS classic application that displays the "Hello World" message.

Overview

🎓 beginner 15 min. SAP HANA Service For SAP BTPBeginnerCloudSAP Business Technology Platform

You will learn

  • How to create and test a simple SAP HANA XS classic application using an SAP HANA tenant database system (MDC)
Sylvia Hördt S Sylvia Hördt July 14, 2023
Created by July 14, 2023
Contributors

Prerequisites

Prerequisites

  • You have a subaccount in the SAP BTP, Neo environment.
  • You’re assigned the Administrator role for the subaccount.
  • Make sure the SAP HANA tenant database you want to use is deployed in your subaccount before you begin with this tutorial. For more information, see Install Database Systems.
  • You’ve installed the tools as described in Install SAP HANA Tools for Eclipse to follow the steps described in this tutorial.

Steps

Step 1 Create a database user

Create a new database user in the SAP HANA cockpit and assign the user the required permissions for working with the SAP HANA Web-based Development Workbench.

You’ll perform all subsequent activities with this new user.

You’ve specified a password for the SYSTEM user when you created an SAP HANA tenant database. You now use the SYSTEM user to log on to the SAP HANA cockpit and create your own database administration user.

Caution: You should not use the SYSTEM user for day-to-day activities. Instead, use this user to create dedicated database users for administrative tasks and to assign privileges to these users.

  1. In the SAP BTP cockpit, navigate to a subaccount. For more information, see Navigate in the Cockpit.

  2. Choose SAP HANA / SAP ASE > Databases & Schemas in the navigation area.

    All databases available in the selected account are listed with their ID, type, version, and related database system.

    Tip: To view the details of a database, for example, its state and the number of existing bindings, select a database in the list and click the link on its name. On the overview of the database, you can perform further actions, for example, delete the database.

  3. Proceed as follows:

    1. Select the relevant SAP HANA tenant database in the list.

    2. In the overview that is shown in the lower part of the screen, open the SAP HANA Web-based Development Workbench link under Development Tools.

    3. Provide the following details:

      Enter Username: SYSTEM

      Enter Password: Enter the password you determined for the SYSTEM user.

      You’re now logged on to the SAP HANA cockpit.

    4. Open the Security tool of the SAP HANA Web-based Development Workbench.

    5. Expand the Security node.

    6. Open the context menu for the Users node and choose New User.

    7. On the User tab, provide a name for the new user.

      The user name always appears in upper case letters.

    8. In the Authentication section, make sure the Password checkbox is selected and enter a password.

    > The password must start with a letter and only contain uppercase and lowercase letters ('a' - 'z', 'A' - 'Z'), and numbers ('0' - '9').
    
    1. To create the database user, in the menu bar click the Save icon.

      The new database user is displayed as a new node under the Users node.

    2. To assign your user the roles with the required permissions for working with the SAP HANA Web-based Development Workbench, go to the Granted Roles section and choose + (Add).

    3. Type ide in the search field and select all roles in the result list.

    4. Choose OK.

      The roles are added on the Granted Roles tab.

    5. To assign the CONTENT_ADMIN role to the user, repeat the steps in the Granted Roles section, searching for CONTENT_ADMIN.

      For more information about the CONTENT_ADMIN role, see Predefined Database (Catalog) Roles.

    6. Save your changes.

    7. Before you continue to work with the SAP HANA Web-based Development Workbench, you log out first and log on again with your new database user.

      Caution: At this point, you’re still logged on with the SYSTEM user. You can only use your new database user to work with the SAP HANA Web-based Development Workbench by logging out from the SAP HANA cockpit first. Otherwise, you would automatically log in to the SAP HANA Web-based Development Workbench with the SYSTEM user instead of your new database user.

      Therefore, choose the Logout button before you continue to work with the SAP HANA Web-based Development Workbench, where you need to log on again with the new database user.

Step 2 Add a repository workspace
+
Step 3 Results
+
Step 4 Add an XS application project
+
Step 5 Results
+
Step 6 Write server-side JavaScript
+
Step 7 Test your application
+
Step 8 Results
+
Step 9 Retrieve data from SAP HANA
+
Step 10 Test your application again
+
Step 11 Results
+
Step 12 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 12
1. Create a database user 2. Add a repository workspace 3. Results 4. Add an XS application project 5. Results 6. Write server-side JavaScript 7. Test your application 8. Results 9. Retrieve data from SAP HANA 10. Test your application again 11. Results 12. Test yourself

Learn more →