Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

spaceman127

SAP Mirroring in Microsoft Fabric with SAP Datasphere How to - Part 2 SAP and Fabric

SAP Part 6a - Configuration of SAP Datasphere source

 

Once all connections are in place, we can continue working in Datasphere.

To do this, go to Connections. Here we need to add the source and later the target.

The source, as described, will be an SAP S/4HANA on‑premise environment. To make the source data available for Microsoft Fabric later, I will create an Azure Data Lake Gen2 storage account, where we will write the data using a Replication Flow.
After that, we can access the source via Shortcuts and then set up Mirroring.

But first, let’s take care of the connections.

Follow these steps:

  1. Click the plus icon to add a new connection.
  2. Search for SAP S/4HANA On‑Premise or the source system you want to add.
  3. Fill in the required fields:
    • Application Server – this can be an IP address or a DNS name
    • System Number
    • Set Use Cloud Connector to true and select the Cloud Connector that was configured for this purpose.
    • Enter the User Name and Password.
  4. Configure the remaining settings as needed.

In the Screenshot Step 4 - Show the Connection Details see what I have configured.

In the next step we configure a target.

 

 

1. Create Connection1. Create Connection 2. Use SAP S4/Hana On-Premise2. Use SAP S4/Hana On-Premise 3a. Fill out the fields3a. Fill out the fields 3b. Fill out the fields3b. Fill out the fields 4. Connection details4. Connection details

 

SAP Part 6b SAP Datasphere create target

 

Now let’s move on to the target system.

For this, I created an Azure Data Lake Gen2 in Microsoft Azure.

Below is the Microsoft documentation that explains how to set it up.

https://learn.microsoft.com/en-us/azure/storage/blobs/create-data-lake-storage-account

Additionally, you need to assign the required permissions so that SAP Datasphere can access it. In my case, I used the Shared Key (Account Key) to establish the connection from SAP Datasphere.
However, the recommended approach is to use a more granular permission model and only grant the minimum permissions required.

The following steps need to be performed here as well:

  1. Copy the Storage Account Name and Account Key from the Storage Account in Azure.
  2. Click Create Connection.
  3. Search for Data Lake.
  4. Enter the copied Storage Account Name.
  5. Paste the Account Key that you copied earlier.
  6. In the next step, enter a Business Name only.
    The Technical Name will be generated automatically.
  7. Finally, click Create Connection.
  8. Finish

With this, we have now configured both the source and the target.
Let’s move on to the final step in SAP Datasphere.
We will now use the Data Builder to create a Replication Flow that writes SAP data into the Storage Account.

 

Storage ParameterStorage Parameter 1. Create Connection1. Create Connection 2. Search Data Lake Storage2. Search Data Lake Storage 3. Fill out the fields3. Fill out the fields

 

SAP Part 7 - Create a Replication Flow

 

Now we move on to the final step in SAP before we continue with Microsoft Fabric.

We still need to create a Replication Flow that writes the data into the Storage Account.
You can assign a schedule to this flow and later configure it to copy only the deltas. It is important to set all tables in the Replication Flow settings to Initial and Delta. This must also be enabled in the SAP system.
The screenshot Additional Settings in Replication Flow illustrates this. Otherwise, it would always copy all data.
For testing purposes, however, this would not be an issue.

Alright, so what needs to be done?

  1. In the Data Builder, select Replication Flows.
  2. Choose Select Source Connection and select the previously created S/4HANA source.
  3. Choose Select Source Container, and here I select the CDS views.
  4. Next, you will see the list of objects and can select the ones you need.
    If errors occur when adding them, it may be necessary to adjust settings in the SAP system to make the CDS views usable.
  5. Confirm your selection, and the system will perform the checks as described in the previous steps.
    If any errors appear, correct them accordingly.
  6. Then choose the target and follow the steps.
  7. In the Storage Settings, keep the default configuration.
  8. As already mentioned, under Settings → Load Type, set Initial and Delta for each table.
  9. Now you can first save, then deploy, and finally run the flow.

If everything is configured correctly, the data from the SAP system will now be loaded into the Storage Account.
See the screenshot Data in Storage Account.
In my case, I loaded three tables.

 

1. Replication flow1. Replication flow 2. Select source connection2. Select source connection 3. Add source3. Add source 4. Select source Container4. Select source Container 5. Select cds Views5. Select cds Views 6. Add Objetcs (Tables)6. Add Objetcs (Tables) 7. Overview Salesorder Object7. Overview Salesorder Object 8. Add Target8. Add Target 9. Add the ADLS Gen2 Storage9. Add the ADLS Gen2 Storage 10. Add the Storage Container10. Add the Storage Container 11. Target settings (default)11. Target settings (default) 12. Save / deploy and run12. Save / deploy and run Additional settings Replication flowAdditional settings Replication flow Data in Storage Account ContainerData in Storage Account Container

 

Short Summary of the SAP Part

With this, we have completed the SAP part and can move on to Microsoft Fabric. Before we do that, here is a brief conclusion.

Replicating data from SAP involves a number of configuration steps. In my case, the biggest challenge was establishing the connection between the SAP Cloud Connector and SAP Datasphere. During the demo, I had to overcome several hurdles in this area, and if issues arise, it’s essential to carefully review the SAP documentation.

Alright, let’s continue with Microsoft Fabric.

 

Microsoft Fabric Part 8 - Create the Items

So, let’s move on to Microsoft Fabric and set up the replication.

The following items are required for the replication:

  • Workspace with Fabric Capacity
  • Lakehouse
  • Mirrored SAP Database

The Mirrored SAP Database will be created after the other items are set up.

Here are the steps I carried out:

  1. Create a workspace in Fabric and give it a name, for example “WS SAP Mirroring”, and assign the Fabric capacity.
  2. In the workspace, go to New item, search for Lakehouse, and create a new Lakehouse. Give it a name as well.
  3. Open the Lakehouse, go to Files, create a new folder and give it a name, for example “sap”.
  4. In the next step, open the meatball menu (three dots) of the sap folder and select New Shortcut.
  5. In the Shortcut menu, choose Azure Data Lake Storage Gen2.
  6. Now create a new connection to the Storage Account that we created in the SAP section.
  7. Click Next and choose the SAP DATASPHERE container. This is the container we selected in the SAP part.
  8. Click Next, and you will see a summary of the shortcut. In this window, you can change the name of the shortcut.
  9. Once you finish, the shortcut will be created.

 

Microsoft Fabric Part 9 - Create and add the Mirrored SAP Database

Now we come to the final step.

In this last step, we need to create the Mirrored SAP item and select the folder in Azure Data Lake Storage Gen2 inside the Lakehouse that we created in the previous step.

Here are the final steps:

  1. Create a new item in the workspace called Mirrored SAP and connect it to the Lakehouse.
  2. In the next step, select the folder that we created in the Data Lake. This folder contains the SAP data. Then follow the remaining steps.
  3. Finished.

Now click Refresh, and you will see the mirrored tables. It may take a little while before anything appears.

And now we can work with this data.

 

Step 1 – Add the Mirrored SAPStep 1 – Add the Mirrored SAPStep 2 – Chooes the Lakehouse and connectStep 2 – Chooes the Lakehouse and connectStep 3 – Choose the folder of SAP in the Storage AccountStep 3 – Choose the folder of SAP in the Storage AccountStep 4 – Click refreshStep 4 – Click refresh

 

 

Summary

As we can see, setting up replication for SAP is not as complicated as it might seem at first. Most of the challenges were on the SAP side. If something doesn’t work as expected, it’s worth going back to the SAP documentation and reviewing the steps carefully.

The Microsoft Fabric part, on the other hand, was much easier to set up.

With everything in place, we can now start working with the data and prepare it for analysis.

Here are a few links for further reading.

SAP

MICROSOFT