4 weeks ago
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.
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)
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
Create application in BTP Dev space
Start Business Application Studio with clicking on the Dev space
2. Create a New Business Application Project
Choose SAP HANA Database Project
Enter SAP HANA Database Project Name
Enter module name = db
Choose Database Version and bind database module to run-time service instance
3. Create a new HDI service instance
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
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)
Generate SSO passcode (if you are still not logged in to Cloud Foundry)
Paste the SSO passcode and login (if you are still not logged in to Cloud Foundry)
Select organization and space
5. Bind user provided service
Add database connection for the UPS (User Provided Service)
Note!
The user-provided service instance name can be found in Cloud Foundry with command: cf8 services.
Check MTA.YAML file (DO NOT MODIFY)
After connecting with the user-provided service instance, the YAML file is automatically modified as follow:
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
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
Note!
The database objects will be builded and deployed in the hdi-shared service
Open Database Explorer to see deployed objects
Check project structure
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
Note!
The objects have to be migrated first into BW Bridge
Share BW Bridge objects to native Datasphere Space
Open Data Builder in native Datasphere Space
8. Create Graphical View in native Datasphere Space
Deploy Graphical View
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
Choose connection
Filter and select table / view
10. Grant access to SAP Datasphere objects
11. Create Synonymes to have an access to Datasphere objects
Note!
The access on Datasphere objects is feaseble through synonyme
Create default access role
12. Build and deploy the project
13. Create a new HANA Calculation View with Synonymes as data source
Add Data Source
Choose Synonym as Data Source
Open details panel of projection
Fields mapping
Connect Projection node to Aggregation node
Expand details panel of Aggregation node
Fields mapping of Aggregation node
Build and deploy Calculation View
Data Preview
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
4 weeks ago
Hi @Wanda_Soetomo,
Thanks for a great post. As you mentioned 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. That's a very reasonable question. It's a valid use case for BW & BW/4HANA users who want to use SAP Datasphere.
You've shown us how to create an SAP HANA Database project in the Business Application Studio and how to use Datasphere HDI containers and views in the project. It's good to see all the pieces coming together here and there. As a final step, you've created a HANA Calculation view in the project. Now what? Can we do more with this HANA view? Since the core question is how they can use these HANA Calculation Views on SAP Datasphere. Can't Can't we just use HANA Calculation View to access data from SAP Datasphere (BW Bridge space or Datasphere native space via Datasphere View) and create graphical views / SQL views in Datasphere? If we have done it, we have simply shown how to do it! Don't we need to abandon HANA Calculation Views in Datasphere world? Users who create HANA Calculation Views in their old world should forget about continuing HANA Calculation Views, instead they need to dive into Datasphere world and use modeling options. Am I seeing right? 🙂
Regards,
Tuncay
Wednesday
Thank you for your questions! I apologize for the delay in my reply.
This approach provides a temporary solution for users with complex logic in their HANA Calculation Views (graphical views). It allows them to leverage their existing CVs against data in the BW Bridge space of SAP Datasphere with minimal effort when migrating to the cloud.
For Calculation Views with moderate or simple logic, we recommend a greenfield approach: modeling them directly within SAP Datasphere (without using the BW Bridge).
Our team has developed a tool to automate data integration for ABAP Tables, xDSOs, ABAP CDS Views, and SAPI/BAPI/ODP Extractors into SAP Datasphere. This simplifies the data integration process.
Following data integration, we recommend using 3NF principles to create a robust data model in Datasphere. Analytical models for SAC can then be built on top of this solid foundation.
Once the simpler and moderately complex CVs have been addressed, users can adopt the same greenfield approach for complex ones.
At the BTP Partner Summit in Heidelberg, SAP mentioned their development efforts regarding Calculation View onboarding (from HANA Cloud) into SAP Datasphere. Unfortunately, the Datasphere Roadmap currently lacks details on this functionality. This will be very interesting, then this new functionality will close the gap that you have mentioned. It means, that the users have to migrate their CV in HANA Cloud first before they can use the new onboarding function to bring Calculation View (on HANA Cloud) into SAP Datasphere.
The key question remains: will these onboarded Calculation Views be compatible with the existing data model in SAP Datasphere?
I hope, all of your questions are answered 😊
Best regards,
Wanda
Wednesday
Thanks Wanda for the response. Yes, all great points and clarifications. Appreciate it.
3 weeks ago
Hi,
I agree to Tuncay. Although there might be exceptional scenarios where it makes sense to user SAP Datasphere content in the classic onPrem environments (another example is consumption of Datasphere Views in BW via a SDA remote connection, see https://community.sap.com/t5/technology-blogs-by-sap/bestpractice-how-to-use-sap-datasphere-as-sourc... ), the strategic general approach should be to move towards SAP Datasphere and its data acquisition and modeling concepts. This is the future-proof skillset required.
KR Frank