Part 2 – Import SAP BW/4HANA Queries into SAP Datasphere using SAP BW/4HANA Model Transfer

Estimated read time 12 min read

Introduction

SAP Datasphere BW/4HANA Model Transfer Series is intended to provide you with the guidance on how to utilize this feature to help you import existing analytic queries from you SAP BW/4HANA system into SAP Datasphere.

This article is the second in the blog post series on the BW/4HANA Model Transfer in SAP Datasphere.

Blog Post #1: Prerequisites and Setup Instructions for BW/4HANA Model TransferBlog Post #2: Import SAP BW/4HANA Queries into SAP Datasphere using SAP BW/4HANA Model Transfer

 

Importing SAP BW∕4HANA Models

Once the analytic queries in your BW/4HANA system has been released as described in Blog 1, you can import these analytic queries into SAP Datasphere in order to build new models on top of them or enhance them.

The import of SAP BW∕4HANA models enables you to re-use existing metadata and data from SAP BW∕4HANA systems so that you can include this metadata and data in SAP Datasphere without having to rebuild them manually. With the import, objects are generated in the Business Builder and the Data Builder. Data access to SAP BW∕4HANA is realized through these objects. The data is retrieved directly from the SAP BW∕4HANA system via remote tables.

You can then use these models as they are or enhance the data in SAP Datasphere on each level of your model – for example by adding master data to a view of type dimension.

The corresponding objects in the Data Builder and in the Business Builder are generated. The generated perspective has the same visual representation of the data as the SAP BW/4HANA query. Overview of metadata mapping and the deployment status after model transfer

Known Limitations – 2932647 – Supported and unsupported features with SAP BW/4HANA/SAP BW Bridge Model Transfer in SAP Datasphere

 

Importing Queries using the Semantic Onboarding

Go to Semantic Onboarding and Click on SAP BW/4HANA.In the Import Entities Wizard, select the space and choose the connection from where you want to import the analytic queries and click Next StepIn the Select Entities, search for the Query you want to import, example – ‘ZRSA_MT_CUST3’In the Review Entities Section, all the Dependent Entities along with their statuses are displayed. Create Business Builder Objects is selected as None, hence only Data Builder objects are imported. But you could choose from one of the below settings,Business Entities and Consumption Models [default] – Create all possible Data Builder & Business Builder objects.​Business Entities Only – Create Data Builder objects and Business Builder business entities.​None – Create only Data Builder objects. Queries are imported as SAP Datasphere Analytic Models, which can be consumed directly in SAP Analytics Cloud.​Check the notifications section and review the objects in the repository explorer after the import is successful. 

 

Importing Queries using Business Builder

Go to Business Builder.Click on BW/4HANA > Model Transfer Wizard to import a BW/4HANA model.​

3. Select an available BW/4HANA Model Transfer connection, which is already created. ​

4. Available BW/4HANA Analytical Queries to import into DSP are displayed.​

5. When selecting a query, you will see the objects which will be imported to the Business Builder and the Data Builder.​ The Import Status tells you if the objects already exist and will be overwritten or if they are new.

Note :

When re-importing a model, changes in the column definitions of source entities that generate remote tables will automatically result in updating and redeploying the remote tables. This is only possible for remote tables that directly access data live in the source. Before doing the re-import, you need to stop snapshot and real-time replication for any affected remote tables. This is necessary because of the inconsistent changes in the source.

If there is a remote table that needs to be updated but has been set up for replication (snapshot or real-time replication), you will be notified and asked to stop replication first as shown above.

6. Use the Create Business Builder Objects setting to control which objects to create:​

7. To import the analysis authorizations associated with the data in the query, click the Import Permissions button, and then click OK.​

Note: Only analytic queries that have been exposed in the source system for consumption in SAP Datasphere can be imported.  ​

BW/4HANA Model and the Generated Analytic Model in Datasphere

BW/4HANA Composite Provider

ZRSA_MT_CUST3 is the query we want to import into SAP Datasphere. Below is how the model is setup in SAP BW/4HANA.

 

BW Query Definition

The Query has the Calculated Key Figure, Restricted Key figure, Hierarchy and Text Attributes etc.

Most of the Infoobjects have dependent text and hierarchy attributes as well. For example, 0D_FC_CUST has dependent text and hierarchy attributes as below,

Text

Hierarchy

Attributes

 

Generated Analytic Model in Datasphere

Importing the above Analytic Query generated 63 objects in the data builder – including all the dimension, text, hierarchy, fact views and analytic model.

Go to the space to which the model was imported and click on the Analytic Model Tab and select the imported analytic model

 

Below is the generated analytic model based on the query definition, you can see that the Restricted Key Figure, Calculated Keyfigure, Dimensions with Text and Hierarchy associations is all generated automatically based on the query definition.

 

Example of the Restricted Key Figure

Restricted Key figure expression is imported as Restricted Measure inside the generated Analytic Model. The defined expression is imported correctly. 

 

Example of Restricted Key figures based on Hierarchy Node Selections

Hierarchy Nodes selections with-in the BW query is represented as corresponding flat selections in the analytic model. Hierarchy node filter is converted into an IN-LIST with its corresponding children.

 

Example of calculated Key figure with Exception Aggregation

Exception Aggregation with-in the key figure is retained in the analytic model with reference characteristics defined.

 

Example of Restricted Key figure with Constant Selection

Defined Constant Selection at the column level is transferred with selected dimension.

 

Example of Calculated Key Figure based on Multiple Restricted Key figure

Embedded Calculations on the Restricted Key figure is transfered. Expressions are generated with the restricted measures.

 

Infoobject conversion into a Dimension with text and hierarchy association

As an example, you can see below the lineage of the 0D_FC_CUST (Customer) in Datasphere. All the associated hierarchy and texts associations are automatically generated based on the infoobject definition.

 

Impact and Lineage Analysis

Further, Click on the Impact and Lineage tools to view all the imported objects and their lineage. All the objects part of the HCPR definition are imported into Datasphere.

 

Summary

The import of SAP BW∕4HANA models enables you to re-use existing metadata and data from SAP BW∕4HANA systems so that you can include this metadata and data in SAP Datasphere without having to rebuild them manually. Multiple artifacts are auto generated within few clicks based on the existing BW/4HANA Model definition, providing users a jump start for further unified analytics with other source systems connected to the Datasphere tenant.

 

 

​ IntroductionSAP Datasphere BW/4HANA Model Transfer Series is intended to provide you with the guidance on how to utilize this feature to help you import existing analytic queries from you SAP BW/4HANA system into SAP Datasphere.This article is the second in the blog post series on the BW/4HANA Model Transfer in SAP Datasphere.Blog Post #1: Prerequisites and Setup Instructions for BW/4HANA Model TransferBlog Post #2: Import SAP BW/4HANA Queries into SAP Datasphere using SAP BW/4HANA Model Transfer Importing SAP BW∕4HANA ModelsOnce the analytic queries in your BW/4HANA system has been released as described in Blog 1, you can import these analytic queries into SAP Datasphere in order to build new models on top of them or enhance them.The import of SAP BW∕4HANA models enables you to re-use existing metadata and data from SAP BW∕4HANA systems so that you can include this metadata and data in SAP Datasphere without having to rebuild them manually. With the import, objects are generated in the Business Builder and the Data Builder. Data access to SAP BW∕4HANA is realized through these objects. The data is retrieved directly from the SAP BW∕4HANA system via remote tables.You can then use these models as they are or enhance the data in SAP Datasphere on each level of your model – for example by adding master data to a view of type dimension.The corresponding objects in the Data Builder and in the Business Builder are generated. The generated perspective has the same visual representation of the data as the SAP BW/4HANA query. Overview of metadata mapping and the deployment status after model transferKnown Limitations – 2932647 – Supported and unsupported features with SAP BW/4HANA/SAP BW Bridge Model Transfer in SAP Datasphere Importing Queries using the Semantic OnboardingGo to Semantic Onboarding and Click on SAP BW/4HANA.In the Import Entities Wizard, select the space and choose the connection from where you want to import the analytic queries and click Next StepIn the Select Entities, search for the Query you want to import, example – ‘ZRSA_MT_CUST3’In the Review Entities Section, all the Dependent Entities along with their statuses are displayed. Create Business Builder Objects is selected as None, hence only Data Builder objects are imported. But you could choose from one of the below settings,Business Entities and Consumption Models [default] – Create all possible Data Builder & Business Builder objects.​Business Entities Only – Create Data Builder objects and Business Builder business entities.​None – Create only Data Builder objects. Queries are imported as SAP Datasphere Analytic Models, which can be consumed directly in SAP Analytics Cloud.​Check the notifications section and review the objects in the repository explorer after the import is successful.  Importing Queries using Business BuilderGo to Business Builder.Click on BW/4HANA > Model Transfer Wizard to import a BW/4HANA model.​3. Select an available BW/4HANA Model Transfer connection, which is already created. ​4. Available BW/4HANA Analytical Queries to import into DSP are displayed.​5. When selecting a query, you will see the objects which will be imported to the Business Builder and the Data Builder.​ The Import Status tells you if the objects already exist and will be overwritten or if they are new.Note :When re-importing a model, changes in the column definitions of source entities that generate remote tables will automatically result in updating and redeploying the remote tables. This is only possible for remote tables that directly access data live in the source. Before doing the re-import, you need to stop snapshot and real-time replication for any affected remote tables. This is necessary because of the inconsistent changes in the source.If there is a remote table that needs to be updated but has been set up for replication (snapshot or real-time replication), you will be notified and asked to stop replication first as shown above.6. Use the Create Business Builder Objects setting to control which objects to create:​7. To import the analysis authorizations associated with the data in the query, click the Import Permissions button, and then click OK.​Note: Only analytic queries that have been exposed in the source system for consumption in SAP Datasphere can be imported.  ​BW/4HANA Model and the Generated Analytic Model in DatasphereBW/4HANA Composite ProviderZRSA_MT_CUST3 is the query we want to import into SAP Datasphere. Below is how the model is setup in SAP BW/4HANA. BW Query DefinitionThe Query has the Calculated Key Figure, Restricted Key figure, Hierarchy and Text Attributes etc.Most of the Infoobjects have dependent text and hierarchy attributes as well. For example, 0D_FC_CUST has dependent text and hierarchy attributes as below,TextHierarchyAttributes Generated Analytic Model in DatasphereImporting the above Analytic Query generated 63 objects in the data builder – including all the dimension, text, hierarchy, fact views and analytic model.Go to the space to which the model was imported and click on the Analytic Model Tab and select the imported analytic model Below is the generated analytic model based on the query definition, you can see that the Restricted Key Figure, Calculated Keyfigure, Dimensions with Text and Hierarchy associations is all generated automatically based on the query definition. Example of the Restricted Key FigureRestricted Key figure expression is imported as Restricted Measure inside the generated Analytic Model. The defined expression is imported correctly.  Example of Restricted Key figures based on Hierarchy Node SelectionsHierarchy Nodes selections with-in the BW query is represented as corresponding flat selections in the analytic model. Hierarchy node filter is converted into an IN-LIST with its corresponding children. Example of calculated Key figure with Exception AggregationException Aggregation with-in the key figure is retained in the analytic model with reference characteristics defined. Example of Restricted Key figure with Constant SelectionDefined Constant Selection at the column level is transferred with selected dimension. Example of Calculated Key Figure based on Multiple Restricted Key figureEmbedded Calculations on the Restricted Key figure is transfered. Expressions are generated with the restricted measures. Infoobject conversion into a Dimension with text and hierarchy associationAs an example, you can see below the lineage of the 0D_FC_CUST (Customer) in Datasphere. All the associated hierarchy and texts associations are automatically generated based on the infoobject definition. Impact and Lineage AnalysisFurther, Click on the Impact and Lineage tools to view all the imported objects and their lineage. All the objects part of the HCPR definition are imported into Datasphere. SummaryThe import of SAP BW∕4HANA models enables you to re-use existing metadata and data from SAP BW∕4HANA systems so that you can include this metadata and data in SAP Datasphere without having to rebuild them manually. Multiple artifacts are auto generated within few clicks based on the existing BW/4HANA Model definition, providing users a jump start for further unified analytics with other source systems connected to the Datasphere tenant.    Read More Technology Blogs by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author

+ There are no comments

Add yours