Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
RahulSanch
Advisor
Advisor
5,394

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.

  1. Blog Post #1: Prerequisites and Setup Instructions for BW/4HANA Model Transfer
  2. Blog 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.

RahulSanch_0-1720790275599.png

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

RahulSanch_1-1720790275603.png

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

  1. Go to Semantic Onboarding and Click on SAP BW/4HANA.RahulSanch_2-1720790275608.png
  2. In the Import Entities Wizard, select the space and choose the connection from where you want to import the analytic queries and click Next StepRahulSanch_3-1720790275611.png
  3. In the Select Entities, search for the Query you want to import, example - 'ZRSA_MT_CUST3'RahulSanch_4-1720790275614.png
  4. 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,
  5. Business Entities and Consumption Models [default] - Create all possible Data Builder & Business Builder objects.​
  6. Business Entities Only - Create Data Builder objects and Business Builder business entities.​
  7. None - Create only Data Builder objects. Queries are imported as SAP Datasphere Analytic Models, which can be consumed directly in SAP Analytics Cloud.​
  8. RahulSanch_5-1720790275620.png
  9. Check the notifications section and review the objects in the repository explorer after the import is successful. 
  10. RahulSanch_6-1720790275623.pngRahulSanch_7-1720790275634.png

 

Importing Queries using Business Builder

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

RahulSanch_8-1720790275639.png

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

RahulSanch_9-1720790275640.png

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

RahulSanch_10-1720790275642.png

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.

RahulSanch_11-1720790275646.png

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.

RahulSanch_12-1720790275647.png

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:​

RahulSanch_13-1720790275650.png

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.

 

RahulSanch_14-1720790275651.png

BW Query Definition

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

RahulSanch_15-1720790275653.png

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

RahulSanch_16-1720790275654.png

Hierarchy

RahulSanch_17-1720790275656.png

Attributes

RahulSanch_18-1720790275657.png

 

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

RahulSanch_19-1720790275661.png

 

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.

RahulSanch_20-1720790275665.png

 

Example of the Restricted Key Figure

RahulSanch_21-1720790275674.png

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

RahulSanch_22-1720790275683.png

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

RahulSanch_23-1720790275688.png

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

RahulSanch_24-1720790275693.png

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

 

Example of Calculated Key Figure based on Multiple Restricted Key figure

RahulSanch_25-1720790275697.png

Embedded Calculations on the Restricted Key figure is transferred. 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.

RahulSanch_26-1720790275700.png

 

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.

RahulSanch_27-1720790275705.png

RahulSanch_28-1720790275709.png

 

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.

 

4 Comments