Working with the Open ODS View

Objectives

After completing this lesson, you will be able to:

  • Create a Open ODS View on an SAP HANA table
  • Implement Different Modeling Scenarios with Open ODS Views

Open ODS Views

Introduction

The Open ODS View is a new modeling object introduced with SAP BW/4HANA. It replaces the VirtualProvider of SAP BW. The Open ODS Views enable flexible integration by defining data models on top of raw source data without the need to create InfoObjects and without loading data.

The Open ODS View is a standard SAP BW/4HANA meta data object that provides a structure description with attributes (fields) and data types. Using an Open ODS View you can model master data attributes, texts, and transactional data. Hierarchies are not supported. An Open ODS View represents a view on a data source and adds analytic meta data to this source. Although an Open ODS View does not require InfoObjects, they can be optionally mapped to the fields to provide access to shared master data. Each Open ODS View is defined as being used for handling facts, master data, or text.

Although modeling with InfoObjects guarantees a high level of consistency, adjusting existing models that are used for reporting and analysis is challenging. Modeling with Open ODS Views is considerably more flexible and supports agility. It might help to think of modeling with Open ODS Views as lightweight modeling.

You can quickly create an Open ODS View with minimum effort. You simply choose a data source, select the required fields and assign properties to the fields. When defining the structure of the Open ODS View, you specify whether a specific field should be interpreted as a key figure or characteristic. An Open ODS View provides access to source data for consumption (for example, with a BW Query). The journey from source data to query is now much shorter with Open ODS Views.

The concept of working with raw data in SAP BW/4HANA, and the early and easy integration of raw data, results in the new Open ODS layer of LSA++, bringing SAP BW/4HANA and the sources closer together.

SAP recommends implementing Open ODS Views in cases where the format of the external data is suitable for integration into a data flow, for example when an external data model presents a pure fact view or a pure dimension view.

Open ODS Views can be consumed by other SAP BW/4HANA models, such as a CompositeProvider to develop hybrid models that combine virtual and persistent data.

You can define associations between Open ODS Views. For example, you can associate a sales fact Open ODS View with a customer and product master data Open ODS View to develop a virtual star schema.

You define basic semantics for each field of an open ODS View, such as currency, unit of measure etc. This provides meta data that is used by reporting tools and this might be enough for basic reporting. However, it is also possible to associate each field of the Open ODS View with an existing InfoObject. For example, you can associate the Open ODS View field item with the InfoObject 0MATERIAL. You do this so that the field item can then use the master data and meta data of the InfoObject. For example, the field item provides only the material number from the raw data. The associated InfoObject can provide the text description for each item value. Also the attributes of 0MATERIAL can be used by the field to enhance the reporting options. The authorizations of the associated InfoObject can also be used by the fields.

The Open ODS View is integrated into the TLOGO framework and can be transported. The transport object is FBPA (A version) or FBPD (delivery version).

The following source objects can be used for an Open ODS View:

  • SAP HANA database table or view (on SAP HANA of the SAP BW/4HANA application)

  • SAP HANA database table or view (on other tenants of the same SAP HANA platform)

  • Remote sources (using Smart Data Access or Smart Data Integration on SAP HANA)

  • SAP BW/4HANA DataSource of type ODP or SAP HANA with direct access enabled (e.g. CDS Views)

  • Big Data (data of a Hadoop cluster, which is connected via a Big Data source system (and therefore via a remote source with the Spark SQL DESTINATION or VORA (ODBC) adapters) to the SAP HANA database of SAP BW∕4HANA

  • DataStore Object (advanced): we explain this in "Modeling scenarios with Open ODS Views"

  • Transformation: we explain this in "Modeling scenarios with Open ODS Views"

Open ODS View on SAP HANA database table or view

With a database table or view source type, Open ODS views can access data from any schema on the SAP HANA database on which the SAP BW/4HANA application is based. The connection to the relevant schema is configured in the BW Modeling Tools as an SAP HANA Local Database Schema type of source system.

SAP HANA supports multiple isolated databases in a single SAP HANA system. These are known as tenant databases. An SAP HANA system that was installed in Multiple Database mode can contain more than one tenant database. The source type Database Table or View via HANA Multitenant Database Container (MDC) enables Open ODS Views to access data in schemas of a tenant database of the SAP HANA system. The connection to the relevant schema is configured in the BW Modeling Tools as source system of type SAP HANA Tenant Database Schema. For more information about MDC deployment, refer to SAP note 2312583 (FAQ BW and SAP HANA Tenant Database: Cross-Database Access in SAP HANA Tenant Databases).

Note

Input parameters of SAP HANA views are not visible in the Open ODS view. This applies to both local views and views in the tenant database as well as for access using SAP HANA Smart Data Access. For more information, see SAP Note 2142344.

Open ODS View on Remote Sources (using Smart Data Access or Smart Data Integration on SAP HANA)

With the Virtual Tables Using SAP HANA Smart Data Access source type, Open ODS views can access remote data from different external sources. The source must be configured in SAP HANA as a remote source. The connection to the source and the relevant schema is configured in the SAP BW Modeling Tools and is a source system of type SAP HANA Smart Data Access (the scope includes SDI sources as well).

Note

SAP HANA Smart Data Access (SDA) is a function of the SAP HANA core, providing ODBC drivers to some widely used databases (see SAP note 2600176). SAP HANA Smart Data Integration (SDI) is a core component of SAP HANA enterprise information management (EIM), providing an adapter framework for a wide range of data sources.

Open ODS View on BW DataSources

With the DataSource (BW) source type, Open ODS Views can access the data of DataSources that support direct access. Modelers can check this property in the extraction tab of the DataSource Maintenance. This property is available for DataSources of all source system types in SAP BW/4HANA, but Source System type FILE does not support direct access in general.

The classic SAP extractors released for ODP (source system type ODP_SAP) do not necessarily support direct access. It depends on how these extractors are implemented. For instance, the complex extractors of the Logistic Cockpit (technical name of DataSource 2LIS_*) do not provide this feature, just like roughly 50% of the delivered SAP DataSources.

If an Open ODS View is modeled based on a BW DataSource, the DataSource is executed at runtime in the corresponding source which retrieves the requested data virtually to SAP BW/4HANA. This means the data is directly provided to the consumer of the Open ODS View, normally a CompositeProvider and/or a BW Query.

Be aware, that this is reasonable only if the quantity of data to be extracted is limited or can be restricted to a suitable selection. For bigger amounts of data the source system can quickly turn into the bottleneck resulting in severe performance challenges. Some scenarios are more suitable for bigger amounts of data, especially when the data access and the data calculation can be pushed down to SAP HANA like for source systems of type ODP_CDS, ODP_HANA or HANA_LOCAL.

Hint

It is not supported to use the generated SQL view of an ABAP Core Data Services (CDS) View as source for an Open ODS View. The "database table or view" source type of the Open ODS View does a native access to the ABAP CDS artifact. However, SAP note 2511210 clearly states that native access to ABAP Core Data Services objects is not supported and explains the reasons. Instead, the recommended and supported way to connect to an ABAP CDS View from SAP BW/4HANA is to create a source system of type ODP with context ABAP_CDS. DataSources referring to this source system can be consumed by an Open ODS View. See more details in SAP note 2673267 (Consulting: Open ODS View or HANA DataSource based on ABAP CDS View).

Launch the next demo to explore an Open ODS View in BW Modeling Tools.

Explore Open ODS View with BW Modeling Tools

Modeling Scenarios with Open ODS Views

Creating a Simple Open ODS View

You define analytic meta data for each field of the Open ODS View. You specify whether the field should be interpreted as a characteristic or as a key figure. Other examples of analytic meta data include the aggregation behavior for key figures, or associations and authorization relevance for characteristics, or the InfoObject name of an Open ODS View field. Further examples are the enrichment of relationships with key data and/or texts, and the assignment of currency and unit fields to key figures. For each field, the Open ODS View defines a unique field name that is used across the system, for example, in the InfoProvider display of the Open ODS View or in a BW Query on the Open ODS View.

The Open ODS View Editor always includes the General tab. Depending on the semantics of the Open ODS View, it can also contain the relevant semantic tabs FactsMaster Data, and/or Texts.

Semantics can be defined for fields of the type characteristic and for fields with the type key figure.

Hint

Characteristics (key) is only needed for Open ODS Views to generate a DataSource and field-based DataStore Object (advanced).

The Authorization Relevance property on the characteristic field of the Open ODS view allows you to specify whether or not a field is authorization-relevant. The settings in the Open ODS View also define which analysis authorizations should be checked for the field when the query is executed. When the query is executed, the system also checks whether the user has analysis authorizations.

Hint

More information about authorization for fields of Open ODS Views can be found in this documentation: https://help.sap.com/docs/SAP_BW4HANA/107a6e8a38b74ede94c833ca3b7b6f51/92988b12ec7b4800b02791df172af30d.html

As already mentioned, Open ODS Views can be associated with other Open ODS Views. The association of master data Open ODS Views with a fact Open ODS View produces a star schema. Open ODS View fields can also be associated with InfoObjects.

When you associate certain fields of your Open ODS View with SAP BW/4HANA InfoObjects, the following properties of InfoObjects can be inherited:

  • BI Clients settings

  • Hierarchies

  • Texts

  • Master data attributes

  • Master data navigational attributes

  • SAP BW/4HANA Analysis authorizations

As with an InfoObject, the Open ODS View can combine language-independent semantics for the attribute keys with language-dependent semantics for texts. You can add extra semantics for an Open ODS View that you created with one of the two other semantics (texts or attributes).

When you use associations on fields of the type characteristic, you can link an Open ODS view to master data and texts of other Open ODS Views or InfoObjects. This allows you to inherit properties from the associated object, assign additional key fields (compounding), and use texts and navigation attributes of the associated objects in queries on the Open ODS View.

In case of fields with the type key figure, you can add associations to InfoObjects. This is particularly relevant if you want to reuse formulas or variables (defined on the associated InfoObject) in queries.

Hint

Associated objects to Open ODS Views of the type master are only relevant for navigation if the query is executed on the master Open ODS View – if the master Open ODS View is associated to an Open ODS View type fact, then only texts (if exist) are offered.

For every field in an Open ODS View field and the view navigation attributes, InfoObject names are used in the InfoProvider view and in the BW Query. The InfoObject names are derived according to specific rules.

Hint

More information about these naming rules can be found in this documentation: https://help.sap.com/docs/SAP_BW4HANA/107a6e8a38b74ede94c833ca3b7b6f51/f60b45b4c85b48199882d62d0dd09bf6.html

Introducing Open ODS View Scenarios

We will now look at three scenarios that can be implemented using an Open ODS View.

  1. The first and simplest scenario is when an Open ODS View defines a virtual data model to expose an underlying database object such as an SAP HANA database table or database view. This virtual data model allows fast integration without the need to create InfoObjects, transformations or a data flow to load data to SAP BW/4HANA in order to report on this data. As an extension to this scenario, you can automatically generate a DataSource between the source data and the Open ODS View.

  2. In the second scenario, you create an Open ODS View on source data, but also implement a Transformation. You might do this for example to transform a source field in order to match the InfoObject values that you want to associate. To support the Transformation, a DataSource and an InfoSource is required but these are automatically generated. But even with this more complex scenario, the data still resides in the source system and data is never loaded to SAP BW/4HANA.

  3. For the third scenario, you can generate a DataStore Object (advanced) to persist the data. The main reason to do this is to keep a snapshot of the data. In this scenario a DTP is also generated to enable the scheduling of the data load. InfoObjects are optional, because the DataStore Object (advanced) can consist of fields.

Open ODS View: Use Generate DataFlow to Create a DataSource

For Open ODS views with the source type Database Table or View, Virtual Table Using SAP HANA Smart Data Access or DataSource (BW), you can generate a data flow.

When you use the option Generate DataFlow on an Open ODS View in a first step, the following happens:

  • The system creates a DataSource in the NODESNOTCONNECTED application component. The fields of this DataSource are copied from the fields of the structure of the Open ODS View.

  • The source object of the Open ODS View will be changed to the DataSource by the system.

After this first generation step, you can then use Generate DataFlow on the Open ODS View (now based on a DataSource) again. This will offer the other two scenarios:

  • Scenario 2 - Generation of an InfoSource and a Transformation
  • Scenario 3 - Generation of a DataStore Object (advanced), a Transformation and a Data Transfer Process

Open ODS View: Use Generate DataFlow to Create an InfoSource and Transformation

When an Open ODS View is based on a DataSource, the following happens when you use the option Generate DataFlow with Target Type InfoSource based on a DataSource:

  • The system creates an InfoSource in the NODESNOTCONNECTED application component. The fields of this InfoSource are copied from the fields of the structure of the Open ODS View. Associations to other Open ODS View fields are ignored when creating the InfoSource.

  • The system creates a Transformation between the DataSource and the InfoSource.

  • The source object of the Open ODS View will be changed to the Transformation by the system.

Open ODS View: Use Generate DataFlow to Create a DataStore Object (advanced), Transformation and Data Transfer Process

When an Open ODS View is based on a DataSource, the following happens when you use the option Generate DataFlow with Target Type DataStore Object (advanced).

  • The system creates an DataStore Object (advanced) with an active table in the InfoArea of the Open ODS View. The fields of this ADSO are copied from the fields of the structure of the Open ODS View. Associations to other Open ODS View fields are ignored.

  • The system creates a Transformation and DTP between the DataSource and DataStore Object (advanced).

  • The source object of the Open ODS View will be changed to the DataStore Object (advanced) by the system.

The source of the Open ODS View is now the active table of the DataStore Object (advanced). Without loading the data, this data model will not see any data. Be aware that you duplicate (replicate) data in this case from a source outside of the SAP BW/4HANA-managed SAP HANA-schema into the SAP BW/4HANA-managed schema. The outbound interface of the original Open ODS View remains unchanged. All BW Queries on the Open ODS View will remain unchanged, all connections to CompositeProviders are not impacted at all.

The objects generated with the data flow are written to the $TMP local package without a transport prompt. Change the package assignment in the SAP BW/4HANA transport connection of the SAP BW/4HANA back end system and write the objects to a transport request manually.

Launch the next demo to explore the generate DataFlow function for Open ODS Views in BW Modeling Tools. First a DataSource will be created based on the Open ODS View (as scenario 1 on the picture above) and secondly a Transformation and InfoSource are generated (as scenario 2 on the picture above).

Generate a DataFlow for Open ODS Views

Log in to track your progress & complete quizzes