Are you wondering what the best way is to manage changing data structures? Do you want to know how to collaborate more efficiently when working in development projects?
To answer the first question, learn what benefits different table types in SAP HANA Cloud, SAP HANA database can offer you based on your needs. The following 3 tutorials in this tutorial group will help you navigate through your challenges with the managing data structures:
Get started to collaborate in SAP Business Application Studio
Import data into a table in SAP HANA Database Project
Change data structures using HDBTABLE and HDBMIGRATIONTABLE objects
To answer the second question, create template projects that help you set up service connections, handle synonyms and prepare authorization management. You can create these templates once in the beginning and give your project team members a head-start. Using the template, they can build on your work and can quickly start working productively. The following 4 tutorials in this tutorial group will help you learn how to collaborate efficiently:
You are here โPrepare your SAP HANA Database Project for collaboration
Generate users and roles for assigning privileges
Enhance your project with services, synonyms and grants
Collaborate on an SAP HANA Database Project template
This tutorial will show you how to prepare your SAP HANA Database Project for collaboration.
Step 1Create a role with grant option
โ
Now that you know the difference between hdbtable and hdbmigration table objects when changing data structures, we need to prepare some rights for the next tutorials. In this tutorial, you will create roles with specific permissions to give other users access to these tables. This is necessary, e.g., for creating calculation views, which you will do in the last tutorial.
First, we want to create a role that contains SELECT privileges with grant option, which means when someone is assigned this role, they can grant this privilege to others themselves.
From the explorer panel on the left side of SAP Business Application Studio, expand the folders under your project WS3_1.
Select the src folder and press F1 key or click on View โ Find Command at the top of the screen to open a search prompt. Enter HANA in the field and from the dropdown list of functionalities, choose SAP HANA: Create SAP HANA Database Artifact.
In the window for creating a new SAP HANA Database Artifact, click on the folder icon in the first field. Navigate to your project, the src folder, and then click on Open.
Select the artifact type as Role hdbrole.
Create hdbrole
Under ‘Specify the artifact name’ option enter the name inventory_with_grant.
The database version should be HANA Cloud, by default. Without making any further changes, click on Create.
Step 2Assign privileges to the role with grant option
+
A new file inventory_with_grant.hdbrole can be seen under the src folder in the EXPLORER panel. Click on this role file to open the Role Editor window.
Click on Edit for the Role name. Rename it as inventory_with_grant#.
Edit hdbrole name
IMPORTANT
The # character at the end of the role name is necessary to create this role. Whenever you create roles with grant or admin options, they need to have a # character at the end of the role name.
Next, click on the tab Object Privileges. In the column Object Name, click on theExplorer Iconicon in the first row.
A wizard will open with all the objects available to you to select from. Since we have only created one object so far, the only object available is the table INVENTORY. Click on it to select it.
In the column Privileges with Grant Option, click on the arrow where it says Choose privileges to select from a list of privileges with grant option that you want to assign to this role.
Privileges with grant
Check the SELECT privilege.
Step 3Create a second role without grant option
+
Now you will create a new role having privileges without the grant option. Repeat the steps from the previous step with a few modifications:
When creating the object, under ‘Specify the artifact name’ enter the name inventory_without_grant.
Once the file inventory_without_grant.hdbrole can be seen under the src folder in the explorer panel, open this role file in the Role Editor.
Explorer view of new hdbrole
Again, in the tab Object Privileges, in the field Object Privileges, select the table INVENTORY .
In the column Privileges, click on the arrow where it says Choose privileges to select from a list of privileges that you want to assign to this role.
Privileges
Check the SELECT privilege.
Now that both roles are created, you can deploy both files individually or deploy the whole project by clicking on theDeploy Icondeploy icon in the SAP HANA Projects panel. Once you see in the terminal that the project was deployed successfully, you can continue.
These roles will be used in the last tutorial to share calculation views among different users.
Step 4Create a new repository in GitHub
+
When collaborating with others on development projects, pushing your files to a git repository is very helpful. In this last section, we will establish a connection to GitHub, create a new repository and sync our development project with the repository.
Open https://github.com/ on a new browser tab. Enter your GitHub account using your credentials.
On the top right corner of the screen, click on the profile icon in the top right corner and select Your repositories.
In the top right corner, click on New to create a new repository.
New Git repository
Under Create a new repository, enter WS3_1 as the Repository name.
Optionally, you can add a short description.
You can choose to make your repository visible publicly or privately. In this case, it is recommended that you select the option Private.
Click on Create repository to finish. Your first step is done, and you have an empty repository ready to have the content from your development project.
Create repository
Step 5Generate a GitHub token
+
There are two ways of connecting to a GitHub project: SSH and HTTPS. SSH requires you to use your GitHub password and HTTPS requires the use of a token. We recommend using HTTPS for higher security. In this step we will create a GitHub token that can be used to connect to git.
On the top right corner of the screen, click on your GitHub profile icon and choose Settings.
Scroll down the Settings page to find Developer settings on the left side of the screen and select it.
In Developer Settings, select Personal access tokens.
Click on Generate new token at the top right corner of the screen. You will be asked to sign in using your GitHub account password.
Generate tokens
After signing in, enter a name for the token (for example: MyNewToken) under the caption Note.
My new token
Next you can select an expiration date.
Under Select scopes, you can select both repo and notifications. Click on Generate token to complete generation.
Copy the new token you generated and paste it in a safe location that could be accessed later.
Token
CAUTION
After you proceed to the next step, you cannot go back to view the token again unless you have saved it in another location. In such a case, you will need to generate a new token.
Step 6Connect your development project to GitHub
+
Go back to SAP Business Application Studio.
On the left menu, click on theSource Control Iconicon to go to the Source Control panel. Here, you can see all the recent updates to your project that have not been pushed to GitHub yet. In this panel, you can also administer your GitHub connection and changes from a menu instead of using the terminal.
Git icon
Open a terminal by clicking on Terminal at the top navigation bar and select Open Terminal.
Paste the following command in the terminal and hit Enter.
Shell/Bash
git init
Git initialized
This will initialize the empty Git repository.
Type first commit in the Message box under the Source Control panel. Click on the tick mark icon at the top of the panel to stage all your changes and commit them.
first commit
Select Yes or Always, if you encounter a message box asking what action to take when the commit (tick mark) icon is selected.
You have now committed all the changes made to the data structures during this session. Next, you will add the remote origin and push the staged changes to your repository.
Step 7Add a remote origin via HTTPS connection
+
Go to the terminal and paste the following command. Before you hit Enter, replace Username with your GitHub username and Repository name with your GitHub repository name. (in this case for example: WS3_1)
Paste the following command into the terminal and press Enter.
Shell/Bash
git fetch
A prompt will open at the top center of the screen.
There, enter your Git username and press Enter.
Git username for connection
Next, paste the token you had generated from GitHub in the prompt and press Enter.
You may save these credentials for future use by selecting the option to do so.
Paste the following command into the terminal and press Enter.
Shell/Bash
git push -u origin master
Code

This pushes all the committed changes to the GitHub repository.
You can go back to your GitHub repository and verify that all the folders of your project are present in it.
>You have successfully completed the fourth tutorial. In the next tutorial, you will generate users and roles for assigning privileges necessary for collaborating on the project.
### Test yourself
</div><div class="step-validation-mount"
data-step="7"></div>
<div class="step-actions">
<button class="fd-button fd-button--emphasized" data-action="mark-done" data-step="7">Done</button>
</div>
</div>
</div>
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 role with grant option2. Assign privileges to the role with grant option3. Create a second role without grant option4. Create a new repository in GitHub5. Generate a GitHub token6. Connect your development project to GitHub7. Add a remote origin via HTTPS connection
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.