How to Model Composite Providers in SAP BW/4HANA
SAP BW/4HANA is a modern data warehouse solution that simplifies and optimizes the way you manage and analyze your data. One of the key features of SAP BW/4HANA is the Composite Provider, which is an InfoProvider that combines data from several analytic indexes or from other InfoProviders (by join or union), and makes this data available for reporting and analysis.
In this blog post, you will learn what Composite Providers are, what types of Composite Providers are available, how to create and activate them, and how to use them in mixed modeling scenarios or expose them to external consumers.
What are Composite Providers?
Composite Providers are flexible data containers that allow you to integrate data from different sources and models, such as Advanced DataStore Objects (ADSOs), Open ODS Views, SAP HANA Calculation Views, or other Composite Providers. Composite Providers can be used for various purposes, such as harmonizing data from different systems, enriching data with additional logic or calculations, creating virtual models without persisting data, or creating central models for reporting and analysis.
Composite Providers consist of two main components:
- Part Providers: These are the InfoProviders or analytic indexes that provide the data for the Composite Provider. Part Providers can be joined or unioned to form the Composite Provider.
- Output Structure: This is the structure that defines the fields and semantics of the Composite Provider. The output structure can be derived from the part providers or defined manually. You can also add calculated fields or filters to the output structure.
Depending on the type and settings of a Composite Provider, different views are generated when you activate a Composite Provider. The most common ones are:
- View for Reporting: This is the view that provides the data for reporting and analysis from the Composite Provider. It has the same structure as the output structure of the Composite Provider.
- View for External Access: This is a view that provides a standardized and simplified access to the data of the Composite Provider for external consumers, such as SAP HANA SQL clients or third-party tools. It is based on the view for reporting and has some additional features, such as cold store flag, internal and external formats for amount key figures, reference points for non-cumulative key figures, etc.
What types of Composite Providers are available?
There are two main types of Composite Providers in SAP BW/4HANA:
- CompositeProvider based on Union: This is a type of Composite Provider that combines data from different part providers using a union operation. The output structure of this type of Composite Provider is derived from the part providers automatically. You can use this type of Composite Provider to harmonize data from different systems or sources, or to create virtual models without persisting data.
- CompositeProvider based on Join: This is a type of Composite Provider that combines data from different part providers using a join operation. The output structure of this type of Composite Provider can be derived from the part providers automatically or defined manually. You can use this type of Composite Provider to enrich data with additional logic or calculations, or to create central models for reporting and analysis.
The following table summarizes the main characteristics and differences of the two types of Composite Providers:
|Type||Operation||Output Structure||Use Cases|
|CompositeProvider based on Union||Union||Derived automatically||Harmonizing data from different systems or sources, creating virtual models without persisting data|
|CompositeProvider based on Join||Join||Derived automatically or defined manually||Enriching data with additional logic or calculations, creating central models for reporting and analysis|
How to create and activate Composite Providers?
You can create and activate Composite Providers using the SAP BW/4HANA Modeling Tools in Eclipse. The steps are as follows:
- In the Project Explorer, right-click on the InfoArea where you want to create the Composite Provider and choose New > CompositeProvider.
- In the wizard, enter a technical name, a description, and a type for the Composite Provider. Click Next.
- In the next screen, you can add the part providers for the Composite Provider. You can choose from existing InfoProviders or analytic indexes in your system, or you can create new ones on the fly. You can also specify the join or union conditions for each part provider. Click Finish.
- The Composite Provider is created in the inactive version and is displayed in the editor. You can make further changes to the Composite Provider properties, such as output structure, calculated fields, filters, etc.
- To activate the Composite Provider, right-click on the Composite Provider and choose Activate. The system will generate the views for the Composite Provider and activate it.
How to use Composite Providers in mixed modeling scenarios or expose them to external consumers?
As mentioned earlier, one of the features of SAP BW/4HANA is the view for external access for Composite Providers. This view is generated by default for all Composite Providers created in SAP BW/4HANA.
The view for external access has some advantages over using the views directly for mixed modeling scenarios or exposing data to external consumers. Some of these advantages are:
- It provides a standardized and simplified access to the data of a Composite Provider without exposing the internal details or complexity of the views.
- It supports different data temperature scenarios by using a new controller technical flag called COLD_STORE_FLAG. This flag indicates whether a record is stored in hot, warm, or cold storage tiers based on your data tiering strategy.
- It supports different formats for amount key figures by using internal and external formats. The internal format is used for calculations and aggregations, while the external format is used for display and conversion purposes. The external format is derived from the currency/unit fields of the Composite Provider.
- It supports non-cumulative key figures by exposing reference points with an additional column with naming convention as _NCUM_REFP. The reference points indicate the validity period of a non-cumulative value.
To use the view for external access, you need to know its name and structure. The name of the view is /BIC/H8. The structure of the view is similar to the output structure of the Composite Provider, plus some additional fields as mentioned above.
You can access the view for external access using SAP HANA SQL clients or third-party tools that support SAP HANA SQL dialect. For example, you can use SAP HANA Studio or SAP HANA Database Explorer to query the view using SQL statements.
Here is an example of a SQL statement that selects some fields from a Composite Provider based on join with technical name SALESJOIN:
"CALYEAR" = '2020'
This statement will return the following result:
|CALYEAR||COUNTRY||PRODUCT||SALES_QTY||SALES_AMT (Internal Format)||SALES_AMT_EXT (External Format)||CURRENCY||COLD_STORE_FLAG|
As you can see, the view for external access shows the sales amount in both internal and external formats, and also indicates the data temperature using the cold store flag.
In this blog post, you have learned how to model Composite Providers in SAP BW/4HANA, what types of Composite Providers are available, how to create and activate them, and how to use them in mixed modeling scenarios or expose them to external consumers. Composite Providers are powerful and flexible data containers that can help you integrate and harmonize data from different sources and models.
Disclaimer: This content is generated by AI.