Discussing the View Browser and Query Browser

Objectives

After completing this lesson, you will be able to:

  • Use the view browser and query browser

The View Browser and Query Browser in Context

With the help of the SAP Help Portal, you can get an application-related overview about the delivered Standard CDS Views. The previous figure, Standard CDS Views for Overhead Cost Controlling, gives you an idea about the content CDS Views for Overhead Cost Controlling.

For more information about the Virtual Data Model (VDM) in SAP S/4HANA, check the following VDM documentation link: https://help.sap.com/viewer/6b356c79dea443c4bbeeaf0865e04207/1809.000/en-US/8573b810511948c8a99c0672abc159aa.html

The previous example refers to a content consumption view. All delivered consumption views start with C_.

The documentation also explains on which interface views in the VDM view hierarchy this consumption views is based.

The technical name of all content Interface views (Basic Views and Composite Views) starts with I_.

The figure, Top-down Sight on the Structure of the Virtual Data Model (VDM), gives you an idea about the hierarchical layer structure of the VDM.

In the previous example, the Consumption View C_CostCenterPlanActQ2001 is linked to the I_ActualPlanJrnlEntryItemCube interface view.

This interface view is linked to the next Interface view, I_ActualPlanJournalEntryItem, which is linked to the P_ActualPlanJrnlEntryItm private view.

A Private View is a Basic View that refers to the database, in this case to the database table ACDOCA. Looking at the complete Virtual Data Model for this content consumption view, you can see that it reads data from ACDOCA and ACDOCP in parallel.

Note

Since we can only set up an Analytical Query on top of an Interface View, we will use the I_ActualPlanJrnlEntryItemCube as the basis for the construction of a consumption view of type Analytical Query in our scenario.

The View Browser is a tool to check CDS Views for their content and annotations and allows you to explore thousands of VDM Views without the need for technical skills and are therefore very well suited for business users.

With the View Browser, you can explore all kinds of CDS View types for example:

  • Basic Views
  • Composite Views
  • Consumption Views (Pure Consumption Views as well as the Analytical Queries)
Note

"Undefined" CDS Views are customer-specific CDS Views. Their technical name starts with ZZ1_... or ZZ9_... .

The previous example shows the content and annotations of the delivered consumption view, C_CostCenterPlanActQ2001 (ABAP View name) from the perspective of the View Browser.

C_... makes us understand that we are checking a content Consumption View and the Data Category Type Query explains to the user, that we are checking a Consumption View of type Analytical Query.

Checking the details of a view, you will find three tabs:

  • Definition: Shows the dimension and measure fields which are part of the CDS View
  • Annotation: Shows the annotations of the CDS View
  • Cross Reference: Shows the link to the Interface View which is one level lower in the VDM hierarchy.

In the Annotation tab, you will find the @Analytics.query: true annotation which explains the business user that the checked view is a Consumption View of type Analytical Query.

The SQL View name allows the business user to derive from its name the technical name of the Analytical Query, e. i. they just have to put 2C before the SQL View name in order to get the technical name of the Analytical Query. This is shown in the previous figure.

Note
Both types of content Consumption Views are always delivered without the annotation @OData.publish:true. There are several ways to enrich this annotation if needed, but since we don't need the OData Service in our scenario, we won't go into further details. In a customer-specific Consumption View, you would automatically get this annotation when you publish the view and see it in the View Browser.

If the Consumption View is of type Analytical Query, the Show Content button is active when you select the view in the View Browser tile. In this case, the business user has the possibility to open a Web Dynpro report which is based on the dimensions and measures of the C_CostCenterPlanActQ2001 Consumption View.

Using the functionality delivered for reports the business user can log on with the user the end user uses in the system and construct a report as needed by the end user, and finally save the report as a tile. By doing so, the end user can use this report in their SAP Fiori Launchpad.

In addition, the business user can always choose the Query Information tab of the Web Dynpro report and get information about the technical name of the Analytical Query.

The figure provides you with another example of what the View Browser will show when you check the details for an ABAP view of type Interface View (a Composite View), e. i. I_ActualPlanJrnlEntryItemCube.

As you can see, the Annotations will only show the SQL View Name. In such a case, the business user automatically knows that they check an Interface View and not a Consumption View!

For Interface Views, it is not possible to jump to a Web Dynpro report.

Note

In the following, we will focus on Interface Views since we want to create Analytical Queries which can only be created on top of Interface Views.

Consumption views to which Analytical Queries belong can only be consumed by the frontends but can't be the basis for further consumption view constructions.

A consumption view is the top layer of a VDM model.

In contrast to the View Browser, the Query Browser can only show consumption views that were annotated as Analytical Query.

The Query Browser application allows the business user, and also the end user, to select an Analytical Query and perform on-demand reporting on it. The analytical query is specified using a URL parameter, so that it is possible to create a tile that directly starts the analytical query.

In the Query Browser, a long list of analytical queries is displayed. In real life, you will only work with some of these. You can search for the required query and mark it as a favorite.

To open the Analytical Query in a Web Dynpro template, choose Open for Analysis. You will be prompted for the required query variables. The resulting screen shows the selected data in a table and in a chart on the Graphical Display tab if you configure it. The look and feel of this result page can be customized.

The query can also be saved as an SAP Fiori tile by choosing the Share icon in the upper right of the screen and then selecting the Save as tile.

Use the View Browser to Analyze a Consumption View

Check the Settings of an Interface View in the View Browser

Log in to track your progress & complete quizzes