Skip to Content
0

$top parameter in Annotations for SAP overview page

Feb 08 at 09:05 AM

46

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Prasita Prabhakaran
Feb 14 at 03:13 AM
0

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>
Share
10 |10000 characters needed characters left characters exceeded