End-to-end data model in Datasphere and SAP Analytics Cloud – How to leverage the Business Content

1. Introduction

The SAP Business Data Cloud (BDC) combines and governs several SAP products into one unified SaaS platform, see architecture overview:

Source: SAP

With ever-growing capabilities and toolsets, you might wonder how you can build data models for different analytical use cases more rapidly by leveraging predefined content from SAP.

This blog will first give an overview of the available options and explain some related terms. Afterwards it will guide you through the necessary steps for enabling Business Content in Datasphere (DSP) and SAP Analytics Cloud (SAC), with a focus on how to avoid or fix common issues that might arise in the process.

2. Predefined SAP Content

There are basically two different types of content available: the traditional Business Content and the recently introduced Intelligent Applications (previously known as Insight Apps).

2.1.  Business Content

The Business Content needs to be installed and managed separately for each SAP solution e.g. in DSP as well as in SAC. It merely serves as a template and the customer must put in quite some manual effort to set up connections, load and integrate data, harmonize and customize individual parts.

It’s not guaranteed that the Business Content of one solution 100% fits your other solution in an end-to-end scenario, because those might have different versions or patch levels. For instance, your S/4HANA system exposes certain CDS View fields but the Business Content within DSP requires another field, which is just not yet available and therefore the integration fails. Or it could also be vice versa, like your source system has been updated recently and could provide detailed data, but the DSP Business Content is just prepared to handle some basic data.

Either way, you must take the Business Content provided and adjust it according to your needs. Especially when it comes to authorization, you need to define and set up access controls manually later. By doing so, you really make the content your own, which can also be seen as one main advantage: it’s free of charge and you do not depend on any additional subscriptions.

2.2. Data Products and Intelligent Applications

A Data Product is a curated set of master and transactional data for a certain line of business, designed for easy access and optimized for consumption outside the source system. Typically, the data itself is included, together with metadata and documentation to explain how to use the data effectively.

Data Products are handled centrally via BDC Foundation Services, which will take care of extraction from the different source systems and data replication within BDC.

An individual Data Product is usually tailored to a very specific business use case. For example, the S4/HANA system may provide a finance Data Product for asset maintenance while the Ariba instance may provide a supply chain Data Product for spend analysis.

Source: SAP

An Intelligent Application is a standardized set of objects, based on one or more Data Products. It is created and maintained by SAP and can be installed via central BDC Cockpit.

The installation will automatically trigger the generation of connections and data replication jobs as well as the creation of DSP models and SAC stories. Even access controls are already in place and just need to be assigned once. This means that a fully functional end-to-end application is provided and ready to use out of the box. SAP also delivers regular updates, which can be installed just as easily at any time.

Intelligent Applications and the underlying Data Products are stored in SAP protected spaces, so they cannot be customized directly. However, they can be copied into a customer space and may then be adjusted.

SAP especially emphasizes the option to share a Data Product with Databricks, to incorporate AI or machine learning logic. Such enhanced Data Products are shared back to BDC and can then be used to enhance visualizations in dashboards.

Intelligent Applications are not free of charge but require a subscription based on the line of business solutions in the landscape.

3. Install Business Content in DSP

In this scenario we want to leverage the traditional Business Content; to be precise we make use of the “Finance Foundation for SAP S/4HANA and SAP S/4HANA Cloud”. Additional information can be found here: https://help.sap.com/docs/SAP_DATASPHERE/6eb1eff34e4c4b1f90adfbfba1334240/a878c25f6bfc1014a79e69594ccc91ad.html?locale=en-US

Our goal is to create an end-to-end data model, which brings together S/4HANA data, DSP models and SAC dashboarding. Most effort must be spent within DSP, while the SAC part of the following tutorial will be quite quick.

3.1. Space Management

The first step in DSP is to create a suitable Space, where the Business Content should be copied into. SAP recommends the following steps:

  1. 1. Create the Space ID SAP_CONTENT with Name SAP & Partner Content (if it does not exist) and assign the user that will import the content to this Space.
  2. 2. In the Space created in step 1, either create a connection of type SAP S/4HANA (Cloud) to your remote system.
  3. 3. Generate Time Data (if it does not exist): Click “Create Time Tables and Dimensions” in the Space Management for the space SAP_CONTENT.
  4. 4. Setup currency conversion (if it does not exist).

3.2. Content Network

Navigate to “Semantic Onboarding” -> “Business Content” and from there choose “Finance Foundation for SAP S/4HANA and SAP S/4HANA Cloud”.

A popup will appear, and the Overview tab will display some basic information. Switch to tab Import Options to display a list of items that are about to be installed, those are mainly tables, several views and one Analytic Model.

You probably want to remove the pre-defined connections from the list, because they do not work out of the box, and anyway you should already have created your own working connection in the previous step.

If you want to install the Business Content into another Space, you can choose its name from the dropdown box “Space Mapping” on the right side before clicking the Import button.

Please note that it’s not enough that Time Data has been generated in Space SAP_CONTENT, but if you use another Space then this also needs to be generated there. Otherwise, you will receive the following error when you try to import the Business Content:

To fix this error you can navigate to “Space Management” and within your Space execute “Create Time Tables and Dimensions”

For some unknown reason our first installation attempt failed. We repeated it with the option “Overwrite objects and data” and then we could finally see the successful import status:

3.3. Load Data

When you navigate to the Data Builder you should see that a lot of objects have been created. You now need to populate all the tables provided with data and here the common approach is to create a Replication Flow for each table.

This step will probably take quite some time, because on one hand it’s a lot of tables to handle and on the other hand you might come across different issues, as we did:

3.3.1. Version mismatch

The Replication Flows are based on a S/4 HANA CDS source system connection. For a lot of CDS Views we noticed that the DSP Business Content expects a different number of fields than what is provided, see:

At this point we were lucky though, because our S/4HANA CDS Views provide more fields than required for this scenario. It would have been more of a problem if it was the other way around.

But not only can the number of fields be unexpected but also the data format in which a certain field is exposed, see the following error that we experienced several times:

In fact, there were a lot of fields where our CDS Views deliver data type Decimal, while the DSP Business Content expects data type Timestamp. There might be different ways to resolve this issue. We decided to leave the CDS Views as is, but change the data types of the DSP tables, see:

However, it’s not enough to change the data type within the table because there will be immediately a warning message, which complains about a mismatch with a dependent View as well, see:

Therefore, we also adjusted all the dependent Views on top of the affected tables by introducing an expression that converts the datatype to the expected Timestamp, see:

3.3.2. Missing Replication Flow Support

There is one special CDS view (I_SEMTAGGLACCOUNT) which is currently not supported by a Replication Flow. You will get the following error message:

The technical reason behind the issue is that the Replication Flow framework requires at least one exposed key field to work, but this CDS View does not have any. Therefore, you need to implement an alternative, as explained by SAP: https://help.sap.com/docs/SAP_DATASPHERE/6eb1eff34e4c4b1f90adfbfba1334240/a87a74c36bfc1014a79e69594ccc91ad.html?locale=en-US

Sidenote: Just out of curiosity we tried to add the missing column __load_package_id into the table manually. But unfortunately, the leading underscore characters will automatically be removed when you save the table, so it seems that such names are reserved for use by system generated fields only.

In the end, we resolved the issue by creating a Remote Table. And then we used a Transformation Flow to fill the original table via the Remote Table.

3.3.3. Extraction Errors

After we overcame the obstacles mentioned so far, we were finally ready to execute our Data Flows. Some of the master data tables could be loaded quickly, however we just had no luck with extracting transactional data from I_GLACCOUNTLINEITEMRAWDATA. The Data Flow ran for some time but then failed with following unspecific error message:

We analyzed the issue in the S4/HANA source system and did some troubleshooting as described here: https://help.sap.com/docs/SUPPORT_CONTENT/datasphere/4445249362.html?locale=en-US

Ultimately, we resolved the problem by implementing SAP Note 2890171 – SAP Datasphere/SAP Intelligence – ABAP-Integration

4.  Install Business Content in SAC

When you are done with the DSP part then you may switch to SAC.

4.1. Content Network

Navigate to “Content Network” -> “Business Content” and from there chose “Finance Foundation for SAP S/4HANA and SAP S/4HANA Cloud”.

A popup will appear, and the Overview tab will display some basic information. Switch to tab Import Options to display a list of items that are about to be installed. There is one model listed but please note that this is not installed within SAC but it’s really the same Analytic Model that has already been installed within DSP. Therefore, the only object to be installed will be one Story.

4.2. Story

Upon successful import you may open the Story, but you will probably at first just see some error messages like this:

This is because the model does not point to the proper DSP instance right away. To fix the issue you need to switch to edit mode and then click on the main table. Within the Builder panel you can change the Data Source via edit icon, see:

You should now finally be able to enjoy your new analytical dashboard:

5. Summary and Considerations

The traditional Business Content can be very useful to accelerate implementation, and investments within BDC still continue. This Blog showcased the installation of one exemplary end-to-end analytical application.

On the other hand, Intelligent Applications are more integrated and cloud native. The number of available Intelligent Applications is currently quite limited, but it’s growing fast as SAP’s strategy seems to aim further in that direction.

In any case you should make yourself familiar with both the available Business Content and Intelligent Applications in your BDC environment. If there is an Intelligent Application that fits your specific business needs and has reasonable subscription fees, then you would probably prefer to use that. The Business Content is a great alternative, but it does not have the same high level of integration and requires more adjustment effort.


Author: Bernhard Sauerteig

Bernhard has been working as a Business Intelligence Consultant for many years. He has extensive experience in designing, implementing and managing SAP solutions, including Datasphere, Analytics Cloud, BW/4HANA, S/4HANA and HANA native. He combines profound analytical skills with deep technical insights and a strong background in CDS View and Calculation View modeling as well as ABAP, HANA SQL Script and JavaScript programming. As an architect, lead consultant, developer and trainer, Bernhard acts as a facilitator between IT and business, driving robust and scalable enterprise solutions.

×