8.3    Integration with SAP BW/4HANA

With SAP BW/4HANA, we either combine data from SAP HANA tables or views under the schema SAPSR3 or by integrating with InfoProviders. The next section will explain how to combine data under the schema SAPSR3. We will then discuss how to combine data via open ODS views and CompositeProviders in Section 8.3.2.

8.3.1    Combining Data under Schema SAPSR3

Figure 8.31 shows that SAP BW/4HANA objects (InfoObjects, DSOs, Cubes, and MultiProviders) can be accessed as SAP HANA tables or views under schema SAPSR3 in SAP HANA Studio.

SAP HANA Views under SAPSR3 Schema

Figure 8.31    SAP HANA Views under SAPSR3 Schema

For example, as shown in Figure 8.32, the InfoObject 0PROJECT has a master data view /BI0/MPROJECT, time-independent master data table /BI0/PPROJECT, time-dependent master data table /BI0/QPROJECT, and text table /BI0/TPROJECT, all of which can be accessed via the same names in SAP HANA Studio.

Master Data Tables of InfoObejcts

Figure 8.32    Master Data Tables of InfoObejcts

Keep in mind that the schema name SAPSR3 will be required in SQLScript if you want to select data from those tables or views.

8.3.2    Combine Data via Open ODS Views or CompositeProvider

In SAP BW/4HANA, Open ODS views and CompositeProviders are available and are based on fields of tables or views rather than InfoObjects. Prior to SAP BW 7.4, all SAP BW modeling—InfoProviders, data flows, SAP BEx queries, and even authorizations—was built on top of InfoObjects. InfoObjects are the bricks of data modeling. However, the Open ODS field-based approach makes the following possible:

Figure 8.33 illustrates the implementation of the real time reporting solution for CO‐PA (Profitability Analysis), which including the following steps:

  1. Use the system landscape directory to synchronize CO-PA line item data in real time from SAP ERP to SAP HANA.
  2. Generate a time dimension based on the posting date.
  3. Use an Open ODS view to combine the SAP HANA view and SAP BW models to leverage existing SAP BW developments.
  4. Associate the table fields with InfoObjects to get text and attributes to avoid keeping duplicate data SAP BW/4HANA system.
  5. Create SAP BEx queries on top of Open ODS views.
    Real-Time Solution for CO-PA

    Figure 8.33    Real-Time Solution for CO-PA

In SAP HANA Studio, the analytics view ZCOPA_AV01 (see Figure 8.34) was created with the data foundation on CO-PA line table and star joins to make some additional enhancements, such as joining the generated time table to get time dimensions and converting the currency type and project formats from an internal to external format.

Create Analytics View in SAP HANA Studio

Figure 8.34    Create Analytics View in SAP HANA Studio

The following sections will illustrate how to create Open ODS views, associate them with existing InfoObjects, and turn on navigation attributes. We will also briefly touch upon compounding InfoObjects.

Create Open ODS View

In this step, we’ll create an Open ODS view in SAP BW/4HANA, which will allow us to consume the SAP HANA analytics view ZCOPA_AV01 and expose the view to SAP BW/4HANA. In Figure 8.35, we need to specify the Open ODS View Name, Description, Semantics, Type, Schema, Source System, and DB Object Name.

Create Open ODS View

Figure 8.35    Create Open ODS View

In Figure 8.36, after clicking the Create Proposal icon inline image, the source fields from the SAP HANA view will be added to the target Open ODS view. The creation of an Open ODS view is quite straightforward; after activating the Open ODS view without creating any InfoObjects, the activated Open ODS view is ready for reporting, and a developer can create SAP BEx queries using the SAP BEx query designer.

Assign Fields from Source View to Target Open ODS View

Figure 8.36    Assign Fields from Source View to Target Open ODS View

Note that it’s also possible to create an Open ODS view within SAP HANA Studio, as shown in Figure 8.37, via a plug-in installed in Eclipse.

Create Open ODS View in Eclipse

Figure 8.37    Create Open ODS View in Eclipse

Association with InfoObjects

To leverage existing SAP BW objects, models, or features offered by SAP BW/4HANA—for example, InfoObjects’ navigational attributes, text, and hierarchies—it’s possible to integrate with SAP BW/4HANA InfoObjects by associating fields with InfoObjects in Open ODS views or CompositeProviders. Figure 8.38 shows a table field associated to the InfoObject 0WBS_ELEMT.

Associate Table Field to InfoObejct

Figure 8.38    Associate Table Field to InfoObejct

Through an association with an InfoObject, the attributes and text data of the InfoObject will be available in the Open ODS view or CompositeProvider. In this way, we can avoid data redundancy in SAP HANA and avoid loading duplicate data into the SAP BW/4HANA system.

Turn on Navigation Attributes

After associating a field with an InfoObject, all attributes of the associated InfoObject are available, and you can turn on one or more attributes as navigation attributes, as shown in Figure 8.39.

Turn on Navigation Attributes

Figure 8.39    Turn on Navigation Attributes

Compound InfoObjects

Figure 8.40 shows the InfoObject 0COSTELMNT (Cost Element) compounding to 0CO_AREA (Controlling Area); we also can specify the compounding in an Open ODS view or CompositeProvider in SAP HANA Studio, as shown in Figure 8.41.

InfoObject Compounding

Figure 8.40    InfoObject Compounding

Compounding InfoObejct in Open ODS View or CompositeProvider

Figure 8.41    Compounding InfoObejct in Open ODS View or CompositeProvider

SAP BEx queries can be created on top of the Open ODS view or CompositeProvider. The navigation attributes and text can be used as usual in SAP BW/4HANA models. Note that even with Open ODS views and CompositeProviders created in Eclipse, you still need to use transport requests to transport them across the SAP BW/4HANA landscape.