When developing SAP HANA XS applications, you must follow a comprehensive security model which ensures that all aspects of your application is secure. So, you might need to defined a set of roles and privileges that determine the scope of access offered to particular set of users.
In order to support various requirements that might come up within a specific development project, the SAP HANA security model allows you to define types of privileges. However, for the purpose of a demo application for practice, we’ll be working with only one type: application privilege. This type of privilege is used to provide application-level access to end users.
ABAP Development for SAP HANA
To create the application privilege within your SAP HANA XS application, you need to create new file called .xsprivileges. This file utilizes JSON to specify one or more privileges. Each privilege record consists of a name attribute and a description attribute. Although SAP HANA security model allows you to assign privileges directly to users, the common method of delivery is via a role assignment. So, once you create one privilege file, next step is to create a new role definition, as follows:
- Right-click on project root folder and select NEW * OTHER menu option.
- In the NEW DIALOG box, select SAP HANA * DATABASE DEVELOPMENT * ROLE OPTION. Click NEXT > to continue.
- On confirmation screen, give a name to your role and click on FINISH. This role will be used to provide basic display access to your application to end users.

Activating SAP HANA XS Project
If you’ve been following our blogs from the beginning, then all the source code artifacts created during the development process in Eclipse IDE, are initially saved to a workspace folder in your local machine. So, before you can test your SAP HANA XS application, you must first synchronize contents of this workspace folder with remote SAP HANA repository.
After the project is created and synchronized with the SAP HANA Repository, then you should activate your SAP HANA XS project, as per the procedure below:
- Right-click on SAP HANA XS project root folder and select TEAM * ACTIVATE ALL menu option.
- This will open ACTIVATE INACTIVE OBJECTS dialog box. Here, you can select or deselect the artifacts that you want to sync and click on OK button to trigger activation.
- Files will be copied to SAP HANA Repository and then activated if there are no errors.
This same process can be used to perform incremental sync-ups whenever you are testing the application and applying defect corrections.
Follow our Blog for more updates and current offers!
[hubspot type=form portal=5934508 id=b37ebdfc-5650-4300-9817-b74e08369d72]
Business Consultation and Business Model
At SAP Expert Solutions, apart from SAP services, we actively indulge ourselves in Business Consultation and improve ourselves for the good too, helping small-scale business to scale-up their business growth and individuals to make extra income!
Thus, we have started an initiative to help some of you, on a regular interval basis. Get our Business Guide on Top Successful Business Models & Ideas, specially designed and curated by our Business Support Team.
The Event Sale Timeline: 1st June 2019 – 1st October 2019
Follow and Stay tuned at SAP Expert Solutions for upcoming events and offers. So, gear up, brace yourselves and get ready for the Business Revolution!