cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori ALP: Visual filter not visible

Halil
Newcomer
0 Kudos

 

 

Hello experts,

I have created a simple Analytical List Page with a visual and compact filter. But the visual filter is not displayed. The data source is a CDS view from S/4Hana. I have read through the blogs, but unfortunately this has not helped me.
I'm not sure whether the problem lies in the annotations or in my CDS view. I would be very grateful if you could help me.

Annotations:

<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
    <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
        <edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
    </edmx:Reference>
    <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
        <edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
    </edmx:Reference>
    <edmx:Reference Uri="/sap/opu/odata/sap/ZBTP_C_SALESDOCUMENT_CDS/$metadata">
        <edmx:Include Namespace="ZBTP_C_SALESDOCUMENT_CDS" Alias="SAP"/>
    </edmx:Reference>
    <edmx:DataServices>
        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
            <Annotations Target="SAP.ZBTP_C_SalesDocumentType">
                <Annotation Term="UI.LineItem">
                    <Collection>
                        <Record Type="UI.DataField">
                            <PropertyValue Property="Value" Path="SalesDocument"/>
                        </Record>
                        <Record Type="UI.DataField">
                            <PropertyValue Property="Value" Path="SalesDocumentItem"/>
                        </Record>
                        <Record Type="UI.DataField">
                            <PropertyValue Property="Value" Path="Material"/>
                        </Record>
                    </Collection>
                </Annotation>
                <Annotation Term="UI.SelectionFields">
                    <Collection>
                        <PropertyPath>Material</PropertyPath>
                    </Collection>
                </Annotation>
                <Annotation Term="UI.Chart" Qualifier="FilterFlightPriceAgencyID">
                    <Record Type="UI.ChartDefinitionType">
                        <PropertyValue Property="Title" String="Filter FlightPrice By AgencyID"/>
                        <PropertyValue Property="Description" String="Filter FlightPrice By AgencyID"/>
                        <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Bar"/>
                        <PropertyValue Property="Dimensions">
                            <Collection>
                                <PropertyPath>Material</PropertyPath>
                            </Collection>
                        </PropertyValue>
                        <PropertyValue Property="Measures">
                            <Collection>
                                <PropertyPath>OrderQuantity</PropertyPath>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
                <Annotation Term="UI.PresentationVariant" Qualifier="PVFilterFlightPriceAgencyID">
                    <Record Type="UI.PresentationVariantType">
                        <PropertyValue Property="Visualizations">
                            <Collection>
                                <AnnotationPath>@UI.Chart#FilterFlightPriceAgencyID</AnnotationPath>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
            </Annotations>
             <Annotations Target="SAP.ZBTP_C_SALESDOCUMENT_CDS_Entities/ZBTP_C_SalesDocument">
                <Annotation Term="Common.ValueList">
                    <Record Type="Common.ValueListType">
                        <PropertyValue Property="CollectionPath" String="ZBTP_C_SalesDocument"/>
                        <PropertyValue Property="PresentationVariantQualifier" String="PVFilterFlightPriceAgencyID"/>
                        <PropertyValue Property="Parameters">
                            <Collection>
                                <Record Type="Common.ValueListParameterInOut">
                                    <PropertyValue Property="LocalDataProperty" PropertyPath="Material"/>
                                    <PropertyValue Property="ValueListProperty" String="Material"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
            </Annotations>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

Best regards,

Halil

View Entire Topic
MioYasutake
Active Contributor
0 Kudos

 

If you're using OData V4, you need to specify Aggregation.ApplySupported and several other annotations to display visual filters (or charts). For more details, refer to the "Enabling Aggregation in the Back End" section in the UI5 documentation.

Additionally, the following blog post explains how to show an Analytical List Page (ALP) with a CAP OData V4 backend. Although it doesn't cover XML annotations, it should give you a good idea:

https://community.sap.com/t5/technology-blogs-by-members/building-an-analytical-list-page-with-cap-o...