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.

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.
- 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.
- 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.
- 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.

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.

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.

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

Use the following steps to transfer row-based authorizations from SAP BW to SAP Datasphere:
- 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.
- 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.
- Import the SAP BW/4HANA InfoProvider:
Use the Data Builder to import the SAP BW/4HANA InfoProvider with the protected data into SAP Datasphere.
- 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
- Use the protected view:
Check the protected view and use it. This view can be shared to other Spaces.