Skip to Content

$top parameter in Annotations for SAP overview page

Hi All,

I am trying to create analytic chart card in OVP. I am getting hundreds of rows from backend and I want to restrict those to top 10 like we give $top=10 parameter in service url.

How can I achieve this through annotations?

I tried through Selection Variant but it takes only property path not custom parameter like $top or $skip.

Please suggest.

Thanks,

Harshita

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 14 at 03:13 AM

    Hi Harshita,

    You can use maxItems in PresentationVariant for this as shown in the following example:

    <Annotation Term="UI.PresentationVariant" Qualifier="SalesChart">
    <Annotation Term="com.sap.vocabularies.Common.v1.Label" String="Sales in Descending Order"/>
    <Record>
    <PropertyValue Property="MaxItems" Int="5" />
    <PropertyValue Property="GroupBy">
    <Collection>
    <PropertyPath>Country</PropertyPath>
    </Collection>
    </PropertyValue>
    <PropertyValue Property="SortOrder">
    <Collection>
    <Record>
    <PropertyValue Property="Property" PropertyPath="Sales" />
    <PropertyValue Property="Descending" Boolean="true" />
    </Record>
    </Collection>
    </PropertyValue>
    <PropertyValue Property="Visualizations">
    <Collection>
    <AnnotationPath>@UI.Chart#SalesChart</AnnotationPath>
    </Collection>
    </PropertyValue>
    </Record>
    </Annotation>
    Add comment
    10|10000 characters needed characters exceeded