Skip to Content
Technical Articles
Author's profile photo Felipe de Mello Rodrigues

Create an Analytical List Page using ABAP CDS views and annotations

Analytical List Page is a powerful Fiori Element available since SAPUI5 innovation version 1.48, this template provides the ability to create an analytical dashboard with KPIs, charts, tables and also a drill-down navigation to a detail page.

You can find all the relevant information about Analytical List Pages in the SAP Fiori Design Guideline. I’ll try to resume the content of the guidelines explaining the basic concepts behind this template, starting by the structure of the ALP which is composed by three main areas:

  • Page Title
  • Page Header
  • Page Content

We also have a drill-down navigation that can be configured to redirect the user to an Object Page (configured internally through annotations) or a Cross-app navigation (based on a semantic object, action and parameters). Let’s check in details each one of these components.

 

Page Title

Contains the variant management and a section of global KPI tags, it’s possible to display a maximum of three KPIs per application.

Pressing a KPI tag provides access to the KPI card which contains a chart with additional information, the KPI card is based on the same template of the analytical card provided by Overview Pages.

The header of the KPI card displays more information about the current value, target, deviation and how the KPI has evolved over time, all of these concepts are based on the Trend-Criticality Calculation, if you never heard about this subject before I advise you to have a quick look in this article:

 

Page Header

Basically composed by the filter area which allows users to filter the result set. Two types of filters are supported: compact filters and visual filters. Users can toggle between the two filter modes anytime.

Visual filters are composed by a title and an interactive chart, there are three types available at the moment: bar chart, line chart and donut chart. When the user selects one point in the chart the content area is filtered based on the selected value, in the case of a hybrid view the chart and table are filtered at the same time.

 

Page Content

Consists of either a hybrid view (combination of a chart and a table), a chart-only view, or a table-only view. This is the main working area, where users can interact with both the chart and table visualizations, remember that chart visualization increases the joy of use and enables users to spot relevant data more quickly.

The analytical list page always comes with the three views, so it means the user can toggle between the different layouts anytime.

 

Based on all the information presented so far we can think about a basic layout for our demo application. The idea is to construct an application on top of a Flight Bookings report, this means all the components will show information related with flights (e.g. Country, Airline, Flight Date, Bookings). With this statement in mind we can define the relevant objects for each area of the ALP:

  • Page Title
    • KPI Card with Weight of Luggage by Country.
  • Page Header
    • Visual Filter with Total of Bookings by Year.
  • Page Content (Hybrid view)
    • Chart with Total of Bookings by Year and Airline.
    • Table with Total of Bookings and Weight of Luggage by Airline.
  • Drill-down navigation
    • Object page with a simple form with the Airline, Total of Bookings and Weight of Luggage.

All the technical steps to construct our application can be found in the SAP Help. We basically need to configure the App Descriptor and the Annotation file inside our UI5 application, but in this demo I decided to explain an alternative way declaring all the annotations in the ABAP CDS layer, this strategy reduces the configuration work in the UI5 app.

To facilitate the understanding of all the concepts I’m going to start with the ABAP CDS development explaining each one of the items in details before we expose the whole CDS view. After we finish this first section I’m going to explain the remaining steps of configuration inside of the UI5 application.

 

ABAP CDS

To avoid spending time with the data model definition we’re going to construct a query on top of the analytical model delivered in my last article, if you didn’t check it yet I advise you to have a look before you continue this reading:

The analytical query has the ability to aggregate data based only in the exposed dimensions, this is an essential functionality for analytical applications, also, we can declare all the UI annotations responsible for the coordination of the front-end in a single CDS view. Let’s start the development thinking only in the relevant fields for the query output.

 

Query (without annotations)

Let’s construct a draft of the CDS view in a simple form (without the annotations), this way we can focus only in the relevant dimensions, measures and the exposure of the OData service.

We should read data from the cube Z_Cube_FlightBookings and select the following fields:

  • Dimensions:
    • Airline
    • CustomerCountry
    • CalendarYear
  • Key Figures:
    • TotalOfBookings
    • WeightOfLuggage

This is the expected outcome:

@AbapCatalog.sqlViewName: 'ZQUERYFLIGHTALP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight (Analytical List Page)'

@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@OData.publish: true

define view Z_Query_Flight_ALP 
  as select from Z_Cube_FlightBookings
{
    @AnalyticsDetails.query.display: #KEY_TEXT
    Airline,
    
    @AnalyticsDetails.query.display: #KEY_TEXT
    CustomerCountry,
    
    CalendarYear,
    
    TotalOfBookings,
    
    WeightOfLuggage
} 

Don’t forget to place the annotation @Analytics.query: true to transform this CDS view in an analytical query and use the power of aggregation, as I mentioned before, this item is essential for this kind of application. Also, place the @OData.publish: true in the header to publish an OData service project automatically based on the structure of our CDS view.

Now we populated all the relevant fields and we can start to fill the relevant annotations for each one of the ALP sections.

 

Page Title (KPIs)

In this section we want only a KPI tag and card, check below the set of annotations expected to achieve this functionality.

KPI Card

 

Let’s translate this diagram and publish the relevant annotations in the header of our CDS view.

@UI.selectionPresentationVariant: {
    qualifier: 'KPIWeightByCountry',
    presentationVariantQualifier: 'KPIWeightByCountry',
    selectionVariantQualifier: 'KPIWeightByCountry'
}

@UI.presentationVariant: {
    qualifier: 'KPIWeightByCountry',
    text: 'KPI: Weight of Luggage per Country',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartWeightByCountry'
    },{
        type: #AS_DATAPOINT,
        qualifier: 'WeightOfLuggage'
    }]
}

@UI.selectionVariant: {
    qualifier: 'KPIWeightByCountry',
    text: 'KPI Weight By Country'
}

@UI.chart: {
    qualifier: 'ChartWeightByCountry',
    chartType: #COLUMN,
    dimensions:  [ 'CustomerCountry' ], 
    measures:  [ 'WeightOfLuggage' ],
    dimensionAttributes: [{
        dimension: 'CustomerCountry',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'WeightOfLuggage',
        role: #AXIS_1
    }]
}

And this annotation on the top of our key figure to generate a Data Point (Weight of Luggage).

@UI.dataPoint.title: 'Weight of Luggage'
WeightOfLuggage

Important Note: The Descriptor Settings are configured in the manifest.json file inside the UI5 application. We’ll check this configuration in details in the final section of this article.

 

Page Header (Visual Filter)

To include an attribute in the filter we usually work with the @UI.SelectionFields annotation, but to work with a visual filter we have some extra steps to configure. Check the relevant set of annotations expected for the visual filter below:

Visual Filter

 

Let’s translate this diagram and publish the relevant annotations in the header of our CDS view.

@UI.presentationVariant: {
    qualifier: 'FilterBookingsByYear',
    text: 'Filter: Bookings by Year',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartBookingsByYear'
    }]
}

@UI.chart: {
    qualifier: 'ChartBookingsByYear',
    chartType: #DONUT,
    dimensions:  [ 'CalendarYear' ], 
    measures:  [ 'TotalOfBookings' ],
    dimensionAttributes: [{
        dimension: 'CalendarYear',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'TotalOfBookings',
        role: #AXIS_1
    }]
}

And this annotation on the top of our dimension (Calendar Year).

@UI.selectionField.position: 10
CalendarYear

Important Note: CommonValueList cannot be configured inside the CDS view, so we’re going to adapt this annotation directly in the annotation file inside the UI5 application. We’ll check this configuration in details in the final section of this article.

 

Page Content (Hybrid view)

Since we are working with a Hybrid View we should prepare annotations for the chart and table, check below the expected set of annotations for each one of them.

Chart

Table

 

Let’s translate these diagrams and publish the relevant annotations in the header of our CDS view.

@UI.selectionPresentationVariant: {
    qualifier: 'Default',
    presentationVariantQualifier: 'Default',
    selectionVariantQualifier: 'Default'
}

@UI.presentationVariant: {
    qualifier: 'Default',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartDefault'
    }]
}

@UI.selectionVariant: {
    qualifier: 'Default',
    text: 'Default'
}

@UI.chart: {
    qualifier: 'ChartDefault',
    chartType: #COLUMN,
    dimensions:  [ 'CalendarYear', 'Airline' ], 
    measures:  [ 'TotalOfBookings' ],
    dimensionAttributes: [{
        dimension: 'CalendarYear',
        role: #SERIES
    },{
        dimension: 'Airline',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'TotalOfBookings',
        role: #AXIS_1
    }]
}

To create a table we need to include annotations for each one of the columns, place these annotations on the top of the fields (Airline, TotalOfBookings and WeightOfLuggage):

@UI.lineItem.position: 10
Airline,

@UI.lineItem.position: 20
TotalOfBookings,

@UI.lineItem.position: 30
WeightOfLuggage

Important Note: The Descriptor Settings are configured in the manifest.json file inside of the UI5 application. We’ll check this configuration in details in the final section of this article.

 

Let’s aggregate all of these pieces of code and construct the final version of our CDS view, this is the expected result:

@AbapCatalog.sqlViewName@ : 'ZQUERYFLIGHTALP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight (Analytical List Page)'

@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@OData.publish: true

@UI.selectionPresentationVariant: [{
    qualifier: 'KPIWeightByCountry',
    presentationVariantQualifier: 'KPIWeightByCountry',
    selectionVariantQualifier: 'KPIWeightByCountry'
},{
    qualifier: 'Default',
    presentationVariantQualifier: 'Default',
    selectionVariantQualifier: 'Default'
}]

@UI.presentationVariant: [{
    qualifier: 'KPIWeightByCountry',
    text: 'KPI: Weight of Luggage per Country',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartWeightByCountry'
    },{
        type: #AS_DATAPOINT,
        qualifier: 'WeightOfLuggage'
    }]
},{
    qualifier: 'FilterBookingsByYear',
    text: 'Filter: Bookings by Year',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartBookingsByYear'
    }]
},{
    qualifier: 'Default',
    visualizations: [{
        type: #AS_CHART,
        qualifier: 'ChartDefault'
    }]
}]

@UI.selectionVariant: [{
    qualifier: 'KPIWeightByCountry',
    text: 'Default'
},{
    qualifier: 'Default',
    text: 'Default'
}]

@UI.chart: [{
    qualifier: 'ChartWeightByCountry',
    chartType: #COLUMN,
    dimensions:  [ 'CustomerCountry' ], 
    measures:  [ 'WeightOfLuggage' ],
    dimensionAttributes: [{
        dimension: 'CustomerCountry',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'WeightOfLuggage',
        role: #AXIS_1
    }]
},{
    qualifier: 'ChartBookingsByYear',
    chartType: #DONUT,
    dimensions:  [ 'CalendarYear' ], 
    measures:  [ 'TotalOfBookings' ],
    dimensionAttributes: [{
        dimension: 'CalendarYear',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'TotalOfBookings',
        role: #AXIS_1
    }]
},{
    qualifier: 'ChartDefault',
    chartType: #COLUMN,
    dimensions:  [ 'CalendarYear', 'Airline' ], 
    measures:  [ 'TotalOfBookings' ],
    dimensionAttributes: [{
        dimension: 'CalendarYear',
        role: #SERIES
    },{
        dimension: 'Airline',
        role: #CATEGORY
    }],
    measureAttributes: [{
        measure: 'TotalOfBookings',
        role: #AXIS_1
    }]
}]

define view Z_Query_Flight_ALP 
  as select from Z_Cube_FlightBookings
{
    @AnalyticsDetails.query.display: #KEY_TEXT
    @UI.lineItem.position: 10
    Airline,
    
    @AnalyticsDetails.query.display: #KEY_TEXT
    CustomerCountry,
    
    @UI.selectionField.position: 10
    CalendarYear,
    
    @UI.lineItem.position: 20
    TotalOfBookings,
    
    @UI.dataPoint.title: 'Weight of Luggage'
    @UI.lineItem.position: 30
    WeightOfLuggage
}

If you don’t have access to ABAP CDS you can still configure all of your annotations locally (inside the UI5 application). This CDS view generates the following output in the XML format:

<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType">
    <Annotation Term="UI.Chart" Qualifier="ChartDefault">
        <Record Type="UI.ChartDefinitionType">
            <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column" />
            <PropertyValue Property="Dimensions">
                <Collection>
                    <PropertyPath>Airline</PropertyPath>
                    <PropertyPath>CalendarYear</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="DimensionAttributes">
                <Collection>
                    <Record Type="UI.ChartDimensionAttributeType">
                        <PropertyValue Property="Dimension" PropertyPath="Airline" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category" />
                    </Record>
                    <Record Type="UI.ChartDimensionAttributeType">
                        <PropertyValue Property="Dimension" PropertyPath="CalendarYear" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Series" />
                    </Record>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="Measures">
                <Collection>
                    <PropertyPath>TotalOfBookings</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="MeasureAttributes">
                <Collection>
                    <Record Type="UI.ChartMeasureAttributeType">
                        <PropertyValue Property="Measure" PropertyPath="TotalOfBookings" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1" />
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.Chart" Qualifier="ChartBookingsByYear">
        <Record Type="UI.ChartDefinitionType">
            <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut" />
            <PropertyValue Property="Dimensions">
                <Collection>
                    <PropertyPath>CalendarYear</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="DimensionAttributes">
                <Collection>
                    <Record Type="UI.ChartDimensionAttributeType">
                        <PropertyValue Property="Dimension" PropertyPath="CalendarYear" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category" />
                    </Record>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="Measures">
                <Collection>
                    <PropertyPath>TotalOfBookings</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="MeasureAttributes">
                <Collection>
                    <Record Type="UI.ChartMeasureAttributeType">
                        <PropertyValue Property="Measure" PropertyPath="TotalOfBookings" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1" />
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.Chart" Qualifier="ChartWeightByCountry">
        <Record Type="UI.ChartDefinitionType">
            <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column" />
            <PropertyValue Property="Dimensions">
                <Collection>
                    <PropertyPath>CustomerCountry</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="DimensionAttributes">
                <Collection>
                    <Record Type="UI.ChartDimensionAttributeType">
                        <PropertyValue Property="Dimension" PropertyPath="CustomerCountry" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category" />
                    </Record>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="Measures">
                <Collection>
                    <PropertyPath>WeightOfLuggage</PropertyPath>
                </Collection>
            </PropertyValue>
            <PropertyValue Property="MeasureAttributes">
                <Collection>
                    <Record Type="UI.ChartMeasureAttributeType">
                        <PropertyValue Property="Measure" PropertyPath="WeightOfLuggage" />
                        <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1" />
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.DataPoint" Qualifier="WeightOfLuggage">
        <Record>
            <PropertyValue Property="Value" Path="WeightOfLuggage" />
            <PropertyValue Property="Title" String="Weight of Luggage" />
        </Record>
    </Annotation>
    <Annotation Term="UI.LineItem">
        <Collection>
            <Record Type="UI.DataField">
                <PropertyValue Property="Value" Path="Airline" />
            </Record>
            <Record Type="UI.DataField">
                <PropertyValue Property="Value" Path="TotalOfBookings" />
            </Record>
            <Record Type="UI.DataField">
                <PropertyValue Property="Value" Path="WeightOfLuggage" />
            </Record>
        </Collection>
    </Annotation>
    <Annotation Term="UI.PresentationVariant" Qualifier="Default">
        <Record>
            <PropertyValue Property="Text" String="" />
            <PropertyValue Property="Visualizations">
                <Collection>
                    <AnnotationPath>@UI.Chart#ChartDefault</AnnotationPath>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.PresentationVariant" Qualifier="FilterBookingsByYear">
        <Record>
            <PropertyValue Property="Text" String="Filter: Bookings by Year" />
            <PropertyValue Property="Visualizations">
                <Collection>
                    <AnnotationPath>@UI.Chart#ChartBookingsByYear</AnnotationPath>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.PresentationVariant" Qualifier="KPIWeightByCountry">
        <Record>
            <PropertyValue Property="Text" String="KPI: Weight of Luggage per Country" />
            <PropertyValue Property="Visualizations">
                <Collection>
                    <AnnotationPath>@UI.DataPoint#WeightOfLuggage</AnnotationPath>
                    <AnnotationPath>@UI.Chart#ChartWeightByCountry</AnnotationPath>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="UI.SelectionFields">
        <Collection>
            <PropertyPath>CalendarYear</PropertyPath>
        </Collection>
    </Annotation>
    <Annotation Term="UI.SelectionPresentationVariant" Qualifier="Default">
        <Record>
            <PropertyValue Property="Text" String="" />
            <PropertyValue Property="SelectionVariant" Path="@UI.SelectionVariant#Default" />
            <PropertyValue Property="PresentationVariant" Path="@UI.PresentationVariant#Default" />
        </Record>
    </Annotation>
    <Annotation Term="UI.SelectionPresentationVariant" Qualifier="KPIWeightByCountry">
        <Record>
            <PropertyValue Property="Text" String="" />
            <PropertyValue Property="SelectionVariant" Path="@UI.SelectionVariant#KPIWeightByCountry" />
            <PropertyValue Property="PresentationVariant" Path="@UI.PresentationVariant#KPIWeightByCountry" />
        </Record>
    </Annotation>
    <Annotation Term="UI.SelectionVariant" Qualifier="Default">
        <Record>
            <PropertyValue Property="Text" String="Default" />
        </Record>
    </Annotation>
    <Annotation Term="UI.SelectionVariant" Qualifier="KPIWeightByCountry">
        <Record>
            <PropertyValue Property="Text" String="KPI Weight By Country" />
        </Record>
    </Annotation>
    <Annotation Term="Communication.Contact">
        <Record>
            <PropertyValue Property="adr">
                <Collection>
                    <Record>
                        <PropertyValue Property="type" EnumMember="Communication.ContactInformationType/pref" />
                        <PropertyValue Property="country" Path="CustomerCountry" />
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    <Annotation Term="Communication.Address">
        <Record>
            <PropertyValue Property="type" EnumMember="Communication.ContactInformationType/pref" />
            <PropertyValue Property="country" Path="CustomerCountry" />
        </Record>
    </Annotation>
</Annotations>

Just adapt these XML annotations in your UI5 application and you’ll achieve the same results. 😉

 

UI5 application (Web IDE)

Before you start your UI5 application don’t forget to activate your OData service in the SAP Gateway, use transaction /IWFND/MAINT_SERVICE to activate and /IWFND/GW_CLIENT to test your service.

After the service activation we can start the application development, open your Web IDE account and from the Workspace folder, right click and select the option New -> Project from Template. Check the following steps:

 

1. Select Analytical List Page as the template.

 

2. Fill the project name, title, namespace and description.

 

3. Select the OData service Z_QUERY_FLIGHT_ALP_CDS.

 

4. Select the remote annotation file to expose the annotations generated through the ABAP CDS view, this file contains the XML output demonstrated in the previous section.

 

5. Define the template configuration:

  • OData Collection: Z_QUERY_FLIGHT_ALP
  • Qualifier: Default
  • Table Type: Responsive
  • Auto Hide: TRUE

Note: Don’t forget to place Default as the qualifier, since we defined this name in our ABAP CDS view we need to configure this name in the template customization.

6. Press Finish to conclude the Web IDE wizard. This is the structure of your project after you conclude all the steps.

 

Inside of the App descriptor (manifest.json) we can find the relevant code for the Analytical List Page (sap.ui.generic.app), this snippet of code is generated automatically based on our previous configuration through the Web IDE wizard.

"sap.ui.generic.app": {
    "_version": "1.3.0",
    "pages": {
        "AnalyticalListPage|Z_QUERY_FLIGHT_ALP": {
            "entitySet": "Z_QUERY_FLIGHT_ALP",
            "component": {
                "name": "sap.suite.ui.generic.template.AnalyticalListPage",
                "list": true,
                "settings": {
                    "tableType": "ResponsiveTable ",
                    "multiSelect": false,
                    "qualifier": "Default",
                    "autoHide": true,
                    "showGoButtonOnFilterBar": false,
                    "condensedTableLayout": false,
                    "keyPerformanceIndicators": {}
                }
            },
            "pages": {
                "ObjectPage|Z_QUERY_FLIGHT_ALP": {
                    "entitySet": "Z_QUERY_FLIGHT_ALP",
                    "component": {
                        "name": "sap.suite.ui.generic.template.ObjectPage"
                    }
                }
            }
        }
    }
}

We still have some pending configurations to include in the App descriptor (manifest.json) and in our local annotation file (annotation.xml). These are the remaining items we must configure inside the application:

  • KPI tag and card in the manifest.json;
  • Visual filter in the annotation.xml;
  • Object page layout in the annotation.xml.

 

KPI (manifest.json)

Place this snippet of code inside the keyPerformanceIndicators attribute:

  "keyPerformanceIndicators": {
      "WeightByCountry": {
          "model": "kpi",
          "entitySet": "Z_QUERY_FLIGHT_ALP",
          "qualifier": "KPIWeightByCountry"
      }
  }

Don’t forget to create a new model called kpi pointing to your data souce, in my example the model references the mainService data source but you could use a different source if you want.

 

Visual Filter (annotation.xml)

Configure a Common.ValueList annotation for the property CalendarYear. For this task you can use the annotation modeler or configure directly in the XML code.

Using the annotation modeler select a new Target for the property CalendarYear.

Include a new Common.ValueList annotation and fill the following parameters:

  • CollectionPath: Z_QUERY_FLIGHT_ALP
  • PresentationVariantQualifier: FilterBookingsByYear

This XML code is generated by the Annotation Modeler:

<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType/CalendarYear">
    <Annotation Term="Common.ValueList">
        <Record Type="Common.ValueListType">
            <PropertyValue Property="CollectionPath" String="Z_QUERY_FLIGHT_ALP"/>
            <PropertyValue Property="Parameters"/>
            <PropertyValue Property="PresentationVariantQualifier" String="FilterBookingsByYear"/>
        </Record>
    </Annotation>
</Annotations>

 

Object Page (annotation.xml)

Include a new group of Facet annotations and fill the following parameters:

  • UI.CollectionFacet
    • ID: MainSection
    • Label: Details (i18n string)
    • UI.ReferenceFacet
      • Target: @UI.lineItem

This XML code is generated by the Annotation Modeler:

<Annotation Term="UI.Facets">
    <Collection>
        <Record Type="UI.CollectionFacet">
            <PropertyValue Property="ID" String="MainSection"/>
            <PropertyValue Property="Label" String="{@i18n&gt;DETAILS}"/>
            <PropertyValue Property="Facets">
                <Collection>
                    <Record Type="UI.ReferenceFacet">
                        <PropertyValue Property="Target" AnnotationPath="@UI.LineItem"/>
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Collection>
</Annotation>

 

Testing the Analytical List Page

Finally we finished the configuration and now we can start to play with all the functionalities discussed so far, check below a quick presentation of this demo application.

 

This is the end! I know this is a quite complex subject but I hope you’re able to understand the basic concepts around the ALP and enjoyed the content! See you next time! 🙂

Assigned Tags

      94 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mahaboob Pathan
      Mahaboob Pathan

      Hi,

      Very useful and Lots of information to start with....

      Thank you..

      Author's profile photo Vuval Aycicek
      Vuval Aycicek

      Hi,

      thanks a lot. Looking forward your next blog.:))

       

      Author's profile photo Jiyoung Pyo
      Jiyoung Pyo

      Hi,

      I followed your guide, but I have some problem.

      1. visual filter was not created.

      this is my annotation file, and i'm not using ABAP CDS View.

      <Annotation Term="UI.SelectionFields">
      	<Collection>
      		<PropertyPath>Id</PropertyPath>
      	</Collection>
      </Annotation>
      <Annotation Term="UI.Facets">
      	<Collection>
      	<Record Type="UI.CollectionFacet">
      		<PropertyValue Property="ID" String="MainSection"/>
      		<PropertyValue Property="Facets">
      	<Collection>
      	<Record Type="UI.ReferenceFacet">
              <PropertyValue Property="Target" AnnotationPath="@UI.LineItem"/>
      	</Record>
              </Collection>
              </PropertyValue>
      	</Record>
      	</Collection>
      </Annotation>
      <Annotation Term="Common.ValueList">
      	<Record Type="Common.ValueListType">
      	<PropertyValue Property="CollectionPath" String="WebIdTestSet"/>
      	<PropertyValue Property="Parameters"/>
      	<PropertyValue Property="PresentationVariantQualifier" String="{@i18n&gt;FILTER_colon_CHART_TEST01}"/>
      	</Record>
      </Annotation>
      <Annotation Term="UI.PresentationVariant" Qualifier="Chart01">
      	<Record Type="UI.PresentationVariantType">
      	<PropertyValue Property="SortOrder"/>
      	<PropertyValue Property="GroupBy"/>
      	<PropertyValue Property="TotalBy"/>
      	<PropertyValue Property="Total"/>
      	<PropertyValue Property="Visualizations">
      	<Collection>
      	<AnnotationPath>@UI.Chart#Chart01</AnnotationPath>
      	</Collection>
      	</PropertyValue>
      	<PropertyValue Property="RequestAtLeast"/>
      	<PropertyValue Property="Text" String="Filter : Chart Test01"/>
      	</Record>
      </Annotation>
      <Annotation Term="UI.Chart" Qualifier="Chart01">
      	<Record Type="UI.ChartDefinitionType">
      	<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut"/>
      	<PropertyValue Property="Measures">
      	<Collection>
      		<PropertyPath>Kmtravelled</PropertyPath>
      	</Collection>
      	</PropertyValue>
      	<PropertyValue Property="MeasureAttributes">
      		<Collection>
      			<Record Type="UI.ChartMeasureAttributeType">
      			<PropertyValue Property="Measure" PropertyPath="Kmtravelled"/>
      			<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      			</Record>
      		</Collection>
      	</PropertyValue>
      	<PropertyValue Property="Dimensions">
      	<Collection>
      	<PropertyPath>Id</PropertyPath>
      	</Collection>
      	</PropertyValue>
      	<PropertyValue Property="DimensionAttributes">
      	<Collection>
      	<Record Type="UI.ChartDimensionAttributeType">
      	<PropertyValue Property="Dimension" PropertyPath="Id"/>
      	<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      	</Record>
      	</Collection>
      	</PropertyValue>
      	<PropertyValue Property="Actions"/>
      	<PropertyValue Property="Title" String="Test 1"/>
      	</Record>
      </Annotation>
      <Annotation Term="UI.PresentationVariant" Qualifier="Default">
      	<Record Type="UI.PresentationVariantType">
      		<PropertyValue Property="SortOrder"/>
      		<PropertyValue Property="GroupBy"/>
      		<PropertyValue Property="TotalBy"/>
      		<PropertyValue Property="Total"/>
      		<PropertyValue Property="Visualizations">
      		<Collection>					 
                          <AnnotationPath>@UI.Chart#ChartDefault</AnnotationPath>
      		</Collection>
      		</PropertyValue>
      		<PropertyValue Property="RequestAtLeast"/>
      	</Record>
      </Annotation>
      <Annotation Term="UI.Chart" Qualifier="ChartDefault">
      	<Record Type="UI.ChartDefinitionType">
      		<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      		<PropertyValue Property="Measures">
      			<Collection>
      				<PropertyPath>Kmtravelled</PropertyPath>
      			</Collection>
      		</PropertyValue>
      		<PropertyValue Property="MeasureAttributes">
      			<Collection>
      				<Record Type="UI.ChartMeasureAttributeType">
      					<PropertyValue Property="Measure" PropertyPath="Kmtravelled"/>
      					<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      				</Record>
      			</Collection>
      		</PropertyValue>
      		<PropertyValue Property="Dimensions">
      		        <Collection>
      				<PropertyPath>Id</PropertyPath>
      			</Collection>
      		</PropertyValue>
      		<PropertyValue Property="DimensionAttributes">
      			<Collection>
      				<Record Type="UI.ChartDimensionAttributeType">
      					<PropertyValue Property="Dimension" PropertyPath="Id"/>
      					<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      				</Record>
      			</Collection>
      		</PropertyValue>
      		<PropertyValue Property="Actions"/>
      			</Record>
      </Annotation>
      <Annotation Term="UI.SelectionVariant" Qualifier="Default">
      		<Record Type="UI.SelectionVariantType">
      			<PropertyValue Property="Parameters"/>
      			<PropertyValue Property="SelectOptions"/>
      			<PropertyValue Property="Text" String="Default"/>
      		</Record>
      </Annotation>
      <Annotation Term="UI.LineItem">
      		<Collection>
      			<Record Type="UI.DataField">
      				<PropertyValue Property="Value" Path="Id"/>
      			</Record>
      			<Record Type="UI.DataField">
      				<PropertyValue Property="Value" Path="Kmtravelled"/>
      			</Record>
      		</Collection>
      </Annotation>

      Are there any misconfigurations in the annotation file?

      Or is there a process that must precede ABAP section for visual filter construction?

       

      2.  In Annotation Modeler, SelectionVariant and PresentationVariant Path of UI.SelectionPresentationVariant are not set.

       

      Is there a good solution?

      Thank you!

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Jiyoung,

      For the visual filter there is no need to implement the SelecionPresentationVariant you need only the PresentationVariant, check the image below extracted from the official documentation:

      Reviewing your annotations I can notice a few issues with the configuration of your Common.ValueList:

      1. This annotation cannot be declared inside the Entity Type node, actually you need to declare Common.ValueList for a specific Property, like in my example I create a new target pointing to the CalendarYear and declared the annotation inside this node.
      2. You declared your PresentationVariant pointing to an i18n string but you should use a simple string referencing directly the name of your PresentationVariant, in your example I think is Chart01.

      I don’t know exactly the structure of your service but I will try to exemplify these items through the code below:

      <Annotations Target="YOUR_ENTITY_TYPE">
         <!-- All the main annotations should be placed here -->
      </Annotations>
      
      <!-- Notice the Target is pointing to the Property instead of the Entity Type -->
      <Annotations Target="YOUR_ENTITY_TYPE/Id">
          <Annotation Term="Common.ValueList">
              <Record Type="Common.ValueListType">
                  <PropertyValue Property="CollectionPath" String="WebIdTestSet"/>
                  <PropertyValue Property="Parameters"/>
                  <!-- The String points directly to Chart01, no use of i18n resources -->
                  <PropertyValue Property="PresentationVariantQualifier" String="Chart01"/>
              </Record>
          </Annotation>
      </Annotations>
      

      If you still have any questions try to review the article to understand the difference between these configurations.

      Cheers,

      Felipe

      Author's profile photo Jiyoung Pyo
      Jiyoung Pyo

      Hi  Felipe,

      Thanks for your advice, I was able to create a visual filter. 🙂

      But There are some questions in the process of creating the Analytical List Page.

       

      The following source file is a modified annotation file.

       

      <Annotations Target="ZHR_WEBIDETEST8_SRV.WebIdeTest">
      	<Annotation Term="UI.PresentationVariant" Qualifier="Default">
      		<Record Type="UI.PresentationVariantType">
      			<PropertyValue Property="SortOrder"/>
      			<PropertyValue Property="GroupBy"/>
      			<PropertyValue Property="TotalBy"/>
      			<PropertyValue Property="Total"/>
      			<PropertyValue Property="Visualizations">
      				<Collection>
                                             <AnnotationPath>@UI.Chart#ChartDefault</AnnotationPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="RequestAtLeast"/>
      		</Record>
      	</Annotation>
      	<Annotation Term="UI.PresentationVariant" Qualifier="Filter">
      		<Record Type="UI.PresentationVariantType">
      			<PropertyValue Property="SortOrder"/>
      			<PropertyValue Property="GroupBy"/>
      			<PropertyValue Property="TotalBy"/>
      			<PropertyValue Property="Total"/>
      			<PropertyValue Property="Visualizations">
      				<Collection>
      					<AnnotationPath>@UI.Chart#Filter01</AnnotationPath>
      					<AnnotationPath>@UI.Chart#Filter02</AnnotationPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="RequestAtLeast"/>
      		</Record>
      	</Annotation>
      	<Annotation Term="UI.Chart" Qualifier="Filter01">
      		<Record Type="UI.ChartDefinitionType">
      			<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Line"/>
      			<PropertyValue Property="Measures">
      				<Collection>
      					<PropertyPath>Seatsmax</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="MeasureAttributes"/>
      			<PropertyValue Property="Dimensions">
      				<Collection>
      					<PropertyPath>Carrid</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="DimensionAttributes"/>
      			<PropertyValue Property="Actions"/>
      		</Record>
      	</Annotation>
      	<Annotation Term="UI.Chart" Qualifier="Filter02">
      		<Record Type="UI.ChartDefinitionType">
      			<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      			<PropertyValue Property="Measures">
      				<Collection>
      					<PropertyPath>SeatsmaxB</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="MeasureAttributes"/>
      			<PropertyValue Property="Dimensions">
      				<Collection>
      					<PropertyPath>Carrid</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="DimensionAttributes"/>
      			<PropertyValue Property="Actions"/>
      		</Record>
      	</Annotation>
      	<Annotation Term="UI.SelectionFields">
      		<Collection>
      			<PropertyPath>Carrid</PropertyPath>
      		</Collection>
      	</Annotation>
      	<Annotation Term="UI.LineItem">
      		<Collection>
      			<Record Type="UI.DataField">
      				<PropertyValue Property="Value" Path="Carrid"/>
      			</Record>
      			<Record Type="UI.DataField">
      				<PropertyValue Property="Value" Path="Year"/>
      			</Record>
      			<Record Type="UI.DataField">
      				<PropertyValue Property="Value" Path="Seatsmax"/>
      			</Record>
      		</Collection>
      	</Annotation>
      	<Annotation Term="UI.Chart" Qualifier="ChartDefault">
      		<Record Type="UI.ChartDefinitionType">
      			<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      			<PropertyValue Property="Measures">
      				<Collection>
      					<PropertyPath>Seatsmax</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="MeasureAttributes">
      				<Collection>
      					<Record Type="UI.ChartMeasureAttributeType">
      						<PropertyValue Property="Measure" PropertyPath="Seatsmax"/>
      						<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      					</Record>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="Dimensions">
      				<Collection>
      					<PropertyPath>Carrid</PropertyPath>
      					<PropertyPath>Year</PropertyPath>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="DimensionAttributes">
      				<Collection>
      					<Record Type="UI.ChartDimensionAttributeType">
      						<PropertyValue Property="Dimension" PropertyPath="Carrid"/>
      						<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      					</Record>
      					<Record Type="UI.ChartDimensionAttributeType">
      						<PropertyValue Property="Dimension" PropertyPath="Year"/>
      						<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Series"/>
      					</Record>
      				</Collection>
      			</PropertyValue>
      			<PropertyValue Property="Actions"/>
      		</Record>
      	</Annotation>
      </Annotations>
      <Annotations Target="ZHR_WEBIDETEST8_SRV.WebIdeTest/Carrid">
      	<Annotation Term="Common.ValueList">
      		<Record Type="Common.ValueListType">
      			<PropertyValue Property="CollectionPath" String="WebIdeTestSet"/>
      			<PropertyValue Property="Parameters">
      				<Collection/>
      			</PropertyValue>
      			<PropertyValue Property="PresentationVariantQualifier" String="Filter"/>
      		</Record>
      	</Annotation>
      </Annotations>

       

       

      1. I want to have multiple charts on my visual filter.

      Is it impossible to set up multiple visualizations in a UI.PresentationVariant?

       

      2. Chart in Page Content is not displayed.
      And oData is still being called in batch, Can you identify the cause?

       

      Your advice helped me study a lot!

      Thank you !

       

      Jiyoung

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Jiyoung,

      Check the answers below:

      1. You can publish only one chart per filter attribute, like in my example, I published a visual filter for CalendarYear and I could publish another chart for the CustomerCountry or Airline, but no option to create a second chart for CalendarYear.
      2. Your table shows the data, your chart doesn't show nothing but the OData call still works fine? I'm pretty sure you have some error in your annotation file, I can see from the image in your first question that the chart was working fine before, probably you changed something during the last update and impacted the chart by mistake. Try to review all the steps of configuration for the content area.

      Cheers,

      Felipe

      Author's profile photo Former Member
      Former Member

      Hi  Jiyoung ,

       

      Were you able to make visual filters work?I am finding same issue where the visual filters are not working.

       

      Regards

      Radhika

      Author's profile photo Jiyoung Pyo
      Jiyoung Pyo

      Hi Radhika

       

      With the help of Felipe, the modified annotation source was written in the above comment.

      I wish It could be of help to you.

       

      However, My annotation source show only one graph in a visual filter.

      If you have a good solution, Can you share your annotation file? ?

       

      Thank you

      Jiyoung

      Author's profile photo Angshuman Chakraborty
      Angshuman Chakraborty

      Very nice blog Felipe. Thank you.

      Can you please explain how the translation(i18n) works for annotation label text for CDS view?

       

      Thanks

      Angshuman

      Author's profile photo Angshuman Chakraborty
      Angshuman Chakraborty

      Nevermind.

      I got the answer from the below post.

       

      https://blogs.sap.com/2016/09/07/the-semantically-rich-data-model-an-abap-based-cds-views-example-part-3/

      Thanks

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Angshuman Chakraborty,

      Good that you found the answer.

      There is also a feature in the CDS source code editor that allows to reuse a text already translated in the past, have a look in the link Adding Translated Text.

      Cheers,

      Felipe

      Author's profile photo Angshuman Chakraborty
      Angshuman Chakraborty

      Thank you Felipe.

      I have one more question. In my current development, I am using the CDS annotation and Facet to create the object page. Can you please guide me how to add "icon tab bar" to the object page using local annotation.

       

      Thanks

      Angshuman

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Angshuman,

      I never used this functionality with the Fiori Element before, the idea looks interesting but I need to do a research to understand if this options is currently available. I'll have a look over the next weeks and maybe post a new article related with this subject.

      Cheers,

      Felipe

      Author's profile photo Premnarayan Patidar
      Premnarayan Patidar

      Hi Felipe,

      Nice blog !

      Have few below queries, could you please help here.

      1. for my CDS views i have input parameter to load the output, parameters are in the date time format in CDS, but when it launches the on UI i don't see datepicker to select the date, i have to enter manually, how do i make it to datepicker control?
      2. below are my annotations, while loading app it doesn't load the visual chart and shows message "[50005] - valueAxis : does not meet the minimum or maximum number of feeds definition" but when i click on setting button from toolbar section and just click on OK without even changing anything in setting it loads the chart, why it does not load on app launch is my question?
      	<Annotation Term="UI.Chart" Qualifier="ChartDefault">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Bar"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>SalesDoc</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="SalesDoc"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>MSF</PropertyPath>
      								<PropertyPath>DocumentDate</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="MSF"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="DocumentDate"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Series"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Actions"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.LineItem">
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="DocumentDate"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="ProductionPlant"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="SalesDoc"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="MSF"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="SalesDollars"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.PresentationVariant" Qualifier="Default">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="SortOrder"/>
      						<PropertyValue Property="GroupBy"/>
      						<PropertyValue Property="TotalBy"/>
      						<PropertyValue Property="Total"/>
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#ChartDefault</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="RequestAtLeast"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionFields" Qualifier="Default">
      					<Collection>
      						<PropertyPath>DocumentDate</PropertyPath>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.ReferenceFacet">
      							<PropertyValue Property="Target" AnnotationPath="@UI.LineItem"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.SelectionVariant" Qualifier="Default">
      					<Record Type="UI.SelectionVariantType">
      						<PropertyValue Property="Parameters"/>
      						<PropertyValue Property="SelectOptions"/>
      						<PropertyValue Property="Text" String="Default"/>
      					</Record>
      				</Annotation>​

      Thanks, Prem

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi,

      Thank you for the feedback, regarding your questions check my comments below:

      1. When you expose an Analytical Query through an OData service the system converts all of your dimensions to CHAR, I don't know exactly the reason but this is the standard behaviour. If you open your $metadata you can check the types of your dimensions converted and because of this reason you can't see the date picker in your application. A simple work around is to connect your date field to I_CalendarDate view and try to expose other attributes as filters (e.g. month and year).
      2. I think you're receiving this error because the dimensions you defined in the annotation file are probably returning a huge quantity of data and the chart cannot be rendered properly (e.g. DocumentDate), try to work with dimensions that will aggregate the data in a feasible way, for date fields you can follow the same approach mentioned in the item 1 and expose the data by month and year instead of using the document date.

      Hope this information helps.

      Cheers,

      Felipe

      Author's profile photo Ozlem Seker
      Ozlem Seker

      Hi,

      I created analytical list page  for the Odata I created .The charts are working but there are problems  in list report.

      What do I need to do to relate to this problem?

       

      Thanks,

      Ozlem.

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Ozlem,

      Open the developer tools (chrome) and investigate the log to understand the root cause.

      I'm pretty sure this is an error related with your annotation file, but make sure by checking your log and troubleshooting the application. Try to review all the steps mentioned in this article and confirm that you configured the annotation file properly.

      Cheers,

      Felipe

      Author's profile photo Priya Kamath
      Priya Kamath

      Hi,

      Below is the Annotation file we have used and followed all the steps as mentioned in the blog. But we are having issues with the KPI tag. Can you help us resolve this.

      <?xml version="1.0" encoding="utf-8"?>
      <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
      	<edmx:Reference Uri="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/UI.xml">
      		<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="/sap/opu/odata/sap/ZC_SALE_DEMO_TEST_CDS/$metadata">
      		<edmx:Include Alias="ZC_SALE_DEMO_TEST_CDS" Namespace="ZC_SALE_DEMO_TEST_CDS"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/vocabularies/Org.OData.Aggregation.V1.xml">
      		<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Capabilities.V1.xml">
      		<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
      		<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470971/Communication.xml?api=v2">
      		<edmx:Include Alias="vCard" Namespace="com.sap.vocabularies.Communication.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Core.V1.xml">
      		<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Measures.V1.xml">
      		<edmx:Include Alias="CQP" Namespace="Org.OData.Measures.V1"/>
      	</edmx:Reference>
      	<edmx:DataServices>
      		<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="ALP.ALP_NEW.ZC_SALE_DEMO_TEST_CDS">
      			<!--===============================================================================
                      Entity Type from chosen collection 
                      ================================================================================-->
      			<Annotations Target="ZC_SALE_DEMO_TEST_CDS.ZC_SALE_DEMO_TESTType">
      				<Annotation Term="UI.Chart" Qualifier="CHARTSALESTARGET">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Line"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>slstrgt</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="slstrgt"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      									<PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint#SALESTARGET"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>regkey</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="userid"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Actions"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.DataPoint" Qualifier="SALESTARGET">
      					<Record Type="UI.DataPointType">
      						<PropertyValue Property="Title" String="{@i18n&gt;SALESBYREGION}"/>
      						<PropertyValue Property="Value" Decimal="100.00"/>
      						<PropertyValue Property="Visualization" EnumMember="UI.VisualizationType/Number"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionPresentationVariant">
      					<Record Type="UI.SelectionPresentationVariantType">
      						<PropertyValue Property="SelectionVariant">
      							<Record Type="UI.SelectionVariantType">
      								<PropertyValue Property="Parameters"/>
      								<PropertyValue Property="SelectOptions"/>
      								<PropertyValue Property="Text" String="{@i18n&gt;SALESBYREGION}"/>
      							</Record>
      						</PropertyValue>
      						<PropertyValue Property="PresentationVariant">
      							<Record Type="UI.PresentationVariantType">
      								<PropertyValue Property="SortOrder"/>
      								<PropertyValue Property="GroupBy"/>
      								<PropertyValue Property="TotalBy"/>
      								<PropertyValue Property="Total"/>
      								<PropertyValue Property="Visualizations">
      									<Collection>
      										<AnnotationPath>@UI.DataPoint#SALESTARGET</AnnotationPath>
      										<AnnotationPath>@UI.Chart#CHARTSALESTARGET</AnnotationPath>
      									</Collection>
      								</PropertyValue>
      								<PropertyValue Property="RequestAtLeast"/>
      								<PropertyValue Property="Text" String="{@i18n&gt;SALESBYREGION}"/>
      							</Record>
      						</PropertyValue>
      						<PropertyValue Property="Text" String="{@i18n&gt;SALESBYREGION}"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;GENERAL_INFORMATION}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;FIRST_FACET}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      						<Record Type="UI.ReferenceFacet">
      							<PropertyValue Property="Label" String="{@i18n&gt;SECOND_FACET}"/>
      							<PropertyValue Property="Target" AnnotationPath="to_expense/@UI.LineItem"/>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<!--===============================================================================
                      Entity Type from chosen navigation property
                      ================================================================================-->
      			<Annotations Target="ZC_SALE_DEMO_TEST_CDS.ZC_EXPENSE_ALPType">
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      		</Schema>
      	</edmx:DataServices>
      </edmx:Edmx>

      Changes are done in manifest.json is shown below.

      		"keyPerformanceIndicators": {
      							"SALESBYREGION": {
      								"model": "KPI",
      								"entitySet": "ZC_SALE_DEMO_TEST",
      								"qualifier": "SALESBYREGION"
      							}
      						}

       

       

       

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Priya,

      I noticed that you published the KPI tag with the qualifier SALESBYREGION in your manifest.json but none of your annotations are associated with this qualifier.

      Please, review your configuration and the steps mentioned in this article to understand how to assign qualifiers for each one of the dependent annotations.

      Cheers,

      Felipe

      Author's profile photo Tanveer Shaikh
      Tanveer Shaikh

      Hi Felipe,

      Thank you for the excellent blog.

      Is there a way we can hide the chart area in ALP ? I know I can use list report template to not have that chart area but I want to use new and good stuff of ALP but don’t want the chart area.

      Possible ?

      Thanks,

      Tanveer

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Tanveer,

      I'm not sure if you can hide the chart but I know you can define the table as the default object in the content area, there is a parameter in the manifest.json for this purpose:

      "defaultContentView": "table"

      You can find more information about this configuration through this link.

      Also, I created a new article explaining how you can search the possibilities and limitations around the Fiori Elements, if you have any similar questions in the future this article can help you.

      Cheers,

      Felipe Rodrigues

      Author's profile photo Juan Carlos Cuya
      Juan Carlos Cuya

      Dear Felipe,

      I tried to replicate the ALP, but I have a problem when trying to visualize the object page of the item in the table, the message "The requested data does not exist" appears. This message only appears when a filter is applied on the data of the table, I observe that the difference is that, when the filter is applied, the internal ID of the item of the table is modified:

      ID item table without filter:

      4.2.2.X.1.1.1.0_2017AEDL

      ID item table with filter:

      4.2.2.X.1.1.1.0_2017AEDL_0F9TUVA1XK69H4RUGC5LKUM72I1HPW28

      
      You can guide me how to solve this error?, thanks

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Juan,

      Sorry but is pretty difficult to define a root cause with this set of information only.

      I advise you to debug your application, have a look in the Network activity and check the OData calls, make sure your data model and OData service are working fine before you troubleshoot the application itself.

      Thanks,

      Felipe

      Author's profile photo Ivan Shadrin
      Ivan Shadrin

      Hallo Felipe,

      thank you for this really good and comprehensive intro to the ALP.

      The Donut in visual filter bar seems a little bit overcooked.

      Whereas I expect to become something like this:

      I have the same problem. I've played with different variatns of @UI.chart annotation, but without success. I've also tried to use another chart types. It seems to me, that the lines and bars are not painted at all.

      Have you managed to display it in normal colours?

      Thanks, Ivan

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Ivan,

      It's funny but I was expecting someone to comment about this issue since I released the article. 😀

      To be honest, I don't know why the colors don't appear in the visual filter and since I didn't have extra time to investigate this subject I still don't know how to fix it. It might be a bug of the template, but I'm still not sure.

      If I manage to find a solution I'll let you know.

      Cheers,

      Felipe

      Author's profile photo Ivan Shadrin
      Ivan Shadrin

      Hallo Felipe,

      I've tried a lot, but I couldn't solve this problem. Fortunately I have got some other ideas and even a kind of workaround.

      First of all, I have noticed, that other chart types don't work either.

      Then I have found a very strange error in the browser console:

      2018-07-16 17:01:49.100000 Control 'sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt' did not return a class definition from sap.ui.define. - XMLTemplateProcessor

      I did a conclusion, that the problem lies not on my side (CDS-Annotations), but on the side of the Launchpad emulation environment, where my application is being launched in test mode.

      Then I've tried various UI5 (to be precise all available) versions in manifest.json, but it didn't help.

      Then I have deployed my app to the UI5-System. During the deployment I've got a warning message, that UI5 version in my System is older than UI5-version in my manifest.json. But in my system it worked fine.

      Thanks a lot for your answer. I can imagine, how many questions do you become every week and I find it really great that you also find the time for answers for at least some of them 🙂

      Cheers, Ivan

       

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Felipe, hi Ivan,

      I faced the same problem when I initially run my app out of WebIDE using the flpSandbox.html option. The chart in the visual filter looked exactly like yours, Ivan.

      After a while a changed the run configurations to ensure that I run the app as SAP FIORI Launchpad Sandbox Application via Component.js from WebIDE - now the charts in the visual filters look like they should.

      Btw: Deploying the app also helped - executing it within the "real" launchpad on my backend never caused a problem like this.

      Best regards,

      Sebastian

      Author's profile photo Vivek Ramasamy
      Vivek Ramasamy

      Hi,

      We tried to display hierarchy using Hierarchy CDS views and it is fine in "Analysis Office" but the expansion of nodes are not working if the same is consumed in Fiori Elements List report.

      The issue is detailed in (https://answers.sap.com/questions/581579/node-expand-not-working-in-hierarchy-cds-view-cons.html). Please can you let us know your comments.

      Regards,

      Vivek

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Vivek,

      Usually my first advise is to check if your hierarchy is working fine through RSRT or any other UI interface, since you already tested through Analysis for Office we shouldn't focus in the back-end.

      I never used the Tree Table via List Report but I already implemented via smart controls in a mixed application. I would advise you to create a blank UI5 application, implement the Tree Table via Smart Table and check if the output works fine.

      If it works in the second scenario it might be a bug from the List Report or some extra configuration missing, at least this way you would be able to identify the differences between both apps.

      Hope this information helps.

      Cheers,

      Felipe

      Author's profile photo gabriel ash
      gabriel ash

      @Felipe de Mello Rodrigues Hello Sir!,

       

      It was indeed a pleasure to read and gain knowledge from this valuable and expensive knowledge shared. Please kindly bear with me on my ignorance in these areas. I noticed that we cannot use annotations multiple times for an instance selection variant and uichart. but i see in most cases of your description you would refer to the term “translate this diagram and publish the relevant annotations in the header of our CDS view”. How can we accommodate all annotations in one cds views?

      Enlight me sir!

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hello Gabriel,

      Thank you for the kind words.

      We can definitely publish multiple annotations in a single CDS view and I’m actually doing that in the current article, notice that sometimes I publish annotations inside of an array using the following convention [ … ], compare the examples below:

      Single annotation

      @UI.presentationVariant: {
          qualifier: 'FilterBookingsByYear',
          text: 'Filter: Bookings by Year',
          visualizations: [{
              type: #AS_CHART,
              qualifier: 'ChartBookingsByYear'
          }]
      }

      Multiple annotations

      @UI.presentationVariant: [{
          qualifier: 'KPIWeightByCountry',
          text: 'KPI: Weight of Luggage per Country',
          visualizations: [{
              type: #AS_CHART,
              qualifier: 'ChartWeightByCountry'
          },{
              type: #AS_DATAPOINT,
              qualifier: 'WeightOfLuggage'
          }]
      },{
          qualifier: 'FilterBookingsByYear',
          text: 'Filter: Bookings by Year',
          visualizations: [{
              type: #AS_CHART,
              qualifier: 'ChartBookingsByYear'
          },{
              type: #AS_DATAPOINT,
              qualifier: 'TotalOfBookings'
          }]
      },{
          qualifier: 'Default',
          visualizations: [{
              type: #AS_CHART,
              qualifier: 'ChartDefault'
          }]
      }]

      The system differentiate all of them based on the QUALIFIER field, this is basically the ID of the annotation and it’s really important to fill this field if you want to organize multiple annotations inside the same CDS view.

      PS: The same works when you are publishing local annotations in your UI5 application.

      Cheers,

      Felipe

      Author's profile photo gabriel ash
      gabriel ash

      Woow ! cool ! thanks a lot

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Felipe,

      thanks a lot for sharing this whole scenario including a like to your other blog how to create the analytical model in CDS. Very useful information for someone, who wants to build his first ALP app.

      I am just wondering about one part in your coding, which I don't exactly understand, could you maybe check this:

      I am wondering, why there (in the CDS view with all aggregated annotations) is a qualifier TableofBookings defined with type #AS_DATAPOINT within the visualizations of @UI.presentationVariant.qualifier FilterBookingsByYear. Is this needed? It also seems like this does not appear in the created annotation XML file, which you posted.

      Best regards and keep on posting such useful stuff,

      Sebastian

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Sebastian,

      Thanks for the question.

      Originally, I was planning to place two KPI cards in the article but the content was growing so fast that I decided to remove the Total of Bookings and place only the Weight of Luggage.

      This #AS_DATAPOINT for Total of Bookings is actually a leftover and I didn't notice so far.

      Thanks for the heads up, I'm going to update the article and remove this statement.

      Regarding ALP development and data points, they're only relevant for KPI cards, all the information is available in the SAP Help Portal, like the diagram below:

      Cheers,

      Felipe

      Author's profile photo Neil Ward
      Neil Ward

      Awesome!

      We managed to create an ALP last year when all the required annotations were not yet available in ABAP CDS, it was quite complicated. great to see you can do all of this with in CDS now.

       

      thanks for blogging.

      Author's profile photo Shashank Pincha
      Shashank Pincha

      Hi,

      Thanks for the guide, it’s worked out really well!

      I have got two questions regarding the Visual Filters. I have created 5 through Annotations.

      1) I am unable to get all of them to appear by default, the first one I added shows up when I load the app, the rest 4, I have to bring onto the page through the Visual Filter settings drop-down.

      2) I am unable to rearrange the Visual Filters in an order I’d like, they don’t seem to be following any specific order such as Alphabetical on dimension names or anything else.

      If anyone could point me in the right direction regarding these two questions that’ll be great, there are probably some tags in the annotations setup that I am missing.

      Regards

      Shashank

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Shashank,

      Probably both of the issues are related with the fact that you're not setting a proper value for the following annotation:

      @UI.selectionField.position: XX

      This annotation is responsible for the order/position of the fields in the filter bar, if you use the same number for all the filters there is no way to define the output order. Try to review your development and make sure you define different positions for all the fields.

      PS: The priority is based on the ascending order (e.g. 10, 20, 30, etc).

      Cheers,

      Felipe

      Author's profile photo Shashank Pincha
      Shashank Pincha

      Hi Felipe,

      Yup, I wasn't setting that annotation, thanks for the help!

      Regards Shashank

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Felipe,

      once again me - I just stumbled over another question, which is not directly related to your example but more a general question from a conceptional point of view for using the Analytical List Page.

      You are generating the OData Service per Auto-Exposure (OData.publish:true) - so do I for examples or prototypes. I am pretty new to this analytical stuff, but in our transactional world we have (productivly) the best practice to rather use "Reference Data Source"(RDS) to define the OData Service via transaction SEGW. The reason is simply to be able to adjust the selected data within the extension of the data provider class in order to achieve things, which are hard or not possible via CDS.

      As you used Auto Exposure in your scenario and I just realized that transaction SEGW doesn't allow me to use RDS for analytical query views - do you know what should be the best practice to create the OData Service to be consumed via ALP? I only can find Auto Exposure in each example, but I am wondering: Is this in the OLAP world maybe really sufficient and there is no need for a SEGW project like in transactional cases?

      Best regards,

      Sebastian

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Sebastian Freilinger-Huber,

      As you discovered already, the reason I use the auto-exposure via ABAP CDS is because there is a restriction in SEGW when we try to expose Analytical Queries:

      We cannot work with Analytical Queries via SEGW because the ABAP logic provided by extensions in the data provider class would impact the aggregation behaviour in the Analytical Engine.

      For transactional scenarios you would need to create a different set of entities aggregating the data based on the dimensions relevant for each one of the components (e.g. per Year, per Airline, etc).

      Another option is to mix the usage of different OData services in your UI5 application. For example, you could publish an OData created from an Analytical Query and exposed via ABAP CDS to populate the data for the chart / table, and a second OData created via SEGW to provide the data for the KPI card.

      In my example I always configure the manifest.json pointing to the entity set Z_QUERY_FLIGHT_ALP, you can change this definition and include an extra OData service and model to use different entities in your components.

      I started to use this technique in the development of Overview Pages when I needed to provide data for analytical cards and for list cards at the same time. You can find the same development approach available in SAP standard developments like the Procurement Overview Page.

      Hope this information helps.

      Cheers,

      Felipe

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Felipe,

      thanks a lot for your quick answer. For my analytical scenario I will then go with Auto-Exposure.

      As we are also planning to bring an Overview Page into the productive world, the additional information are very useful in addition.

      Thanks and hear you soon,

      Sebastian

      Author's profile photo Kerstin Hausmann
      Kerstin Hausmann

      Hi Felipe,

      thanks for this great post. It really helped us to get started with ALP!

      You mentioned above that it is possible to include an extra oData service/model. We had our mainService created via auto-exposure but we want to add another service for value helps.

      You don't happen to have another tutorial where you show your technique for analytical cards?

      Cheers,

      Kerstin

       

      Author's profile photo Shashank Pincha
      Shashank Pincha

      Hi Felipe,

       

      I was interested in understanding how show percentages in various places such as the table, chart, and header visual filters, as seen in the screenshot.

       

       

      Also, I was wondering how to add a drill down aspect in the Visual Filter, i.e making a selection in the first visual filter (or any for that matter) would affect the selection options for the other visual filters. Essentially connecting them. 

       

      Any guidance would be appreciated.

      Regards

      Shashank

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Shashank,

      as Felipe didn't reply yet, I will take the chance - I hope you don't bother 🙂

      Considering the first question:

      I am not sure, if there is a maybe a cool way via annotations (at least I didn't find anything), but I would calculate the percentage values within the CDS Query View from the depending field(s) and expose the percentage as a new measure. Then you should be able to simply use this in the front-end like each other common measure.

      Considering the second question:

      When you define a visual filter via the common value list annotation, you can also define in/out parameters. So basically if you define the property of the first visual filter as an "In" parameter of the second visual filter, you create the dependency, you are looking for and the values of the second visual filter should be adjusted by picking a value of the first visual filter.

      I hope this helped you, best regards

      Sebastian

       

      Author's profile photo Shashank Pincha
      Shashank Pincha

      Hi Sebastian,

       

      No issues at all, thank you for replying.

       

      Yes, I also came to the conclusion that data calculation/formatting isn't done at the UI5 annotation level, rather I believe I would have to use the #Formula aggregation at the Cube level to achieve the percentages, which I am working on now.

       

      Thank you for pointing me towards the ParameterIn annotation, that's exactly what I was looking for. Just had a doubt or two regarding the same, as I am unable to find documentation for it online.

      1. On a cube or dimension level do any associations need to be made to enable the filtering or to enable the visual filter itself to understand the connection between various data points (for example the link between the dimensions 'Airline' & 'Connection' in this blog) like the first visual filter and the second.
      2. What would be the values for the 'LocalDataProperty' & 'ValueListProperty' properties in the parameter annotation for the common value list annotation, as I am unable to get it to work for me.

       

      Thank you!

      Regards

      Shashank

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Shashank,

      considering documentation - this is the major page which is available from my point of view:

      https://sapui5.hana.ondemand.com/#/topic/16d43eb0472c4d5a9439ca1bf92c915d

      Good news is, that there is a documenation, which also tries to explain the stuff about the filters - bad news (at least from my point of view) is that it covers only the basic stuff and if you have some sort of special case it is hard to find anything.

      For me, a good documentation is basically all about good examples. In this case the example is really messed up from my point of view. On my opinion the non-main entity sets should be modelled differently, e.g. Z0021 should give all region attributes instead of the codes of all three BOs. I addressed it several times (last time at TechEd this week) and they agreed to change it - lets see, if this happens 🙂

      In your code i think ‘LocalDataProperty’ & ‘ValueListProperty’ in your second visual filter should both have the field name of your first visual filter and defined as "In" parameter.

      Enabling a field as visual filter is not necessary on a cube or dimension level - it has to be simply a dimension coming from the analyitcal model to the front end.

      Unfortunately currently I don't have access to my code. If it still doesn't work out for you with the information I provided please drop a comment here and I will paste an example how I managed to get it working.

      Best regards,

      Sebastian

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Sebastian Freilinger-Huber,

      Thanks for your contribution. I included some extra ideas to solve this scenario.

      Cheers,

      Felipe

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Shashank Pincha,

      I still didn't work with this functionality but I would suggest two steps to achieve that:

      1. Create a new key figure in your Analytical Query for the percentage value: Using an analytical formula you can calculate the percentage in a new field inside your query. Have a look in one of my new articles called Create a geo-analytical application powered by SAP Lumira, ESRI Maps and ABAP CDS views, in this article I make use of the @AnalyticsDetails.query.formula annotation to create a restricted key figure but you can use different kinds of calculations (including percentage values).
      2. Declare an @UI.Chart with different Axis: Since the percentage is related with the main measure I would try first to declare the percentage field as a 2nd axis of the chart using the @UI.Chart annotation, check the example below:
          measureAttributes: [{
              measure: 'ValueField',
              role: #AXIS_1
          },{
              measure: 'PercentageField',
              role: #AXIS_2
          }]

      Hope this information helps.

      Cheers,

      Felipe

      Author's profile photo Shashank Pincha
      Shashank Pincha

      Hi Felipe de Mello Rodrigues,

      I have finally gotten back to the requirement that needed the ALP App.

      I have successfully gotten the ‘Drill Down’ feature to work using in/out parameters in the ValueList property, thank you and Sebastian Freilinger-Huber for guidance with that.

      I will work on getting the percentages next, will keep you posted with the same ?

      Thanks again for this amazing post, really helps with ALP App development!

      Author's profile photo Lionel CAPOEN
      Lionel CAPOEN

      Hi Felipe,

      Thanks for this nice blog!

       

      I've got two questions :

      - Is it possible to navigate from a List Report or a Worlkist to an Analytical List Page?

      - And achieving this without CDS view is also possible right (you just need to configure it in sapui5 side)?

      Regards

      Lionel

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Lionel,

      Yes, definitely possible!

      After publishing your application in the Fiori Launchpad you can configure a navigation based on the semantic object and action. Some annotations allow you to configure the navigation directly from the CDS view but you always have the option to configure via local annotations in your UI5 app.

      Cheers,

      Felipe

      Author's profile photo Supriya Sahu
      Supriya Sahu

      Hi Felipe,

      Thank you for such an amazing blog.

      However, I am facing some issues when i replicate the same. Here’s my problem:

      I could see proper data in the Analytic Manager(RSRT) whereas, when I run the application it comes up with weird binding. Please find attached Annotation.xml file and screenshots from RSRT and ALP.

      *************Annotation.xml*************

      <Annotations Target=”Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType”>
      <Annotation Term=”UI.Facets”>
      <Collection>
      <Record Type=”UI.CollectionFacet”>
      <PropertyValue Property=”ID” String=”MainSection”/>
      <PropertyValue Property=”Label” String=”Details”/>
      <PropertyValue Property=”Facets”>
      <Collection>
      <Record Type=”UI.ReferenceFacet”>
      <PropertyValue Property=”Target” AnnotationPath=”@UI.LineItem”/>
      </Record>
      </Collection>
      </PropertyValue>
      </Record>
      </Collection>
      </Annotation>
      <Annotation Term=”UI.Chart” Qualifier=”ChartDefault”>
      <Record Type=”UI.ChartDefinitionType”>
      <PropertyValue Property=”ChartType” EnumMember=”UI.ChartType/Column”/>
      <PropertyValue Property=”Dimensions”>
      <Collection>
      <PropertyPath>Airline</PropertyPath>
      <PropertyPath>FlightDate</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”DimensionAttributes”>
      <Collection>
      <Record Type=”UI.ChartDimensionAttributeType”>
      <PropertyValue Property=”Dimension” PropertyPath=”Airline”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartDimensionRoleType/Category”/>
      </Record>
      <Record Type=”UI.ChartDimensionAttributeType”>
      <PropertyValue Property=”Dimension” PropertyPath=”FlightDate”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartDimensionRoleType/Series”/>
      </Record>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”Measures”>
      <Collection>
      <PropertyPath>TotalOfBookings</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”MeasureAttributes”>
      <Collection>
      <Record Type=”UI.ChartMeasureAttributeType”>
      <PropertyValue Property=”Measure” PropertyPath=”TotalOfBookings”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartMeasureRoleType/Axis1″/>
      </Record>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.Chart” Qualifier=”ChartBookingsByYear”>
      <Record Type=”UI.ChartDefinitionType”>
      <PropertyValue Property=”ChartType” EnumMember=”UI.ChartType/Donut”/>
      <PropertyValue Property=”Dimensions”>
      <Collection>
      <PropertyPath>FlightDate</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”DimensionAttributes”>
      <Collection>
      <Record Type=”UI.ChartDimensionAttributeType”>
      <PropertyValue Property=”Dimension” PropertyPath=”FlightDate”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartDimensionRoleType/Category”/>
      </Record>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”Measures”>
      <Collection>
      <PropertyPath>TotalOfBookings</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”MeasureAttributes”>
      <Collection>
      <Record Type=”UI.ChartMeasureAttributeType”>
      <PropertyValue Property=”Measure” PropertyPath=”TotalOfBookings”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartMeasureRoleType/Axis1″/>
      </Record>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.Chart” Qualifier=”ChartWeightByCountry”>
      <Record Type=”UI.ChartDefinitionType”>
      <PropertyValue Property=”ChartType” EnumMember=”UI.ChartType/Column”/>
      <PropertyValue Property=”Dimensions”>
      <Collection>
      <PropertyPath>CustomerCountry</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”DimensionAttributes”>
      <Collection>
      <Record Type=”UI.ChartDimensionAttributeType”>
      <PropertyValue Property=”Dimension” PropertyPath=”CustomerCountry”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartDimensionRoleType/Category”/>
      </Record>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”Measures”>
      <Collection>
      <PropertyPath>WeightOfLuggage</PropertyPath>
      </Collection>
      </PropertyValue>
      <PropertyValue Property=”MeasureAttributes”>
      <Collection>
      <Record Type=”UI.ChartMeasureAttributeType”>
      <PropertyValue Property=”Measure” PropertyPath=”WeightOfLuggage”/>
      <PropertyValue Property=”Role” EnumMember=”UI.ChartMeasureRoleType/Axis1″/>
      </Record>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.DataPoint” Qualifier=”WeightOfLuggage”>
      <Record>
      <PropertyValue Property=”Value” Path=”WeightOfLuggage”/>
      <PropertyValue Property=”Title” String=”Weight of Luggage”/>
      </Record>
      </Annotation>
      <Annotation Term=”UI.LineItem”>
      <Collection>
      <Record Type=”UI.DataField”>
      <PropertyValue Property=”Value” Path=”Airline”/>
      </Record>
      <Record Type=”UI.DataField”>
      <PropertyValue Property=”Value” Path=”TotalOfBookings”/>
      </Record>
      <Record Type=”UI.DataField”>
      <PropertyValue Property=”Value” Path=”WeightOfLuggage”/>
      </Record>
      </Collection>
      </Annotation>
      <Annotation Term=”UI.PresentationVariant” Qualifier=”Default”>
      <Record>
      <PropertyValue Property=”Text” String=””/>
      <PropertyValue Property=”Visualizations”>
      <Collection>
      <AnnotationPath>@UI.Chart#ChartDefault</AnnotationPath>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.PresentationVariant” Qualifier=”FilterBookingsByYear”>
      <Record>
      <PropertyValue Property=”Text” String=”Filter: Bookings by Year”/>
      <PropertyValue Property=”Visualizations”>
      <Collection>
      <AnnotationPath>@UI.Chart#ChartBookingsByYear</AnnotationPath>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.PresentationVariant” Qualifier=”KPIWeightByCountry”>
      <Record>
      <PropertyValue Property=”Text” String=”KPI: Weight of Luggage per Country”/>
      <PropertyValue Property=”Visualizations”>
      <Collection>
      <AnnotationPath>@UI.DataPoint#WeightOfLuggage</AnnotationPath>
      <AnnotationPath>@UI.Chart#ChartWeightByCountry</AnnotationPath>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”UI.SelectionFields”>
      <Collection>
      <PropertyPath>FlightDate</PropertyPath>
      </Collection>
      </Annotation>
      <Annotation Term=”UI.SelectionPresentationVariant” Qualifier=”Default”>
      <Record>
      <PropertyValue Property=”Text” String=””/>
      <PropertyValue Property=”SelectionVariant” Path=”@UI.SelectionVariant#Default”/>
      <PropertyValue Property=”PresentationVariant” Path=”@UI.PresentationVariant#Default”/>
      </Record>
      </Annotation>
      <Annotation Term=”UI.SelectionPresentationVariant” Qualifier=”KPIWeightByCountry”>
      <Record>
      <PropertyValue Property=”Text” String=””/>
      <PropertyValue Property=”SelectionVariant” Path=”@UI.SelectionVariant#KPIWeightByCountry”/>
      <PropertyValue Property=”PresentationVariant” Path=”@UI.PresentationVariant#KPIWeightByCountry”/>
      </Record>
      </Annotation>
      <Annotation Term=”UI.SelectionVariant” Qualifier=”Default”>
      <Record>
      <PropertyValue Property=”Text” String=”Default”/>
      </Record>
      </Annotation>
      <Annotation Term=”UI.SelectionVariant” Qualifier=”KPIWeightByCountry”>
      <Record>
      <PropertyValue Property=”Text” String=”KPI Weight By Country”/>
      </Record>
      </Annotation>
      <Annotation Term=”Communication.Contact”>
      <Record>
      <PropertyValue Property=”adr”>
      <Collection>
      <Record>
      <PropertyValue Property=”type” EnumMember=”Communication.ContactInformationType/pref”/>
      <PropertyValue Property=”country” Path=”CustomerCountry”/>
      </Record>
      </Collection>
      </PropertyValue>
      </Record>
      </Annotation>
      <Annotation Term=”Communication.Address”>
      <Record>
      <PropertyValue Property=”type” EnumMember=”Communication.ContactInformationType/pref”/>
      <PropertyValue Property=”country” Path=”CustomerCountry”/>
      </Record>
      </Annotation>
      </Annotations>
      <Annotations Target=”Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType/FlightDate”>
      <Annotation Term=”Common.ValueList”>
      <Record Type=”Common.ValueListType”>
      <PropertyValue Property=”CollectionPath” String=”Z_QUERY_FLIGHT_ALP”/>
      <PropertyValue Property=”Parameters”/>
      <PropertyValue Property=”PresentationVariantQualifier” String=”FilterBookingsByYear”/>
      </Record>
      </Annotation>
      </Annotations>

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Supriya,

      Pretty strange behaviour, I believe the error might be related with the ABAP CDS view.

      Could you please confirm if when you expose the dimensions via RSRT the aggregation continues to work fine?

      Test the same dimensions selected in the UI5 app:

      • Flight Date
      • Customer Country

      Let me know the result of this test.

      Cheers,

      Felipe

      Author's profile photo Tyler Keenan
      Tyler Keenan

      Hi Felipe,

      I’m having a bit of a problem surrounding the value help.

      Regarding an Analytical List Page in the making, so far I’ve not successfully added value help for each compact filter, even though I’ve apparently placed the needed associations and annotations.

       

      The value help dialog does indeed show up. However, it doesn’t get populated, showing up the following error:

       

      Besides that, I cannot even reference it via SEGW, for the same reasons you mentioned in one of this post’s comments (which wouldn’t be ideal, either way), since Analytics are envolved in Analytical List Pages.

      I’ve also come across with these two tutorials (value help through modelled view and through foreign key relationship), with no further success:

      https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/8a/8415c033d441b2b079a53aff129463/frameset.htm
      https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/1b/9a9e9d759e4302890c44cf5e10b5b1/content.htm?no_cache=true

      Apparently, unlike the entities themselves, the issue is that the entity sets doesn’t seem to be working (throws an /IWBEP/CX_MGW_BUSI_EXCEPTION).

      Example of an entity:

      Example of an entity set:

      Nevertheless, it works in a List Report I quickly developed for the matter of testing.

      Let me know if you have any solution to this kind of problem.

      Looking forward to any kind of feedback,
      Tyler

      ** Here are the CDS Views: **
      Cube:

      @AbapCatalog.sqlViewName: 'ZCDS_PROD_CUBE'
      @AbapCatalog.compiler.compareFilter: true
      @AccessControl.authorizationCheck: #NOT_REQUIRED
      @Analytics.dataCategory: #CUBE
      @Analytics.dataExtraction.enabled: true
      @VDM.viewType: #COMPOSITE
      
      
      define view ZCDS_PROD_CUBE_V
          as select from zip_producao as cube
          association [1..1] to I_CalendarDate as _date on $projection.hsdat = _date.CalendarDate
          association [1..1] to I_Material as _mat on $projection.matnr = _mat.Material
          association [1..1] to I_CompanyCode as _bukrs on $projection.bukrs = _bukrs.CompanyCode
          association [1..1] to I_Plant as _werks on $projection.werks = _werks.Plant    
          association [1..1] to I_StorageLocation as _lgort on $projection.lgort = _lgort.StorageLocation      
          association [1..1] to ZCDS_PROD_DIM_FASE as _fase on $projection.fase = _fase.fase
          {               
              (...)
      
      
              @EndUserText.label: 'Material'  
              @Consumption.valueHelp: '_mat'
              @ObjectModel.foreignKey.association: '_mat'
              @Consumption.filter: { selectionType: #SINGLE, multipleSelections: false, mandatory: false }          
              matnr,
      
      
              (...)
          }

      Consumption View:

      @AbapCatalog.sqlViewName: 'ZCDS_PROD_ALP'
      @AbapCatalog.compiler.compareFilter: true
      @AccessControl.authorizationCheck: #NOT_REQUIRED
      @VDM.viewType: #CONSUMPTION 
      @Analytics.query: true
      @OData.publish: true
      @Analytics.dataExtraction.enabled: true
      
      (.. UI Annotations ..)
      
      
      define view ZCDS_PROD_ALP_DDL
          as select from ZCDS_PROD_CUBE_V 
          {        
                  (...)
      
                  @AnalyticsDetails.query.sortDirection: #ASC             
                  @AnalyticsDetails.query.axis: #ROWS              
                  @Consumption.valueHelp: '_mat'
                  @ObjectModel.foreignKey.association: '_mat'            
                  @Consumption.filter: { selectionType: #SINGLE, multipleSelections: false, mandatory: false }
                  @AnalyticsDetails.query.display: #KEY_TEXT                                    
                  @UI.selectionField.position: 60
                  @UI.lineItem.position: 60        
                  key matnr,    
        
                  (...)
           }
       

       

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Tyler,

      The value helps are generated based on the associations of your CDS views.

      You defined the association on the header and the foreign key via annotation for the field MATNR but you forgot to declare your association in the bottom of the CDS view.

      Your cube should look like the example below:

      @AbapCatalog.sqlViewName: 'ZCDS_PROD_CUBE'
      @AbapCatalog.compiler.compareFilter: true
      @AccessControl.authorizationCheck: #NOT_REQUIRED
      @Analytics.dataCategory: #CUBE
      @Analytics.dataExtraction.enabled: true
      @VDM.viewType: #COMPOSITE
      
      
      define view ZCDS_PROD_CUBE_V
          as select from zip_producao as cube
          association [1..1] to I_CalendarDate as _date on $projection.hsdat = _date.CalendarDate
          association [1..1] to I_Material as _mat on $projection.matnr = _mat.Material
          association [1..1] to I_CompanyCode as _bukrs on $projection.bukrs = _bukrs.CompanyCode
          association [1..1] to I_Plant as _werks on $projection.werks = _werks.Plant    
          association [1..1] to I_StorageLocation as _lgort on $projection.lgort = _lgort.StorageLocation      
          association [1..1] to ZCDS_PROD_DIM_FASE as _fase on $projection.fase = _fase.fase
          {               
              (...)
      
      
              @EndUserText.label: 'Material'  
              @Consumption.valueHelp: '_mat'
              @ObjectModel.foreignKey.association: '_mat'
              @Consumption.filter: { selectionType: #SINGLE, multipleSelections: false, mandatory: false }          
              matnr,
      
      
              (...)
      
              _date,
              _mat,
              _bukrs,
              _werks,
              _lgort,
              _fase
          }

      Notice that I included all the associations available in the bottom of the view but you just need to expose the ones relevant for the value helps.

      Cheers,

      Felipe

      Author's profile photo Jae-Hyeon Lee
      Jae-Hyeon Lee

      HI, Felipe

       

      I love your postings lol. ?

      Your postings are exactly what I'm looking for - based on traditional flight demo tables with high quality annotations to build Fiori Elements.

      I think it is almost impossible to build Fiori Elements from bottom to top using annotation with reference to the official document. It was a very painful task for me. ?

      But I found your post and most of the difficulties I had were resolved.

      I think from now I can build OVP and ALP on my own with you postings!

      Only one correction in the Valuelist annotation part, 's' is missing in the ID of PresentationVariantQualifier.

      should be,

      • PresentationVariantQualifier: FilterBookingsByYear

      Because of this, the visual filter did not work properly.

       

      I have two questions.

      1. Is it possible to adapt BOPF architecture for CUD in Analytical CDS Modeling?
      2. You seem to have a lot of knowledge about ABAP CDS and its annotations. Additionally, are you familiar with the HANA CDS and its annotations for SCP Cloud Foundry OData Service development?

       

      Best Regards,

      JaeHyeon.

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Jae-Hyeon Lee,

      Thank you for the feedback, I am glad to hear the content helped you during your development journey. 🙂

      Thank you also for the correction, I will update the post as soon as possible.

      Regarding your questions:

      1. You can still use ABAP CDS views to generate BOPF objects but you cannot use analytical views for this purpose since BOPF is used to administrate transactional data.
      2. Unfortunately, I am not familiar with HANA CDS but I believe it follows similar patterns of ABAP CDS development.

      Cheers,

      Felipe

      Author's profile photo Eliu Gonzalez
      Eliu Gonzalez

      Hi  Felipe de Mello Rodrigues,

      Great Blog, I was able to understand how to build ALP but I have two questions:

      1. how can I have value help in the compact filter fields because the query analytic CDS does not support associations and these one are suppressed and in the ALP when I open I just have the ranges options but not the values, is there any workaround for this?
      2. may you explain what's a data point stands for? why is so important for the KPI?

      best regards

      Author's profile photo Felipe de Mello Rodrigues
      Felipe de Mello Rodrigues
      Blog Post Author

      Hi Eliu Gonzalez,

      Hope you're well.

      Find my answers/comments below:

      1. The associations must be included in the Cube and they will flow to the Query by inheritance. When you construct a new query all the attributes, texts and hierarchies defined in the cube become available in the Transient Provider, by default this configuration is reflected automatically in your application as value helps. If you want to follow a different approach you can expose a second OData service without the support of the analytical queries and use the technique you mentioned before, using associations in the consumption view and linking the value helps based on the associated view, in this case you just need to configure your manifest.json to receive both OData services and configure the visual filter based on the second OData service.
      2. Data Point is used to define the main measure/metric of your KPI. KPIs can expose data across different dimensions but usually it focus only on a specific metric, the data point is used to provide this reference to the KPI.

      Hope this information helps.

      Cheers,

      Felipe

      Author's profile photo Eliu Gonzalez
      Eliu Gonzalez

      Hi Felipe de Mello Rodrigues,

      thanks for your early response, regarding the first point the query CDS I built it's not inheriting, and in eclipse shows the following message "Associations it's ignored (not relevant for BW query)"

      then I tried the work around  you mentioned change the entity and model of the filter bar in the onInit function of the extension controller like this:

      	onInit: function () {
      		var component = this.getOwnerComponent();
      		var oHelpModel = component.getModel("HelpModel");
      		var SmartFilterBar = this.getView().byId("template::SmartFilterBar");
      		SmartFilterBar.setModel(oHelpModel);
      		SmartFilterBar.setEntitySet("ZXC_EFECTIVIDADResults");
      		SmartFilterBar.setEntityType("ZXC_EFECTIVIDAD_CDS.ZXC_EFECTIVIDADResult");
      	}

      then I can see the fields and value helps of these ones:

      but when I clic go button, I've got the following error:

       

      ZXC_EFECTIVIDADResults it's a Cube CDS with associations and ZXA_EFECTIVIDADResults it's a query cds that it's based on the cube, so both have the same fields and thank you for explain me the data point stuff 🙂 very helpful.

      best regards

      Author's profile photo alok ranjan
      alok ranjan

      Thanks for a great blog !!!! i have followed all the steps and trying to built CDS view Z_Query_Flight_ALP but getting below error. Can you please guide me to resolve the error.

      Error – while reading DDL source ZQUERYFLIGHTALP including extends Z_QUERY_FLIGHT_ALP.

      Author's profile photo Yu-Ju Louise Huang
      Yu-Ju Louise Huang

      Hi Experts,

      I try to add a column - 'Flight Year' to the table,
      then the table can not sort by 'Airline' properly.

      Any idea on this problem?
      Thanks!

       

      Author's profile photo Pankaj Kumar Pandey
      Pankaj Kumar Pandey

      Hi Experts,

      I was able to create the Mini charts, and content Area and followed the same for Page title but I am not getting any data in Page title section. It says unable to load KPI due to technical issue.

       

      Also when i am clicking on the items of table it says The requested data is not found.

      I want to navigate to some diff fiori app once i click on the line items of table data ( content area) . please help me here.

      Thanks in advance.

      Author's profile photo Nidhi Gupta
      Nidhi Gupta

      Hi Felipe,

       

      Thanks for the informative blog. Can you please share some info on cross app navigation from an analytical page to existing factsheet application and standard GUI transactions. For example clicking on flight number should navigate to standard tcode for flight display or clicking on destination should navigate to existing factsheet application for destinations.

      Also is it possible to add custom buttons etc in page content of analytical page as we do in custom UI5 applications?

      Please suggest.

       

      Regards,

      Nidhi

      Author's profile photo Krzysztof Kuc
      Krzysztof Kuc

      Hi everyone,

      I have a problem with the Chart in the Analytical Page. The Chart is not displayed.

       

      My Annotation file:

      <?xml version="1.0" encoding="utf-8"?>
      <edmx:Edmx Version="4.0"
      	xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
      	<edmx:Reference Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value">
      		<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value">
      		<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMUNICATION',Version='0001',SAP__Origin='LOCAL')/$value">
      		<edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="../../../sap/z_query_flight_alp_cds/$metadata">
      		<edmx:Include Namespace="Z_QUERY_FLIGHT_ALP_CDS" Alias="SAP"/>
      	</edmx:Reference>
      	<edmx:DataServices>
      		<Schema Namespace="z_query_flight_alp_cds_van.v1"
      			xmlns="http://docs.oasis-open.org/odata/ns/edm">
      			<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType/TotaledProperties">
      				<Annotation Term="UI.Hidden"/>
      			</Annotations>
      			<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType">
      				<Annotation Term="UI.Chart" Qualifier="ChartDefault">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>Airline</PropertyPath>
      								<PropertyPath>CalendarYear</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="Airline"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="CalendarYear"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Series"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>TotalOfBookings</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="TotalOfBookings"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.DataPoint" Qualifier="WeightOfLuggage">
      					<Record>
      						<PropertyValue Property="Value" Path="WeightOfLuggage"/>
      						<PropertyValue Property="Title" String="Weight of Luggage"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.LineItem">
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="CalendarYear"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="Airline"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="TotalOfBookings"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="WeightOfLuggage"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.SelectionFields">
      					<Collection>
      						<PropertyPath>CalendarYear</PropertyPath>
      					</Collection>
      				</Annotation>
      				<Annotation Term="Communication.Contact">
      					<Record>
      						<PropertyValue Property="adr">
      							<Collection>
      								<Record>
      									<PropertyValue Property="type" EnumMember="Communication.ContactInformationType/preferred"/>
      									<PropertyValue Property="country" Path="CustomerCountry"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="Communication.Address">
      					<Record>
      						<PropertyValue Property="type" EnumMember="Communication.ContactInformationType/preferred"/>
      						<PropertyValue Property="country" Path="CustomerCountry"/>
      					</Record>
      				</Annotation>
      			</Annotations>
      		</Schema>
      	</edmx:DataServices>
      </edmx:Edmx>
      
      

      Any idea about this problem?

      Thanks!

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Krzysztof Kuc

      in the manifest.json file within the settings, you have the attribute "qualifier". For this one, you have to define a value, e.g. "default".

      The you need a UI.SelectionPresentationVariant with this value as Qualifier, to implement the connection between the annotation file and your manifest (so meaning your app).

      Within the UI.SelectionPresentationVariant annotation you can reference a UI.PresentationVariant via qualifier, e.g. "DefaultPV".

      Then you need to define this UI.PresentationVariant as well (using this qualifier "DefaultPV" and there you have the possibility to reference "Visualization"(s). There you have to add UI.Chart#ChartDefault.

      If you did this, I wiuld assume, your chart should be displayed.

      Best regards,

      Sebastian

       

      Author's profile photo Tanveer Shaikh
      Tanveer Shaikh

      Hi Felipe,

      You Rock !

      Any pointers as to how to build ALP for parameter based Odata Service ?

      Here is sample application where "Display Currency" ( Mandatory) is defined as a input parameter.  Looked everywhere but seems there no documentation around it.

      Looking for a sample annotation / required Odata service metadata / extension code sample to achieve input parameter based ALP .

      Help !

      Thanks,

      Tanveer

      Author's profile photo Merve Gül
      Merve Gül

      Hello Felipe,

      Thank you so much for sharing such a great blog within us. I am trying to use the template and took your blog as a reference. Even though, I was successful creating a chart (for content) and a table, I couldnt succeed on creating a chart on the visual filter section. I have been keep comparing within your code, but seriously I just couldnt find any logical difference. I am looking forward for your comments regarding my below code.

      Best Regards,
      Merve

       

      <?xml version="1.0" encoding="utf-8"?>
      <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
      	<edmx:Reference Uri="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/UI.xml">
      		<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="/sap/opu/odata/sap/ZMG_RN_PATDSH_CDS/$metadata">
      		<edmx:Include Alias="ZMG_RN_PATDSH_CDS" Namespace="ZMG_RN_PATDSH_CDS"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
      		<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
      	</edmx:Reference>
      	<edmx:DataServices>
      		<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="zmg.rh.patdsh.dim.ZMG_RN_PATDSH_DIM.ZMG_RN_PATDSH_CDS">
      			<!--===============================================================================
                      Entity Type from chosen collection 
                      ================================================================================-->
      			<!--===============================================================================
                          Entity Type from chosen navigation property
                          ================================================================================-->
      			<Annotations Target="ZMG_RN_PATDSH_CDS.ZMG_RN_PATDSHType">
      				<Annotation Term="UI.DataPoint" Qualifier="Material">
      					<Record Type="UI.DataPointType">
      						<PropertyValue Property="Value" Path="MATERIAL"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionFields">
      					<Collection>
      						<PropertyPath>MATERIAL</PropertyPath>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.PresentationVariant" Qualifier="FilterPresentationVariant">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#FilterVisualChart</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Chart" Qualifier="FilterVisualChart">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>MATERIAL</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      									<PropertyValue Property="Measure" PropertyPath="MATERIAL"/>
      									<PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint#Material"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>DOCNUM</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="DOCNUM"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Chart">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Line"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>SALESAMOUNT</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="SALESAMOUNT"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>DOCNUM</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="DOCNUM"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.LineItem">
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="DOCNUM"/>
      							<PropertyValue Property="Label" String="Document Number LBL"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="ITEM"/>
      							<PropertyValue Property="Label" String="Item Number LBL"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="SALESAMOUNT"/>
      							<PropertyValue Property="Label" String="Sales Amount LBL"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="">
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="ZMG_RN_PATDSH_CDS.ZMG_RN_PATDSHType/MATERIAL">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="ZMG_RN_PATDSH"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterPresentationVariant"/>
      					</Record>
      				</Annotation>
      			</Annotations>
      		</Schema>
      	</edmx:DataServices>
      </edmx:Edmx>
      
      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Merve Gul

      I am not sure if this fixes your problem, but you did not maintain the parameters of your visual filter.

      So within the Record Common.ValueListType at the very end of your coding you shoud add:

       

      <Collection>
      <Record Type="Common.ValueListParameterInOut">

      <PropertyValue Property="LocalDataProperty" PropertyPath="DOCNUM"/>
      <PropertyValue Property="ValueListProperty" String="DOCNUM"/>
      </Record>
      </Collection>

      Let me know, if this fixes your problem.

      Best regards,

      Sebastian

      Author's profile photo Merve Gül
      Merve Gül

      Hello Sebastian,

       

      I had fixed that problem, thanks anyway 🙂

      But having another problem right now :/ As Kamen mentioned below, mine visual filters also not filtering each other. For example, as I select one of the visual filters, I would expect the other ones also change. Would you please take a look at my below annotation xml? Hope to hearing from you.

      <?xml version="1.0" encoding="utf-8"?>
      <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
      	<edmx:Reference Uri="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/UI.xml">
      		<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="/sap/opu/odata/sap/ZMG_RN_PATDSH2_CDS/$metadata">
      		<edmx:Include Alias="ZMG_RN_PATDSH2_CDS" Namespace="ZMG_RN_PATDSH2_CDS"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
      		<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
      	</edmx:Reference>
      	<edmx:DataServices>
      		<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.zmg.multiple.ZMG_RN_PATDSH_VFILTER.ZMG_RN_PATDSH2_CDS">
      			<!--===============================================================================
                      Entity Type from chosen collection 
                      ================================================================================-->
      			<!--===============================================================================
                          Entity Type from chosen navigation property
                          ================================================================================-->
      			<!--===============================================================================
                     DETAIL PAGE FACETS ENDS
                      ================================================================================-->
      			<!--===============================================================================
                     VISUAL FILTER DEFINITION (ALSO) STARTS
                      ================================================================================-->
      			<!--===============================================================================
                     VISUAL FILTER DEFINITION (ALSO) ENDS
                      ================================================================================-->
      			<Annotations Target="ZMG_RN_PATDSH2_CDS.ZMG_RN_PATDSH2Type">
      				<!--===============================================================================
                     MAIN CHART DEFINITION STARTS 
                      ================================================================================-->
      				<!--===============================================================================
                     MAIN CHART DEFINITION ENDS 
                      ================================================================================-->
      				<!--===============================================================================
                     VISUAL FILTER DEFINITION STARTS 
                      ================================================================================-->
      				<!--===============================================================================
                     TABLE DEFINITION STARTS 
                      ================================================================================-->
      				<!--===============================================================================
                     TABLE DEFINITION ENDS 
                      ================================================================================-->
      				<!--===============================================================================
                     VISUAL FILTER DEFINITION ENDS 
                      ================================================================================-->
      				<!--===============================================================================
                     DETAIL PAGE FACETS STARTS
                      ================================================================================-->
      				<Annotation Term="UI.DataPoint" Qualifier="DPSalesAmount">
      					<Record Type="UI.DataPointType">
      						<PropertyValue Property="Value" Path="SALESAMOUNT"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Identification">
      					<!--==== Facet Related ===-->
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="MATERIAL"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="MATERIALTEXT"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.Chart">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Line"/>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>DOCNUM</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      									<PropertyValue Property="Dimension" PropertyPath="DOCNUM"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>SALESAMOUNT</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="SALESAMOUNT"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.PresentationVariant" Qualifier="FilterDocnumBySalesAmount">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#ChartDocnumBySalesAmount</AnnotationPath>
      								<AnnotationPath >@UI.DataPoint#DPSalesAmount</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.PresentationVariant" Qualifier="FilterLocidBySalesAmount">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#ChartLocidBySalesAmount</AnnotationPath>
      								<AnnotationPath >@UI.DataPoint#DPSalesAmount</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionFields">
      					<Collection>
      						<PropertyPath>DOCNUM</PropertyPath>
      						<PropertyPath>LOCATIONID</PropertyPath>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.LineItem">
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="DOCNUM"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="SALESPRICE"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="SALESAMOUNT"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="MATERIAL"/>
      						</Record>
      					</Collection>
      				</Annotation>
      				<Annotation Term="UI.Chart" Qualifier="ChartDocnumBySalesAmount">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut"/>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>DOCNUM</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      									<PropertyValue Property="Dimension" PropertyPath="DOCNUM"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      									<PropertyValue Property="Measure" PropertyPath="SALESAMOUNT"/>
      									<PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint#DPSalesAmount"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>SALESAMOUNT</PropertyPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Chart" Qualifier="ChartLocidBySalesAmount">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Bar"/>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>LOCATIONID</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="LOCATIONID"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="SALESAMOUNT"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      									<PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint#DPSalesAmount"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>SALESAMOUNT</PropertyPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="MainSection"/>
      							<PropertyValue Property="Label" String="Details by Annotation"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Target" AnnotationPath="@UI.LineItem"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="">
      				<Annotation Term="UI.Facets">
      					<Collection>
      						<Record Type="UI.CollectionFacet">
      							<PropertyValue Property="ID" String="GeneralInformation"/>
      							<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      							<PropertyValue Property="Facets">
      								<Collection>
      									<Record Type="UI.ReferenceFacet">
      										<PropertyValue Property="Label" String="{@i18n&gt;@GeneralInfoFacetLabel}"/>
      										<PropertyValue Property="Target" AnnotationPath="@UI.Identification"/>
      									</Record>
      								</Collection>
      							</PropertyValue>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="ZMG_RN_PATDSH2_CDS.ZMG_RN_PATDSH2Type/DOCNUM">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="ZMG_RN_PATDSH2"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterDocnumBySalesAmount"/>
      						<PropertyValue Property="Parameters">
      							<Collection>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="DOCNUM"/>
      									<PropertyValue Property="ValueListProperty" String="DOCNUM"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="ZMG_RN_PATDSH2_CDS.ZMG_RN_PATDSH2Type/LOCATIONID">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="ZMG_RN_PATDSH2"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterLocidBySalesAmount"/>
      						<PropertyValue Property="Parameters">
      							<Collection>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="LOCATIONID"/>
      									<PropertyValue Property="ValueListProperty" String="LOCATIONID"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      			</Annotations>
      		</Schema>
      	</edmx:DataServices>
      </edmx:Edmx>

       

       

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Merve,

      to make the filters dependent on each other, they need to know about each other.

      For that reason, you have to add the attributes, which should influence the visual filter also as parameter.

      I think, this should work, best regards,

      Sebastian

       

      <Annotations Target="ZMG_RN_PATDSH2_CDS.ZMG_RN_PATDSH2Type/DOCNUM">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="ZMG_RN_PATDSH2"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterDocnumBySalesAmount"/>
      						<PropertyValue Property="Parameters">
      							<Collection>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="DOCNUM"/>
      									<PropertyValue Property="ValueListProperty" String="DOCNUM"/>
      								</Record>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="LOCATIONID"/>
      									<PropertyValue Property="ValueListProperty" String="LOCATIONID"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="ZMG_RN_PATDSH2_CDS.ZMG_RN_PATDSH2Type/LOCATIONID">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="ZMG_RN_PATDSH2"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterLocidBySalesAmount"/>
      						<PropertyValue Property="Parameters">
      							<Collection>
      							<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="DOCNUM"/>
      									<PropertyValue Property="ValueListProperty" String="DOCNUM"/>
      								</Record>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="LOCATIONID"/>
      									<PropertyValue Property="ValueListProperty" String="LOCATIONID"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      			</Annotations>
      Author's profile photo Kamen Yanev
      Kamen Yanev

      Hi Felipe / all,

      I have problem with the Visual Filters in my ALP app. I have added more than 5 filters, and they work correctly. When I combine 2 or more, the values in my Smart Chart and Table below respect my selections.

      The issue is that the Visual Filters are not updating accordingly. For example: I have selected vendor, which is created in one company code, or has documents in specific fiscal year only. At the moment I select the vendor I would expect that the other visual filters are refreshing, and only meaningful values according my selections are displayed. Instead – none of the filters are refreshed.

      Could you please give me a hint what could be causing this issue – CDS annotations or Fiori App.

      Best regards,

      Kamen

      Author's profile photo Merve Gül
      Merve Gül

      Hello Kamen,

      Right now I am having the same issue, were you able to fix it? I would love to here from the Gurus in here if they have an answer for this specific situation. It is obviously seen in the below URL, that option is possible but I don’t also know how..

      https://experience.sap.com/fiori-design-web/visual-filter-bar/

      Best regards,

      Merve

      Author's profile photo Sebastian Freilinger-Huber
      Sebastian Freilinger-Huber

      Hi Kamen Yanev

      please have a look at my answer here, i hope this solved your issue.

      https://answers.sap.com/questions/12864434/visual-filters-not-filtering-each-other.html

      If you want to make all five filters dependent on each other, all of them have to contain the five fields within the parameters area in your annotation file.

      Best regards,

      Sebastian

      Author's profile photo Kamen Yanev
      Kamen Yanev

      Hi Sebastian,

      Thank you very much for your reply. I followed your proposal and it works really great ?

      I have listed all 6 properties as ValueListParameterInOut for each of them, and now all of them are refreshing automatically, when I select value in one of the Visual Filters. I appreciate your help.

      If I’m not too insolent I would like to ask you another question, that I’m not able to answer myself from quite some time.

      For each Visual Filters I have also Compact Filter created (as standard). In addition, I have added few Compact filters for some fields from my ABAP CDS view. My problem is the source for the value help for each Compact filter. My expectations are that the Compact filter for Fiscal Year will show me only the 3 values that are possible – in my case 2017, 2018 and 2019 (eventually I will try to render it as dropdown or MultiComboBox).

      I mean I want to have filters with values, based on the result from the query. After searching the net for solution, I understand that in most examples we add extra Entity Set for Search Help and we bind it to the property as ValueList. Here I face 2 issues:

      1. If I let Eclipse to generate the service (@OData.publish: true), then I get 1 main and 2 additional Entity sets (For Invoice Status and Company Code). These additional sets are generated automatically (I don’t have specific annotation) and give me the value from the data element (fixed values and value table). But how can I force the system to generate additional Entity sets for each field with Compact filter? Is it possible and is it the right approach?

        The second option would be to generate SEGW service by myself and add as much as Search Help entity sets as I need. I believe I saw comment from you in some other thread that the correct solution would be to refer to these “external” search helps. But on other places I read that annotations in Eclipse are advanced enough to suite almost all requirements, so I’m not sure if I should actually end up using SEGW.
      2. No matter how I create the Search Help Entity set, it will be displaying all values, and not the values that are actually in my query result (I don’t want to show company code X, where the results in my table include company codes A, B and C only).

      So is there a way to display values in the Compact filter, based on the actual data?

      Thank you in advance.

      Kamen

      Author's profile photo Vaibhav Agarwal
      Vaibhav Agarwal

      Hi Felipe / all,

       

      Were you able to integrate Analytical CDS view (with analytical.query=true) into OVP apps. I have a requirement were a field with analytical.formula assigned(Formula to calculate percentage during runtime) has to be shown in OVP card header. But I am not able to achieve it.

      Regards,

      Vaibhav

      Author's profile photo Andreas Michaelbach
      Andreas Michaelbach

      Hi Felipe,

       

      great blog! Thank you very much.

       

      I have the same problem like some others, the visual filter was not created. I have compared the code, but I can not find the reason why the visual filter is not displayed. Can you please check my annotation file?

       

      Thanks

      Andreas

       

      <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
      	<edmx:Reference Uri="/sap/opu/odata/sap/ZGW_SURVEY_OVERVIEW_SRV/$metadata">
      		<edmx:Include Alias="Metadata" Namespace="ZGW_SURVEY_OVERVIEW_SRV"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470968/UI.xml?api=v2">
      		<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
      	</edmx:Reference>
      	<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
      		<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
      	</edmx:Reference>
      	<edmx:DataServices>
      		<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="zsurvey_alp.annotations.annotation.ZGW_SURVEY_OVERVIEW_SRV">
      			<Annotations Target="Metadata.CustSurvey">
      				<Annotation Term="UI.PresentationVariant" Qualifier="FilterPres">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="Text" String="Pres var filter"/>
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#ChartFilter</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Chart" Qualifier="ChartFilter">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>Bewertungdurschn</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="Bewertungdurschn"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>Kundenr</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      									<PropertyValue Property="Dimension" PropertyPath="Kundenr"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.PresentationVariant" Qualifier="Default">
      					<Record Type="UI.PresentationVariantType">
      						<PropertyValue Property="Text" String="Std. Presentation Variante"/>
      						<PropertyValue Property="Visualizations">
      							<Collection>
      								<AnnotationPath>@UI.Chart#Default</AnnotationPath>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionVariant" Qualifier="Default">
      					<Record Type="UI.SelectionVariantType">
      						<PropertyValue Property="Text" String="Std. Selection Variante"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.SelectionPresentationVariant">
      					<Record Type="UI.SelectionPresentationVariantType">
      						<PropertyValue Property="SelectionVariant" Path="@UI.SelectionVariant#Default"/>
      						<PropertyValue Property="PresentationVariant" Path="@UI.PresentationVariant#Default"/>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.Chart" Qualifier="Default">
      					<Record Type="UI.ChartDefinitionType">
      						<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
      						<PropertyValue Property="Measures">
      							<Collection>
      								<PropertyPath>Bewertungdurschn</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="MeasureAttributes">
      							<Collection>
      								<Record Type="UI.ChartMeasureAttributeType">
      									<PropertyValue Property="Measure" PropertyPath="Bewertungdurschn"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="Dimensions">
      							<Collection>
      								<PropertyPath>Kundenr</PropertyPath>
      							</Collection>
      						</PropertyValue>
      						<PropertyValue Property="DimensionAttributes">
      							<Collection>
      								<Record Type="UI.ChartDimensionAttributeType">
      									<PropertyValue Property="Dimension" PropertyPath="Kundenr"/>
      									<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      				<Annotation Term="UI.LineItem">
      					<Collection>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="Kundename"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="Anzahlgesendeteumfragen"/>
      						</Record>
      						<Record Type="UI.DataField">
      							<PropertyValue Property="Value" Path="Bewertungdurschn"/>
      						</Record>
      					</Collection>
      				</Annotation>
      			</Annotations>
      			<Annotations Target="Metadata.CustSurvey/Kundenr">
      				<Annotation Term="Common.ValueList">
      					<Record Type="Common.ValueListType">
      						<PropertyValue Property="CollectionPath" String="CustSurvey"/>
      						<PropertyValue Property="PresentationVariantQualifier" String="FilterPres"/>
      						<PropertyValue Property="Parameters">
      							<Collection>
      								<Record Type="Common.ValueListParameterInOut">
      									<PropertyValue Property="LocalDataProperty" PropertyPath="Kundenr"/>
      									<PropertyValue Property="ValueListProperty" String="Kundenr"/>
      								</Record>
      							</Collection>
      						</PropertyValue>
      					</Record>
      				</Annotation>
      			</Annotations>
      		</Schema>
      	</edmx:DataServices>
      </edmx:Edmx>
      Author's profile photo Sylvain Fami
      Sylvain Fami

      Great blog.

      For me everything is working fine. I don't need visual filter, so didn't use them.

      Do you know a workaround to add a Measure as a FIlter? My ALP is displaying sales order by renue. I need to add a filter for Revenue, so that we can display e.g. revenue GT 40000. Do you know how this can be done?

      Parameters are not working with FIori Elements. I already implement a compact filter which is working for Dimension but not for measures.

      Thanks in advance! Jeff

      Author's profile photo Donato Ferraro
      Donato Ferraro

      Hi Felipe,

       

      great blog!

      do you think it's possible replace the table navigation to detail with a call to sap transaction? the

      sapui5 code is not traditional, so how can I customize it?

      Thanks in advance.

      Donato

       

       

      Author's profile photo Jayaramu N H
      Jayaramu N H

      Hi All,

      Great Blog ..!

      for me every thing is working fine in webide, same app i have deployed to repository, form repository visual filters are not loading.

       

      thanks in advance

      Author's profile photo Chandru Ramasamy
      Chandru Ramasamy

      Hi Felipe de Mello Rodrigues,

      I am unable to get the following Annotation in my CDS view Header. I have Suite on Hana System and try to create Analytical list page using above example.

      @UI.selectionVariant
      @UI.presentationVariant
      @UI.selectionPresentationVariant

      However i am able to load @UI.Chart at Header. Can you help me? Fyi, i dont have smart business cockpit installed in my system. Is it required ?

      Thanks

      Chandru.R

       

      Author's profile photo vinay singh
      vinay singh

      Hi Expert,

      I follow the step but getting error as shown in screen shot.Please suggest the reasons

       

       

      Author's profile photo Marc-Holger Koop
      Marc-Holger Koop

      Hi Vinay,

      I think we had a similar issue with a new SAPUI5 version. For testing purposes you could try to run the FLP Sandbox with a slightly older version. It works fine, in our case, with 1.78.4.

      Needs to be adjusted in 2 places in the flpSandbox.html.

      Good luck!
      Marc

      Author's profile photo Marc-Holger Koop
      Marc-Holger Koop

      Hi Felipe de Mello Rodrigues 

      I really enjoyed following your blog, thanks a lot for providing it!

      Currently it all seems to work apart from the KPI… the KPI appears, including numbers, but the chart is missing:

      ALP%20KPI%20chart%20missing

       

       

       

       

       

       

       

       

       

       

       

      In the console there are the following errors:

      It sounds a bit as if there were some mandatory annotations missing…

      You have any idea what the root cause could be? Would be much appreciated.

      Thanks a lot and best regards,
      Marc

       

      Author's profile photo Nicolae-Dragos Minaciu
      Nicolae-Dragos Minaciu

      Hello,

       

      Did you managed to fix the issue ?

      I have teh same problem. The annotation are taken from CDS.

      Author's profile photo Marc-Holger Koop
      Marc-Holger Koop

      Hi there,

      no, we didn't fix it in ECC environment. But I copied the same CDS-Views into an S/4 environment, built the App in exactly the same way, and there we do not have an issue with the diagram below the KPI button.

      We opened an SAP Incident about this, it is still in work. I will put the results and/or solution here, but it might take some time.

      Best regards,
      Marc

      Author's profile photo Nicolae-Dragos Minaciu
      Nicolae-Dragos Minaciu

      Ok, Thanks for the update!

      Author's profile photo Marc-Holger Koop
      Marc-Holger Koop

      Hello again Nicolae-Dragos Minaciu,

      here the suggested solution from SAP:

      Suggested%20solution%20from%20SAP

      Suggested solution from SAP

      I'd like to comment on this, that we never included these annotations manually. These 'faulty' annotations are coming from the backend and CDS annotations, hence there must be some error in the @OData.publish model generation in ERP 6.0 (EHP8) environment. 

      However, as soon as I included the annotations for the KPI in the local annotations.xml, the issue was resolved.

      Best regards!
      Marc

      Author's profile photo RAMAKRISHNAN MURUGAN
      RAMAKRISHNAN MURUGAN

      Hello All,

      I have followed the complete steps as per blog. But am not able to see the visual filter. Is there any other corrections, need to do in the annotation file.

       

      BR,

      RAM.

       

      Author's profile photo Santosh N
      Santosh N

      Hello,

      How to show the default values using the UI5 annotations

      Author's profile photo Glauco Kubrusly
      Glauco Kubrusly

      Hi. Thank you for your effort. But I think it would be easier for novices if you had inserted comented lines near annotations in CDS and could numbered it or link them with comentary like A for main chart, B for visual filters, etc.
      e.g. Insert a comentary above main chart annotation, Insert a comentary for each visual filter, etc.
      It is a complex subject for novices and for example my first development I preffered to go to frontend annotations to create my ALP.

      Author's profile photo Luis Sismeiro
      Luis Sismeiro

      Hello @felipedemello.rodrigues,

      Thank you very much for the tutorial, nice work.

      If the visual filter at the top of the page doesn't work, please add the "kpi" model.

      Image for reference:

      It should work like this:

      Author's profile photo Sanjay Sharma
      Sanjay Sharma

      Hi Felipe de Mello Rodrigues and members

      Thanks for the informative blog .

      I have a question . Can we develop this app without the use of front end WEB IDE or BAS . I mean can we deploy completely in eclipse and add it as a tile in FIORI like it is done in KPI.

      Thanks and waiting for positive response.

      Author's profile photo T. KASI SURYANARAYANA MURTHY
      T. KASI SURYANARAYANA MURTHY

      Hi Felipe de Mello Rodrigues,

      I have more than 25K records and I could only get a max of 5K records to be shown on screen and the dash board kpi charts are based on 5K records and not all records. Is there a setting I can increase the output record count.

      Appreciate your response.

      Regards

      Kasi