The following very simple example shows how the analytic annotation Analytics.dataCategory can be used to create a BW provider(see Embedded Reporting on ABAP CDS views for general information to the topic of CDS views)
ABAP Perspective in SAP Hana Studio
- The sqlviewname is used in the ABAP dictonary, see screenshot of SE11 below
- The sqlviewname is also used with the prefiy 2C in the technical name of the provider
- @Analytics.dataCategory: #CUBE defines the view as a BW provider
- The CDS view only retrieves somes fields form the table SFLIGHT where the Airline is equal to DL.
The DataPreview displays the following result
After the activation of the CDS view the BW provider already exists in the system. Hence, e.g. we can run the adhoc query in RSRT and compare the query result with the Hana Studio Data Preview
We change now the navigation state and focus on the key figure Airfare. In the CDS view above it was defined with @DefaultAggregation: #MIN. In the query result below you can see (yellow result line) that this key figure was aggreagted with aggregation Minimum.