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

Access a Classic Schema from SAP Web IDE Full-Stack

Access data in a plain or replicated schema from an HDI container.

Overview

🎓 beginner 20 min. SAP HANA Service For SAP BTPBeginnerSAP HANA

You will learn

  • โœ”How to create a plain schema, with a table and user to simulate a replicated schema
  • โœ”How to create a user-provided service to access a database in SAP HANA service for SAP BTP
  • โœ”How to grant permissions to the technical users in your HDI container to access the database This tutorial is meant to be an example of cross-container access. Simple data models and loading mechanisms were chosen to simulate a schema replicated using tools such as SAP Landscape Transformation or an ABAP schema. For more information on this process and additional syntax options, refer to the official documentation on SAP Help. If you are looking for the steps for an on-premise SAP HANA instance with XS Advanced, such as SAP HANA, express edition, refer to this tutorial.
Thomas Jung T Thomas Jung November 21, 2022
Created by December 24, 2018
Contributors

Prerequisites

Prerequisites

  • This tutorial is designed for SAP HANA service for SAP Business Technology Platform. Consider newer tutorials designed for SAP HANA Cloud.
  • You have access to the database and SAP BTP cockpit.
  • You have created a multi-target application with a database module as explained in this tutorial.
  • Optionally, you have created a remote source as explained in this tutorial.

Steps

Intro

This tutorial cannot be completed with a trial account.


Step 1 Create a plain schema
โ€”

Connect to SAP Web IDE Full Stack and enter the Database Explorer. You will see your instance of the SAP HANA database.

If you cannot see the database, try entering the database explorer from the Database Cockpit and make sure the setting in Preferences->Database Explorer are set to the correct region.

DB Explorer
DB Explorer

Use the following code to create a schema and a user. You will also create a simple table to use as an example for cross-container access.

You will create a SQL role and assign it to the user PLUSR with the permissions granted manually before. This user will be used for the connection between the HDI container and the plain schema, and will grant the role to the HDI container technical user.

SQL
CREATE SCHEMA "PLAIN";
CREATE USER PLUSR PASSWORD "HanaRocks01" NO FORCE_FIRST_PASSWORD_CHANGE ;

CREATE ROW TABLE "PLAIN"."REGIONS" (REGION NVARCHAR(5), DESCRIPTION NVARCHAR(100) );

CREATE ROLE CCROLE;
grant  SELECT, UPDATE, INSERT, DELETE, EXECUTE, SELECT METADATA ON SCHEMA "PLAIN" TO CCROLE with grant option;
grant  CCROLE to PLUSR with admin option;

Use the green play button or press F8 to execute the statement.

DB Explorer
DB Explorer

What is going on?

ย  You have created a plain schema in your SAP HANA database. When you created a database module in SAP Web IDE, an HDI container was automatically generated. ย 

schema
schema

ย 

You can see the SAP HANA service (a database instance, from which you access to the Database Cockpit) of service type hana-db and the HDI container of service type hana and plan hdi-shared listed in the service marketplace ย 

schema
schema
ย  You can also see both connections in the Database Explorer ย 
schema
schema

Step 2 Load data
+
Step 3 Create a user-provided service
+
Step 4 Configure the service for access
+
Step 5 Grant permissions to the technical users
+
Step 6 OPTIONAL - Grant access to a remote source
+
Step 7 Create synonyms
+
Step 8 Create a view
+
Step 9 Troubleshooting insufficient privileges
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 9
1. Create a plain schema 2. Load data 3. Create a user-provided service 4. Configure the service for access 5. Grant permissions to the technical users 6. OPTIONAL - Grant access to a remote source 7. Create synonyms 8. Create a view 9. Troubleshooting insufficient privileges

Learn more →