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

Grant Access to Calculation Views

Learn how to create a user and grant others access to your calculation view within the SAP HANA database in SAP HANA Cloud.

Overview

🎓 beginner 10 min. SAP HANA CloudBeginnerSAP HANA CloudSAP HANA DatabaseSAP Business Application Studio

You will learn

  • โœ”What privileges are needed for others to access your calculation view
  • โœ”How to create a role in SAP Business Application Studio
  • โœ”How to create a user in the SAP HANA database explorer and connect as this user
Created by June 21, 2023
Contributors

Prerequisites

Steps

Intro

Alex Banner
Alex Banner

Reminder: This tutorial is part of a mission, in which you will help Alex, the CEO of Best Run Travel, to answer a concrete business question with SAP HANA Cloud, SAP HANA database.

Alex needs to know the top 5 partners of their agency and wants to find out the days with maximum booking of each partner.

In this tutorial, you will learn how to make the calculation view you created previously available to others in the organization by creating a new role and granting this role access to the view.


Step 1 Generate a SELECT statement on the column view
โ€”

To allow others to see the results of your calculation view, you need to grant them the privilege to run SELECT statements on this calculation view.

To run SELECT statements on calculation views in the new environment, first make sure that the you have the correct schema name. This schema is not the SFLIGHT schema we previously created, but rather the schema automatically created for the calculation view.

  1. To find out the schema name, open the SAP HANA database explorer.

  2. Find your HDI container in the catalog.

    Not sure how to find the HDI container of your project in the catalog?

    Unless you specified a name for your container manually upon creation of your project, the default name will look something like this:

    SharedDevKey@[name of your dev project]-hdidb-[sequence of characters] ([name of your space])

    In our example, it is listed as follows:

    SharedDevKey@BestRunTravel-hdidb-ws-g6mq2 (dev)

    Alternatively, you can go to SAP Business Application Studio and click on the HDI container icon

    Container
    Container
    , which will directly open the right container in the catalog.

  3. Click on Column Views.

  4. Right-click on the column view name on the bottom panel and choose to Generate a SELECT Statement.

    DBX Catalog
    DBX Catalog

  5. This will open the SQL Console on the main area of the screen with the SELECT statement. On line 7 you can see a FROM clause with two arguments separated by a .. The first part is the schema name, the second part is the calculation view name.

  6. Copy the name of the schema and save it for later, for example, using a text editor.

  7. Keep this SQL console open.

    Select Statement
    Select Statement

Step 2 Create a role
+
Step 3 Add privileges to the role
+
Step 4 Create a new database user in SAP HANA Cloud Central
+
Step 5 Connect as the new user
+
Step 6 Knowledge Check
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Generate a SELECT statement on the column view 2. Create a role 3. Add privileges to the role 4. Create a new database user in SAP HANA Cloud Central 5. Connect as the new user 6. Knowledge Check

Learn more →