2024 Apr 30 12:08 PM
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
2024 Apr 30 4:01 PM
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
2024 May 22 8:31 AM
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
2024 May 22 8:20 PM
Thanks Wanda for the response. Yes, all great points and clarifications. Appreciate it.
2024 May 02 8:43 AM
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
2024 Dec 04 2:36 AM
Hi @Wanda_Soetomo , @tunc , @FrankRiesner
I am facing a problem of columns not visible in the projection node of calculation view and using the same setup to access datasphere views. The grant file doesn't have select metadata privelege and no roles assigned to the application user as well. Please let me know this is correct
Thank you!
Regards,
Armaan
2024 Dec 04 6:55 AM
Hi Armaan,
did you create a Synonyme in your Business Application Studio to access Datasphere View as data source for your Calculation View? After that you have to grant SELECT privilege, so the application user has the authority to execute "SELECT" on this Synonyme. Please reffers to Step 10 and 11 in my article above.
Best Regards
2024 Dec 05 3:00 AM
Hi @Wanda_Soetomo , Thank you for your reply. Yes, I did exactly the same and able to see the object in the calculation view but columns are not visible in that object. The role "SELECT" is assigned to the object owner in the grant file but while doing the same to application user, it throws me an error "Unsupported Feature: Cannot grant the requested DSP_ACCESS_HDI_DSPACCESS_DB_1::access_role grantee)". Please let me know if i am missing anything here?
Thanks a lot for the help!
2024 Dec 05 3:51 AM
Thanks, the above issue is resolved. I was missing the correct name for the role