cancel
Showing results for 
Search instead for 
Did you mean: 

UI.SelectionVariant filter not added to odata call for Fiori overview List card Tab

pradeep_nellore
Participant
0 Kudos
667

Dear Experts,

I have started to build a Fiori Overview page with a List card based on standard CDS Analytical view--C_CollectionProgressQ with Local Annotations. CollectionPriority is a field defined in cds and have values rom 1 to 6. I have also shown 2 tabs where First tab shows data where CollectionPriority = 5 and second tab where CollectionPriority = 6. I have created 2 UI.SelectionVariant for this purpose and added filters as below. I have only copied below.

 <Annotation Term="UI.SelectionVariant" Qualifier="paramstest">
<Record Type="UI.SelectionVariantType">
<PropertyValue Property="Parameters">
<Collection>
<Record Type="com.sap.vocabularies.UI.v1.Parameter">
<PropertyValue Property="PropertyName" PropertyPath="Parameters/P_DisplayCurrency" />
<PropertyValue Property="PropertyValue" String="EUR" />
</Record>
<Record Type="com.sap.vocabularies.UI.v1.Parameter">
<PropertyValue Property="PropertyName" PropertyPath="Parameters/P_ExchangeRateType" />
<PropertyValue Property="PropertyValue" String="M" />
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="PropertyName" PropertyPath="CollectionPriority" />
<PropertyValue Property="PropertyValue" String="5" />
</Record>
</Annotation>

Card definition is as below.
 "card14": {
"model": "C_COLLECTIONPROGRESSQ_CDS",
"template": "sap.ovp.cards.list",
"settings": {
"title": "Dunnings not Sent",
"listType": "extended",
"listFlavor": "standard",
"defaultSpan": {
"rows": 20,
"cols": 3,
"showOnlyHeader": false
},
"entitySet": "C_COLLECTIONPROGRESSQResults",
"sortOrder": "descending",
"sortBy": "NumberOfWorklistItems",
"tabs": [
{
"annotationPath": "com.sap.vocabularies.UI.v1.LineItem#dunningsnotsentreminder",
"dataPointAnnotationPath": "com.sap.vocabularies.UI.v1.DataPoint#dunningsnotsentreminder",
"presentationAnnotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#collectibleamount",
"selectionAnnotationPath": "com.sap.vocabularies.UI.v1.SelectionVariant#params",
"identificationAnnotationPath": "com.sap.vocabularies.UI.v1.Identification#collectibleamount",
"value": "Reminder Action"
},
{
"annotationPath": "com.sap.vocabularies.UI.v1.LineItem#dunningsnotsentemail",
"dataPointAnnotationPath": "com.sap.vocabularies.UI.v1.DataPoint#dunningsnotsentemailaction",
"presentationAnnotationPath": "com.sap.vocabularies.UI.v1.PresentationVariant#collectibleamount",
"selectionAnnotationPath": "com.sap.vocabularies.UI.v1.SelectionVariant#paramstest",
"identificationAnnotationPath": "com.sap.vocabularies.UI.v1.Identification#collectibleamount",
"value": "Email Action"
}
]

}
}
But i have noticed that Filters are not added in OData calls when i switch tabs. Am i missing something? Please let me know.
Best RegardsPradeep Nellore
View Entire Topic
AlexNecula
Active Contributor
0 Kudos

Hi,

Try to use select-options instead.

<Annotation Term="UI.SelectionVariant" Qualifier="paramstest">
	<Record Type="UI.SelectionVariantType">
		<PropertyValue Property="Parameters">
			<Collection>
				<Record Type="com.sap.vocabularies.UI.v1.Parameter">
					<PropertyValue Property="PropertyName" PropertyPath="Parameters/P_DisplayCurrency"/>
					<PropertyValue Property="PropertyValue" String="EUR"/>
				</Record>
				<Record Type="com.sap.vocabularies.UI.v1.Parameter">
					<PropertyValue Property="PropertyName" PropertyPath="Parameters/P_ExchangeRateType"/>
					<PropertyValue Property="PropertyValue" String="M"/>
				</Record>
			</Collection>
		</PropertyValue>
		<PropertyValue Property="SelectOptions">
			<Collection>
				<Record Type="UI.SelectOptionType">
					<PropertyValue Property="PropertyName" PropertyPath="CollectionPriority"/>
					<PropertyValue Property="Ranges">
						<Collection>
							<Record Type="UI.SelectionRangeType">
								<PropertyValue Property="Sign" EnumMember="UI.SelectionRangeSignType/I"/>
								<PropertyValue Property="Option" EnumMember="UI.SelectionRangeOptionType/EQ"/>
								<PropertyValue Property="Low" String="5"/>
							</Record>
						</Collection>
					</PropertyValue>
				</Record>
			</Collection>
		</PropertyValue>
	</Record>
</Annotation>
pradeep_nellore
Participant

Thanks a lot, this worked 🙂