Introducing Model Transfer

Objectives

After completing this lesson, you will be able to:
  • Describe the steps of the hybrid approach with SAP BW/4HANA
  • Describe the steps of semantic onboarding from SAP S/4HANA

The Steps of the Hybrid Approach with SAP BW/4HANA

Suppose you have already created some BW models and BW queries and want to add additional layers with additional features or you want to combine data from different SAP BW/4HANA systems using SAP Datasphere. For this reason, you want to import the BW query and transfer as many of the semantic properties as possible.

Steps to the Hybrid Approach of SAP Datasphere with SAP S/4HANA. First, create a connection, then import entities, then load data.

As you know, the semantic onboarding app of SAP Datasphere core tenant offers this model transfer. As a prerequisite for the model transfer from SAP BW/4HANA, you need to install the cloud connector, a data provisioning agent, and a live data tunnel. This is done on server level and in the System navigation area under the path Configuration ﹥ Data Integration ﹥ Manage Live Data Connections.

Note

If you want to become an expert on technology: Accessing SAP BW/4HANA meta data and importing models into SAP Datasphere with an SAP BW/4HANA Model Transfer connection requires two protocols (or endpoints): HTTP and SAP HANA Smart Data Integration based on the SAP HANA adapter.

You need to connect via Cloud Connector and use HTTP to securely connect and make requests to the SAP BW∕4HANA system. This requires that you create a live data connection of type tunnel to the SAP BW∕4HANA system. SAP HANA SQL is used to connect to the SAP HANA database of SAP BW∕4HANA via Data Provisioning Agent.

Perform the following steps to get data from SAP BW/4HANA.

  1. In SAP Datasphere core tenant, create a connection in the target space. The connection must be of type as SAP BW model transfer and it must contain the live data tunnel to SAP BW/4HANA.
  2. Open transaction RSDWC_QUERY of the sending SAP BW/4HANA. Create a variant of the query (to set variable values if it contains variables) and release it for model transfer.
  3. From the Semantic Onboarding app of SAP Datasphere, choose SAP BW/4HANA Model transfer and start the import.

Launch the following video to create a connection with a live data tunnel.

The SAP BW/4HANA model transfer wizard guides you through the required steps.

screen capture of the two ways to start the model transfer: Import Entities from Data Builder, or Semantic Onboarding SAP BW/4HANA

There are two ways to start the model transfer:

  • Import Entities from Data Builder
  • Semantic Onboarding, tile SAP BW/4HANA

The subsequent steps are slightly different. You specify the target space, the connection and thus the source system, and some entities you want to import to SAP Datasphere.

The following steps are to select a target space, to select a connection, to select entities, and to import and deploy them.

Finally, the system shows all related objects. A few minutes after you start import and deployment, you will find the corresponding generated SAP Datasphere objects in the data builder.

Launch the video to see how to import a query and all its dependent objects from SAP BW/4HANA to SAP Datasphere.

For a BW query, and analytic model is generated with corresponding elements. For example, for each formula of the BW query, a corresponding calculated column is created. Some additional auxiliary columns might be created.

For the underlying InfoProvider, an SQL view (Fact view) is generated.

For the underlying physical tables of DataStore object and InfoObjects, remote tables are generated.

For each InfoObject, the system generates the following objects:

  • If the InfoObject has attributes, a view with Semantic Usage Dimension is created
  • If the InfoObject has texts, a view with Semantic Usage Text is created
  • If the InfoObject has hierarchies, one or more views with Semantic Usage Hierarchy or Hierarchy with Directory are created

The attribute text, and hierarchy views are connected to the fact view by SAP Datasphere association.

Launch the video to see how to see which objects were generated by the BW/4HANA Model Transfer.

Building Additional Models on Top of Imported Entities

Suppose you need additional fields or calculations. You should not change the generated entities because these changes would be overwritten when the object is imported again. Instead, generate additional models. To separate modeling authorizations, it might be useful to generate them in a dedicated space.

Image illustrating how to consume the result of the model transfer. To integrate a remote table that was imported, share it with another space. Integrate the shared object when you create a view, create an analytic model.

To further integrate the data with objects from another customer space, share the remote table with the other space. The shared object can be integrated in views and analytic models.

Authorization Transfer

Suppose you have already defined row-based authorizations (Analysis Authorizations) in SAP BW/4HANA. They take affect when business users want to analyze data from InfoProviders. Data access shall be restricted in SAP Datasphere based on analogous row-based authorizations. This means, you need to generate a data access control that behaves in the same way as the role assignment in SAP BW/4HANA and apply it to a corresponding dataset

Objects involved in transferring Analysis Authorizations from SAP BW/4HANA and the steps to create them. Refer to the text below.

Use the following steps to transfer row-based authorizations from SAP BW to SAP Datasphere:

  1. Write Analysis Authorizations into a permission table:

    Use SAP BW/4HANA Transaction RSDWC_DAC_RSEC_GEN to define a scope (based on User and InfoProvider) and export corresponding analysis authorizations to a Permission Table in SAP BW/4HANA. The technical name of this permission table is RSDWC_RSEC_DAC.

  2. Import the permission table:

    Import the permission table to SAP Datasphere. Moreover, a Filter Clause is generated in which, by default, the remote user from SAP BW/4HANA is replaced by the SAP Datasphere user which is the eMail address. A BAdI is provided for other logic of replacement.

  3. Import the SAP BW/4HANA InfoProvider:

    Use the Data Builder to import the SAP BW/4HANA InfoProvider with the protected data into SAP Datasphere.

  4. Run a generated SQL script to expose the permissions for each user:

    For each remote InfoProvider selected for protection, a script is generated. When you run the script, the following objects are genarated:

    • A so-called Input Permission View.
    • A Data Access Control (DAC) based on the filter clause (from step 2.)
    • A view of the SAP BW/4HANA InfoProvider protected by the Data Access Control
  5. Use the protected view:

    Check the protected view and use it. This view can be shared to other Spaces.

The Steps of Integrating Data from SAP S/4HANA

Suppose you have already created some models based on CDS views and want to add additional layers with additional features or you want to combine data from different S/4HANA systems using SAP Datasphere. For this reason, you want to implement the CDS views as models.

Steps to the Integration Approach of Data from SAP S/4HANA. First, create a connection, then import entities, then load data.

You need the following steps to get data from SAP S/4HANA.

  1. Create a connection: The connection must be chosen carefully as cloud or on-premise connection. For the connection, you need to specify a live data tunnel. (The process is described in the previous lesson, hybrid scenario with SAP BW/4HANA,)
  2. Start from Semantic Onboarding to import entities. Choose the connection, the target space and the objects. The system will show all required objects. Import and deploy.
  3. After successful deployment, run the generated replication flow to fill the generated local tables.

Make sure that the view in SAP S/4HANA that you want to transfer has the dataExtractionEnabled: true" annotation. For views with this annotation, a remote table, a replication flow, and a local table (as target of the replication flow) are generated.

The replication flow can be scheduled. Monitor the result in the Data Integration Monitor. Open the target table for a data preview.

Launch the following video to see how you can create a connection.

Launch the following video to see how you use the connection to import entities.

Now, you can use this table as a source for further transformations and combinations. This can be done physically using a transformation flow or data flow, or virtually using views and analytic models. The process is similar to the one sketched in the previous lesson.

Log in to track your progress & complete quizzes