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.
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.
A video version of this tutorial is also available:
Step 1Create a plain schema
โ
Return to the SAP BTP cockpit and the HANA Cloud Management screen. Choose Open SAP HANA Database Explorer from the Actions column.
DB Explorer
The Database Explorer will open in another browser tab and the DB entry for your DBADMIN user will be selected. Choose Open SQL Console from the context menu
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.
But ultimately these are both just schemas within the same HANA Cloud Database instance. We can communicate between the HDI Container Schema and the classic Schema using synonyms.
Step 2Load data
+
Download this CSV file https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/hana-cloud-access-cross-container-schema/plain.csv into your local computer.
Use the search help to locate schema PLAIN.
DB Explorer
Click on Tables. Right-click on the REGIONS table and select Import Data
Import data in SAP HANA
Choose Import Data and press Step 2
Import data in SAP HANA
Choose Local as the Import Source. Browse for the file you have just downloaded. Press Step 3.
Import data in SAP HANA
Keep PLAIN and REGIONS as the target and click Step 4
Import data in SAP HANA
Keep the default table mapping and click Step 5
Import data in SAP HANA
Click Review
Import data in SAP HANA
Use Import Into Database to load the records
DB Explorer
You should see the wizard has imported 4 records
DB Explorer
Right-click on the table and choose Open Data to see the records loaded into the table.
DB Explorer
Step 3Create a user-provided service
+
You now have a schema with a table and data in it. You have also created a user called PLUSR with permissions to perform basic operations on that schema. You will now create a user-provided service to access the schema through the user PLUSR from your HANA DB Project in the Business Application Studio.
Return to the SAP Business Application Studio and the project which you created in previous tutorials in this group. Open a new Terminal
Use add database connection option in the SAP HANA PROJECTS view.
user provided service
In the Add Database Connection wizard that opens, please select Existing User-Provided service instance as the Connection Type and then choose CC_ACCESS as the User-Provided service instance we just created. Press Add
user provided service
From the SAP HANA PROJECTS view, you should see that the User Provided Service is now part of the Database Connections of your project.
user provided service
Step 4Grant permissions to technical users
+
You will now create an artifact that grants access to the two technical users of your HDI container. These are not real users, but technical ones.
This procedure will show the session user name, the technical user (HDI object owner) executing the statement, the privilege (e.g., SELECT) and some flags starting with IS_MISSING. A TRUE value under one of those flags indicates missing authorizations.
Make sure the user in the user provided service has permissions for SELECT and SELECT METADATA with grant option.
Share feedback on this tutorial or join the conversation in SAP Community.
Submit detailed feedbackDiscuss in Community
Steps
Step 1 of 7
1. Create a plain schema2. Load data3. Create a user-provided service4. Grant permissions to technical users5. Create synonyms6. Create a view7. Troubleshooting insufficient privileges
Joule
AI Notice
Joule is an AI assistant. Generative AI may produce inaccurate, incomplete, or biased information. Always verify important details before acting on them.
Conversations are sent to SAP-hosted large language models for processing. Do not include personal data, credentials, or confidential information in your messages.
Joule's responses are based on the SAP tutorial catalog and may not reflect the latest product changes. For authoritative guidance, consult the linked tutorials and official SAP documentation.