Hybrid Scenario: Usage of SAP HANA Calculation View on SAP Datasphere

Overview

Many users have implemented many HANA Calculation Views on top of SAP BW/4HANA and may asking, how they can use these HANA Calculation Views on SAP Datasphere.

This article describes how you can use HANA Calculation View to access data from SAP Datasphere (BW-Bridge space or Datasphere native space via Datasphere View).

How to get this working we need to bring our BW objects into BW Bridge. As soon as BW objects are brought to BW Bridge, we will find BW objects as Remote Tables in BW Bridge space in SAP Datasphere. Instead of using BW objects via BW Bridge you can also use ABAP or HANA tables directly via system connection.

After that we need to share this Remote Tables to SAP Datasphere native space. In this space we have to create Datasphere View based on these shared Remote Tables.

Via user-provided-service HDI Container we can see the SAP Datasphere Views and we have directly access the data. Via HDI-shared Container, in which HANA Calculation Views will be deployed, we have an access to Datasphere Views in user-provided-service HDI Container. Therefore we can create HANA Calculation Views and use Synonymes (pointed to Datasphere Views in user-provided-service HDI Container) as datasources.

 

Wanda_Soetomo_0-1714466600650.png

1. Create BTP Dev Space

2. Create a new Database Project from template

3. Create a new HDI service instance (HDI-shared)

4. Connect to Cloud Foundry

5. Bind user provided service

6. Build and deploy project

7. Share your BW Bridge in BW Bridge Space to native Datasphere space

8. Create Datasphere View with shared BW Bridge object as data source

9. Create Remote Table in native Datasphere Space

10. Grant access to SAP Datasphere objects

11. Create Synonymes to have an access to Datasphere objects

12. Build and deploy project

13. Create a new HANA Calculation View with Synonymes as data source

Precondition

User-provided service and its relevant database user are created on the SAP Datasphere target space (not BW Bridge space)

Wanda_Soetomo_1-1714466941937.png

To be migrated BW objects are already in BW Bridge or the needed HANA database connection for direct access via Tables is implemented to SAP Datasphere space (in which user-provided service is enabled).

Implementation

1. Create BTP Dev space

Wanda_Soetomo_2-1714468364070.png

Create application in BTP Dev space

Wanda_Soetomo_3-1714468395521.png

Start Business Application Studio with clicking on the Dev space

Wanda_Soetomo_4-1714468432937.png

2. Create a New Business Application Project

Wanda_Soetomo_5-1714468469646.png

Choose SAP HANA Database Project

Wanda_Soetomo_6-1714468491776.png

Enter SAP HANA Database Project Name

Wanda_Soetomo_7-1714468515446.png

Enter module name = db

Wanda_Soetomo_8-1714468536931.png

Choose Database Version and bind database module to run-time service instance

Wanda_Soetomo_9-1714468560786.png

3. Create a new HDI service instance 

Wanda_Soetomo_10-1714468609571.png

Note!
If the service instance name (hdi-shared) has not been created than please make entry as shown on the left side. The service instance name will be created in Cloud Foundry and you can find it with command: cf8 services.

4. Login to Cloud Foundry (if you are still not logged in to Cloud Foundry) 

Use Command Palette to open the login

Wanda_Soetomo_11-1714468687967.png

Note!
Normally you do not need to use Command Palette, since you will be asked to login to Cloud Foundry, if you are not connected

Enter Endpoint and open new browser to generate SSO passcode (if you are still not logged in to Cloud Foundry)

Wanda_Soetomo_12-1714468736137.png

Generate SSO passcode (if you are still not logged in to Cloud Foundry)

Wanda_Soetomo_13-1714468760103.png

Paste the SSO passcode and login (if you are still not logged in to Cloud Foundry)

Wanda_Soetomo_14-1714468781388.png

Select organization and space

Wanda_Soetomo_15-1714468795075.png

5. Bind user provided service

Add database connection for the UPS (User Provided Service)

Wanda_Soetomo_16-1714468841304.png

Wanda_Soetomo_17-1714468854460.png

Note!
The user-provided service instance name can be found in Cloud Foundry with command: cf8 services.

Wanda_Soetomo_18-1714468888390.png

Check MTA.YAML file (DO NOT MODIFY)

After connecting with the user-provided service instance, the YAML file is automatically modified as follow:

Wanda_Soetomo_19-1714468922347.png

Wanda_Soetomo_20-1714468947218.png

Note!
Please do not make any modification in MTA.YAML file. The file will be modified during adjustment in Database connection (see above)

Bind the user-provided service

Wanda_Soetomo_21-1714468983554.png

Wanda_Soetomo_22-1714468988914.png

Note!
After bind icon is klicked the pop up will show as seen below and choose the user-provided service (in this case „Datasphere_XXXXXXXXX“)

6. Build and deploy project

Wanda_Soetomo_23-1714469058814.png

Note!
The database objects will be builded and deployed in the hdi-shared service

Wanda_Soetomo_24-1714469081117.png

Open Database Explorer to see deployed objects

Wanda_Soetomo_25-1714471198701.png

Wanda_Soetomo_26-1714471207190.png

Check project structure

Wanda_Soetomo_27-1714471247193.png

Note!
File structure should looks like on the left side and still empty.

7. Share BW Bridge objects to native Datasphere Space

Share BW Bridge objects to native Datasphere Space

Wanda_Soetomo_28-1714471621847.png

Note!
The objects have to be migrated first into BW Bridge

Share BW Bridge objects to native Datasphere Space

Wanda_Soetomo_29-1714471645701.png

Open Data Builder in native Datasphere Space

Wanda_Soetomo_30-1714471669709.pngWanda_Soetomo_31-1714471677207.png

8. Create Graphical View in native Datasphere Space

Wanda_Soetomo_32-1714471729307.png

Wanda_Soetomo_33-1714471738071.png

Deploy Graphical View

Wanda_Soetomo_34-1714471764019.pngWanda_Soetomo_35-1714471769534.png

Note!
By using Graphical View the object is visible in user-provided service (HDI Container: Datasphere_XXXXXX)

9. Create Remote Table in native Datasphere Space

Wanda_Soetomo_36-1714471905869.png

Choose connection

Wanda_Soetomo_37-1714471917378.png

Filter and select table / view

Wanda_Soetomo_38-1714471928340.pngWanda_Soetomo_39-1714471936866.png

10. Grant access to SAP Datasphere objects

Wanda_Soetomo_40-1714472109179.png

11. Create Synonymes to have an access to Datasphere objects

Wanda_Soetomo_41-1714472163564.png

Wanda_Soetomo_43-1714472222122.png

Note!
The access on Datasphere objects is feaseble through synonyme

Create default access role

Wanda_Soetomo_42-1714472208042.png

12. Build and deploy the project

Wanda_Soetomo_44-1714472319673.png

Wanda_Soetomo_45-1714472325193.png

13. Create a new HANA Calculation View with Synonymes as data source

Wanda_Soetomo_46-1714472367402.pngWanda_Soetomo_47-1714472376700.png

Add Data Source

Wanda_Soetomo_48-1714472393905.png

Choose Synonym as Data Source

Wanda_Soetomo_49-1714472404926.png

Open details panel of projection

Wanda_Soetomo_50-1714472419016.png

Fields mapping

Wanda_Soetomo_51-1714472429974.png

Connect Projection node to Aggregation node

Wanda_Soetomo_52-1714472491525.png

Expand details panel of Aggregation node

Wanda_Soetomo_53-1714472507917.png

Fields mapping of Aggregation node

 

Wanda_Soetomo_54-1714472521744.png

Build and deploy Calculation View

Wanda_Soetomo_55-1714472533742.png

Data Preview

Wanda_Soetomo_56-1714472546990.pngWanda_Soetomo_57-1714472553740.png

Summary

As mentioned above we are now able to access SAP Datasphere data via SAP HANA Calculation View. We can also use our existing on Premise HANA Calculation View (XS Classic or XS Advanced) on top of SAP Datasphere by importing it in Business Application Studio, but datasource and field replacements need to be made, since the datasource name as well as fieldnames could be differs. 

@Adam Kosak & @Gabriel Aras: thanks for your support.

Please let me know, if you have any questions.

Thank you

Scroll to Top