SAP HANA Database as a Basis for Existing SAP BW Installations

More and more users of SAP systems are implementing the SAP HANA database as the basis for existing SAP BW installations. The advantage of an SAP HANA database for a BW system is that SAP HANA views can be generated when BW objects are created. All generated SAP HANA views are of the type Calculation View. By generating SAP HANA views, BW data is published to SAP HANA, whereby these SAP HANA views point directly to the data and tables. This allows the BW data to be consumed directly in SAP HANA. It is not recommended to change calculation views created by BW systems on the SAP HANA database, as the Calculation Views can be overwritten again by the BW system at any time (source: help.sap.com).

Manual Assignment of Privileges is Time-Consuming and Error-Prone

In order to be able to select the Calculation Views, a user needs the corresponding HANA privileges on the SAP HANA database. The assignment of the privilege is done manually via an administrator. The manual assignment of permissions is not very efficient and, depending on the number of Calculation Views to be authorised, can very quickly take several hours or even days.

In this blog post, we present a way to automate the authorisation of Calculation Views. This automation process also applies to the Calculation Views which are created directly on the SAP HANA database.

Required Database Objects

To automate the authorisation of Calculation Views on the SAP HANA database, some SAP HANA database objects have to be created and configured accordingly. The following table provides the necessary overview and description.

SAP HANA Database Objects Description

Calculation View

The Calculation View is created from the BW system on the SAP HANA database.

CSV

The CSV file simplifies the maintenance of (new) Calculation View permissions. Here the roles are assigned to the Calculation Views to be authorised.

HDBTable

The HDBTABLE creates a database table that reflects the content of the CSV file.

HDBTI

The HDBTI object fills the HDBTABLE with the content from the CSV file.

HDBSchema

For some database objects, an HDBSCHEMA object must be created, e.g. Stored Procedure or HDBTABLE.

Role

In the HANA roles, the SELECT rights of calculation views are added according to the mapping table (CSV).

Stored Procedure

The procedure determines the unauthorised Calculation Views and performs the authorisation.

XS Job

The XS job calls the stored procedure.

XS Job Schedule

An XS job schedule controls the execution of the XS job by means of an XS cron.

Technical User

The technical user executes the XS job.

Example Scenario

The repository role authorization.roles.calulationview::SELECT_CALCULATION_VIEW is to be extended with a SELECT privilege for the Calculation View MyCalcView. The state of the repository role before assignment has no object privileges. This can be checked in HANA Studio under HANA Administration View as follows.
The repository role authorization.roles.calulationview: :SELECT_CALCULATION_VIEW is to be extended with a SELECT privilege for the Calculation View MyCalcView. The state of the repository role before assignment has no object privileges. This can be checked in HANA Studio under HANA Administration View as follows.
Automatische Berechtigung Von Calculation Views​
  1. Filtering the runtime role name under Security/Role
  2. Opening the Object Privileges Tab of the Runtime Role

The Calculation View to be authorised is located in the repository under the bigcube.app.vha and is entered into the control table as follows.

  1. CATALOG_ROLE_NAME: The role name must be entered here without a wildcard.
  2. CALCULATION_VIEW_PATH: The path is entered here (wildcard possible)
  3. CALCULATION_VIEW_NAME: The name of the Calculation View is entered here (wildcard possible).

The CSV file can be opened with Microsoft Excel. The per cent sign serves as a wildcard in the Excel table. The path is provided with a wildcard here and the name of the Calculation View is entered at the end with a wildcard. The wildcard can be used for the columns CALCULATION_VIEW_PATH and CALCULATION_VIEW_NAME as desired, for example also in the view name MyCalcView%. After the control table has been maintained, the CSV file must be saved and activated. Only then is the mapping valid.

The XS job will now perform the mapping according to the control table. As soon as the mapping has been carried out, the role is automatically extended by the corresponding Calculation View authorisation (SELECT).

  1. Filtering the runtime role name under Security/Role
  2. Opening the Object Privileges Tab of the Runtime Role
  3. Open object privileges of the selected object (Calculation View)
Each execution of an XS job creates a log entry in the log table. To ensure that the log table is also tidied up accordingly, care must be taken to clean up the log table. The clean-up can be done in the stored procedure called by the technical user.

Conclusion

The HANA Native database objects to be created must be adapted and defined according to customer requirements.

  • HDBSchema
  • HDBTable
  • HDBTI
  • CSV
  • XS Job
  • Technical User

The following HANA Native database objects are implemented according to customer requirements. The logic of the automation is integrated in these objects. Our experts from the SAP Basis team will be happy to support you in this (learn more about SAP Basis and Hana Platform Services >>).

  • Stored Procedure
  • XS Job Schedule
  • HDBRole

With this process, the Calculation Views on the SAP HANA database can now be authorised automatically. The Calculation View permissions are controlled from a central location in the form of an Excel spreadsheet. This saves you the manual effort of authorising new Calculation Views. Automation is also possible for other HANA Native objects, for example HDBSchema, HDBView, HDBTable, HDBdd …

Written by Veli Hasanca

Get In Touch With Us Now

Share Post

More Exciting Topics from our Newsroom

We are one of “Germany’s best employers”

As one of Germany's top 100 employers with renewed 'Great...

Read More

Shortcuts for SAP BW in Eclipse

This blog post explains five simple shortcuts to make working...

Read More

Bavarian Curling with the BIG.Cube

BIG.Cube employees went bavarian curling together after work. Find out...

Read More