Introducing the Greenfield Approach

Objective

After completing this lesson, you will be able to describe the steps of the Greenfield approach

The Steps to the Greenfield Approach

Suppose you are either a customer who never used SAP BW, or you want to simplify your architecture and start with a modern approach from scratch. So, you have decided to work with SAP Datasphere core tenant only following a Greenfield approach.

Note

Note that in a Greenfield approach, you can also work with SAP BW bridge if you have a BW bridge tenant and create new BW bridge objects from scratch. If you like to do this, refer to the Modeling in SAP Datasphere, SAP BW Bridge learning journey. In this lesson, we assume that you work only in the SAP Datsphere core tenant.

Steps to install the Greenfield approach: Create Spaces, then assign authorizations, then create connections, then create objects in this space.

Follow this guideline.

  1. Create Spaces: Spaces are the basic element for your authorization and layer concept. For each topic of responsibility, you should create a space. For example, you can design spaces similar to InfoAreas or business user roles for analysis. Moreover, we recommend additional spaces for cross-topic entities such as currency conversion tables or calendar data.
  2. Create Authorizations: Assign scoped roles to the developers that enable them to create objects in a scope (this means, in a space).
  3. Create Connections: If you need historical data from your historic BW, ECC, SAP S/4HANA, database, or other applications, you need to create corresponding connections.
  4. Create Objects: For replicating, storing or accessing data, you need to create corresponding flows with corresponding objects in SAP Datasphere.

Spaces

Space design: Create one space per business user group or per topic, at least one central IT space, and additional spaces for additional source data, permissions, currency conversion rates, or calendar data. You can create several connections per space.

The image, Space Design, shows a proposal for setting up spaces. How many spaces you need, basically depends on your authorization concept. You can take the chance to develop a totally new design principle. In contrast to BW InfoAreas, you cannot define a hierarchy of spaces. However, you can expose individual objects of a space to another space, by sharing the object with the target space.

You can use naming conventions to indicate whether it is a business-related space which will be available for reporting, a cross-topic space that provides basic data for many topics, or an administrative space which is used for data integration and preparation.

When you create many spaces, you can implement a more fine-tuned authorization concept, but you will have more work.

Authorizations

Image with two scoped roles: Dev_Sales and Read_sales. Both give access to the same Sales space, but with different authorized activities. In addition, a Data Access Control (DAC) for row-level security is applied to a protected view.

The authorization concept of SAP Datasphere has two pillars:

  • Authorization for using objects is based on the space and assigend via scoped roles. A scoped role allows specific activities (create, read, delete, …) for specific types of objects (view, analytic model, file, ...) in a specific list of spaces.
  • Row-based authorization for data is based on assigning a data access control to a field of a model. Typically, a data access control is assigned to a view that is exposed for consumption or the basic view of an analytic model.

The SAP Datasphere authorization concept does not use object names or folders. If you need folder-based authorizations, you can implement them in SAC (SAP Analytics Cloud).

Connections

To include historic BW data, a BW connection or ABAP connection can be used. To load regular data from SAP S/4HANA, ABAP connection, SAP S/4HANA Connection, or SAP HANA connection can be used.

If the complete required data history is available in the SAP S/4HANA system, you can connect it via ABAP connection for tables or classic SAPI datasouces, via SAP S/4HANA Connection for CDS views, or HANA connection from the underlying HANA database. Data which is only available in your SAP Netweaver BW or SAP BW/4HANA, it can be loaded via ABAP or BW Connection from there.

Launch the following video to show how to integrate SAP applications.

Objects

Suppose you have defined a space and a connection. Now, you can start creating the required objects in the space. The following figure shows the many object types in SAP Datapshere and SAP BW Bridge.

SAP Datasphere core and SAP BW/4HANA (or SAP BW Bridge) have object types for similar purpose.

Note

Note that there are not 1:1 corresponding SAP Datasphere objects for the BW objects.

To become familiar with the different types of SAP Datasphere objects, refer to the Exploring SAP Datasphere learning journey.

An image showing different ways to create new Objects; Manual creation, importing csv data, installing Business Content, and filling the tables using replication flow from historical data.

The following table compares different ways to create objects.

MethodAdvantagesDisadvantages

a. Manual creation

Free choice of fields and data types.

  • No template structure
  • Table initially without data

b. CSV file import

  • CSV file provides template structure.
  • Field separators can be detected automatically.
  • Data can be corrected, removed, or prepared during upload.
  • Object is filled with initial data.
  • Not intended for mass data upload
  • Limited transformation possibilities

c. Business content implementation
  • Easy creation of objects that correspond with standard SAP sources

Content is not available for all topics.

d. Loading data via replication flow
  • Source provides a template structure.
  • Suitable for delta and mass data upload

Limited transformation possibilities

e. Get data product from Market place

Take advantage of models from the SAP community

There might be a price tag on it.

The following steps explain how you create objects manually:

  1. Open the Data Builder area, and then click one of the following tiles:
    • New Table to create a local table. A local table is a table with data persistence in the SAP HANA cloud of the current SAP Datasphere core tenant.
    • New Graphical View to create a graphical view. This option is also used to create a new remote table with reference to a source object. The details section of a fact view offers the easiest way to create an analytic model based on the view.
    • New SQL View to create view based on SQL statement or script.
    • New Replication Flow to create a replication flow. It replicates values from source object to SAP Datasphere or writes values from SAP Datasphere to external targets. This option can be used to create a local table as its target, based on a source object.
    • New Transformation Flow to create a transformation flow. It transforms values from a source inside SAP Datasphere and writes the result to another local table. This option can be used to create a local table based on the result of a transformation.
  2. For tables or views, specify the Semantic Usage of the entity. This has technical consequences as explained in the following table:

    Semantic Usage and Technical Requirements

    Semantic UsagePurposeTechnical Requirement
    Relational datasetintermediate layernone
    facttransactional dataAt least one measure (with specified aggregation method) is required.
    dimensionmaster data with attributesAt least one key field is required.
    textlanguage-dependent descriptions (texts)At least two key fields are required, one of which has the language semantics and at least one non-key field is required which is used as a label.
    hierarchysimple hierarchyA key field for the node (child) and a dependent field for its parent are required.
    hierarchy with directoryBW-like hierarchy with foreign characteristicsa key field for the node (child), a dependent field for its parent, columns for time-dependency and type of node are Required.
  3. Create the fields and its data type and semantic type, and additional field properties, such as label reference, unit reference, currency reference.
  4. Define additional table properties, such as business purpose, delta capture, and performance settings. Delta capture enables you to faster load data because you only load changed records. Two fields are automatically added to the table: The change type indicates if the record was inserted manually, loaded, updated, or deleted. The change data column is actually a time stamp when the record was changed. Storing data in memory and partitioning improves data access times.Screen captures for different table settings. Delta settings must be turned on before deployment of the table. Two columns are then added for data change type and data change time. Improve performance by storing data in memory, and by defining partitions.

    Note

    You cannot change the delta settings after the deployment of the table, even if it does not contain data. Storing data in memory can be changed any time. Partition definition can be changed after deployment, but only if the table is empty.
  5. In case of a hierarchy, define the hierarchy specific properties.The child node of a hierarchy is a key field. Parent and child must have the same data type.
  6. Optionally, define associations to other objects.

    Note

    If you are familiar with ABAP CDS views or BW Open ODS views, this concept may look familiar. Defining an association between SAP Datasphere views is similar to defining an association from one ABAP CDS view to another, or similar to associating a field of a fact Open ODS view with a master data Open ODS view..
    Associations are defined from facts to dimension, from dimension to hierarchy or text entities.

    In SAP BW/4HANA, the properties of an InfoObject define if it has texts or hierarchies. This concept is slightly different in SAP Datasphere, By defining an an association, you map a field of the central entity to the key field of a specific related entity, such as mapping a dimension attribute to the child field of a hierarchy. After associating a hierarchy or text to a dimension, the associated text or hierarchy is available for this attribute.

    After you associate a Dimension entity to a field of a fact entity, its attributes, hierarchies and texts are available by default in the analytic models that are based on this fact entity. Like choosing navigation attributes for an associated InfoObject of a CompositeProvider or query, you can remove fields from an associated dimension in the analytic model if you don't need them in a specific scenario.

  7. Save and deploy the object.

Now, you can enter or upload values or use the table in a flow (see next section).

Business Content

To facilitate the installation of models on top of SAP S/4HANA standard tables and views, SAP provides suitable business content models. The technical names follow the following naming convention: SAP_, then 2 characters for the topic, then _, then 2 characters for the layer (see below), then the specific view name. The majority of the views are used in other content views; the transactional data views follow a layered approach:

SAP ships content in the following layers from bottom to top: Replication Flows for CDS Views, Local Table, Inbound Layer Views, Harmonization Layer Views (with associations to texts and dimensions), Reporting Layer views.

The content architecture for transactional data consists of the following layers:

  1. The Inbound Layer includes local tables (e.g. SAP_FI_LT_<CDS View Name>), which are a mirror of the CDS views from SAP S/4HANA or SAP S/4HANA Cloud and inbound layer views (e.g. SAP_FI_IL_<Business Object Name>), where some minor transformations are done.

  2. The Harmonization Layer (e.g. SAP_FI_HL*) includes views, that use the inbound layer views and enhance them e.g. with key figures using currency conversion into company code currency and master data associations for attributes and texts. Necessary joins or unions are also done in the harmonization layer.
  3. The Reporting Layer includes Analytic Models (e.g., SAP_FI_RL*), that use the harmonization layer views and add calculated and restricted key figures. This layer is used in the SAP Analytics Cloud stories
SAP ships content in the following master data layers from bottom to top: Replication Flows for CDS Views, Local Table, Inbound Layer Views, Harmonization Layer Views (which are associated to other harmonization layer views.

For master data business content from SAP, a similar layer concept and naming convention exists, but without the reporting layer. In some cases, associaions exist from attribute views to text views, in other cases, the transaction data views directly contain associations to text views.

Depending on the source system and the structures exposed from those source systems, layers and objects in these layers may vary.

To install the Business Content, follow the following steps:

  1. SAP Content is always imported into the space SAP_CONTENT. Thus, please create a space with the technical name "SAP_CONTENT" once before you can import any content package. In addition, you need to assign the user who will import the content to the space SAP_CONTENT. Before importing any content package, the time data must be set up in this space.

    Before importing any content package, the time data must be set up in the SAP & Partner Content Space (SAP_CONTENT).

    You can refer to Create Times Dimension or use the In-App Help directly in SAP Datasphere for more information.

  2. Open the Semantic Onboarding area, and then click one of the following tiles:
    • Business Content: End-to-end business scenarios created by SAP for various industries and lines of business.
    • 3rd Party Content: End-to-end business scenarios created by SAP partners. Some third-party content has to be purchased in the SAP Store.
  3. Content is shipped in packages. Click a package to open it and see an overview of its content.
  4. Review the How to install this package section to understand the requirements for installing the content. You may be instructed to:
    • Use or create a space with a specific business and technical name before importing the content.
    • Use or create a connection in the space.
    • Use or create a live SAP Datasphere connection in SAC, called "SAPDWC"
    • Visit the SAP Store and, in some cases, make a payment to a partner.
    • Contact a partner to complete the installation or obtain data.
  5. Review the Import Overview section. On the Import Options tab, you can specify the following options:
    • Import Schedule: Prevent updates of packages (None), or be notified when a new version becomes available so that you can choose if you want to import it (Notify for new content) .
    • Overwrite Preference allows you to choose one of 3 options: Do not overwrite objects or data, overwrite data only, or overwrite objects and data.

      Note

      Note that connections and permissions cannot be overwritten. Adjustments for connections or permissions have to be done manually
    • Deployment Preference: Automatically deploy objects after import or just import without deployment (which objects are deployed, depends on the previous settings).
    • Map the target space.

      Note

      • You cannot "merge" content from two or more spaces included in your package.
      • You must select a separate space for each space listed in the Business Content.
  6. Click Import to begin importing the content.

    You will receive a notification when the process is complete, or if an error occurs. If you selected Don’t overwrite objects or data, a notification will let you know if any of the content wasn’t imported to avoid overwriting existing content.

  7. To view the log of updates and imports for a package, select the package in the content network and choose History.

SAP and partner content is shipped in packages of dependent objects. Some packages contain objects for different spaces. If you want to combine both SAP Datasphere objects and the SAP Analytics Cloud stories, you need to install two separate packages.

The SAP Analytic Cloud content and the SAP Datasphere content can be installed together in one end-to-end experience, or independently.

Screen capture of the sales and Distribution business content (Sales delivery items Analytic model and views)

Replicating Data

The easiest way to transfer the data from an existing object to a new one is the replication flow. It is fast and can handle full uplaods or delta logic (if the source object provides it). Let's learn how to create one.

Screen capture of adding a source object to a new Replication Flow.

To create a replication flow, you need to specify a few things:

  1. The source connection, container (schema or application component), and object
  2. The target connection and object. (If you integrate data to your own core tenant; choose SAP Datasphere as the target connection.)
  3. Settings for the loading method, such as full, delta, truncate before full load
  4. Optional, a projection with filter conditions and column mapping. Use mapping to remove or rename source columns or to add additional calculated columns.

Launch the following video to see the creation of a replication flow.

Don't forget to check the volume of the spaces regularly, especially before and after major replication tasks. The system monitor provides helpful statistics.

Screen capture of used volume monitor and task log in the SAP Datsphere System Monitor.

Currency Conversion

Suppose you have international business and cost or revenue values are delivered with different currencies. To avoid summing different currencies, you define a measure as semantic type amount and define a currency reference to another column of the model But, instead of visualizing a placeholder for an unknown sum, you probably prefer to convert the original values to a company currency.

Content packages from business content come with in-built currency conversion. The currency conversion objects and the sourcing of these objects need to be setup in the SAP_CONTENT space before the content is imported.

Currently (2024) the following content uses currency conversion.

  • Automotive: Responsive Supply Network, Sales and Inventory
  • Consumer Products: Revenue Growth Management - Foundation
  • Intelligent Real Estate
  • Sales Analysis for SAP S/4HANA and SAP S/4HANA Cloud
  • Service Analysis
  • Solution Order Analysis
  • Supply Chain Management: Life Sciences Dashboard
  • Working Capital Dashboard for SAP S/4HANA and SAP S/4HANA Cloud (SAP Datasphere)

Please follow the SAP Datasphere documentation Enabling Currency Conversion with TCUR* Tables and Views accordingly. You may load the currency from any source or system. All content packages mentioned above are built based on local tables as first inbound layer object, which can be loaded from SAP S/4HANA or SAP S/4HANA Cloud.

You can also implement currency conversion in manually defined models. To establish a currency conversion manually, the following steps are required:

  1. Replicate the currency conversion tables from the SAP BW/4HANA or SAP Source system.
  2. Create a new SAP Datasphere modeling view (Graphical view or SQL view) and optionally an analytic model.
  3. Add a new calculated column using the function CONVERT_CURRENCY (refer to SAP HANA SQL guide for details), or simly add a new currency conversion column.

Replicate the currency conversion tables:

Screen capture of the Data Builder with the steps to create currency conversion views. For each table, three types of object can be created: Table, view, and data flow.

Before you can apply currency conversion, you have to upload the currency rates. Therefore, a target table, a data flow and a view is required for each source table related to currency conversion, such as TCURN, TCURR, TCURT, TCURV, and so on. Use the import button in the Data Builder to upload these objects from any source.

To replicate the values from currency conversion tables, the data flows must be regularly scheduled to fill the tables.

Applying currency conversion:

Screen capture of applying currency conversion in a view

In a graphical view, define the Currency Conversion Column in the Columns section of a calculation element (fx node).

Screen capture of applying currency conversion in an Analytic Model

In an analytic model, define the Currency Conversion Measure in the Measures section.

If this all seems cumbersome, there are ways to accelerate the development, especially when you use a hybrid scenario.

Log in to track your progress & complete quizzes