cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Filters does not show up in Analytical List Page .

boudhayan-dev
Employee
Employee
0 Kudos
Hi,

I am trying to make a ALP with compact and visual filters. I have a chart and a table in the content area. The table contains 2 columns and the chart is plotted with the same two columns as a bar chart. In the Filter section, for the compact filter - I have a selection field for one of the columns from the table. I have created PresentationVariationQualifier and included a chart which is same as the one included in the content section. However, the visual filter does not show up.

I am running the test with Mockdata for now. The following are the files that I am using -

1. metadata.xml

AtCustomersRisk is the entity that I am referring in the Chart

<EntityType Name="AtRiskCustomersType">
    <Key>
        <PropertyRef Name="IP_FILTER"/>
        <PropertyRef Name="CUST_ID"/>
    </Key>
    <Property Name="IP_FILTER" Type="Edm.String" Nullable="false" sap:parameter="optional" sap:label="IP_FILTER"/>
    <Property Name="ANNUAL_LIABILITY" Type="Edm.String" MaxLength="1" sap:aggregation-role="measure" sap:label="Attribute Value"/>
    <Property Name="ACTUAL_DTR" Type="Edm.Int32" sap:label="ACTUAL_DTR"/>
    <Property Name="INFLUENCE" Type="Edm.Int32" sap:aggregation-role="measure" sap:filterable="true" sap:label="INFLUENCE"/>
    <Property Name="IMPACT" Type="Edm.Int32" sap:aggregation-role="measure" sap:filterable="true" sap:label="IMPACT"/>
    <Property Name="DAYS_TO_REACT" Type="Edm.Int32" sap:label="DAYS_TO_REACT"/>
    <Property Name="PREDICTED_REACTION_DATE" Type="Edm.DateTime" sap:display-format="Date" sap:label="PREDICTED_REACTION_DATE"/>
    <Property Name="EXT_ID" Type="Edm.String" MaxLength="32" sap:filterable="true" sap:label="Identifiable External ID"/>
    <Property Name="NAME" Type="Edm.String" MaxLength="200" sap:label="Customer Name"/>
    <Property Name="CUST_ID" Type="Edm.Int64" sap:label="Customer ID"/>
    <Property Name="CURRENCY_DESC" Type="Edm.String" MaxLength="100" sap:label="DESCRIPTION"/>
    <Property Name="CURRENCY" Type="Edm.String" MaxLength="100" sap:label="STR_VALUE"/>
    <Property Name="INCOME_LOSS" Type="Edm.Decimal" Precision="30" Scale="2" sap:filterable="true" sap:aggregation-role="measure" sap:label="CC_INCOME_LOSS"/>
    <Property Name="IS_SHOW_DETAILS" Type="Edm.Int32" sap:label="Show Data in Customer Details Flag"/>
</EntityType>

2. This is the annotation.xml file .

<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml">
<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml">
<edmx:Include Alias="Auth" Namespace="Org.OData.Authorization.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/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="Communication" Namespace="com.sap.vocabularies.Communication.v1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
<edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1"/>
</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://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Alias="Validation" Namespace="Org.OData.Validation.V1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm">
<Annotations Target="com.odata.v2.sap.cr.AtRiskCustomersType">
<Annotation Term="UI.SelectionFields">
<Collection>
<PropertyPath>EXT_ID</PropertyPath>
</Collection>
</Annotation>
<Annotation Term="UI.PresentationVariant" Qualifier="Filter">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="SortOrder">
<Collection/>
</PropertyValue>
<PropertyValue Property="GroupBy">
<Collection/>
</PropertyValue>
<PropertyValue Property="TotalBy">
<Collection/>
</PropertyValue>
<PropertyValue Property="Total">
<Collection/>
</PropertyValue>
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.Chart#Filter02</AnnotationPath>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.Chart" Qualifier="Filter02">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>IMPACT</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection/>
</PropertyValue>
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>EXT_ID</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection/>
</PropertyValue>
<PropertyValue Property="Actions">
<Collection/>
</PropertyValue>
</Record>
</Annotation>

<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="EXT_ID"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="IMPACT"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="com.odata.v2.sap.cr.AtRiskCustomersType/IMPACT">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="CollectionPath" String="AtRiskCustomers"/>
<PropertyValue Property="PresentationVariantQualifier" String="Filter"/>
</Record>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

3. This is the manifest.json file -

{
"_version": "1.7.0",
"sap.app": {
"id": "com.dev.test.Test",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "1.0.0"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"tags": {
"keywords": []
},
"dataSources": {
"mainService": {
"uri": "/here/goes/your/serviceurl/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/metadata.xml",
"annotations": [
"annotation0"
]
}
},
"annotation0": {
"type": "ODataAnnotation",
"uri": "annotations/annotation0.xml",
"settings": {
"localUri": "annotations/annotation0.xml"
}
}
},
"offline": false,
"sourceTemplate": {
"id": "ALP_WebIDE_Plugin.analyticallistpage",
"version": "1.41.1"
}
},
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone@2": "",
"tablet": "",
"tablet@2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": false,
"phone": false
},
"supportedThemes": [
"sap_hcb",
"sap_belize"
]
},
"sap.ui5": {
"resources": {
"js": [],
"css": []
},
"dependencies": {
"minUI5Version": "1.42.1",
"libs": {
"sap.ui.core": {
"lazy": false
},
"sap.ui.generic.app": {
"lazy": false
},
"sap.suite.ui.generic.template": {
"lazy": false
}
},
"components": {}
},
"models": {
"i18n": {
"preload": false,
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/i18n.properties",
"settings": {
"bundleName": "com.dev.test.Test.i18n.i18n"
}
},
"i18n|sap.suite.ui.generic.template.AnalyticalListPage|AtRiskCustomers": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/AnalyticalListPage/AtRiskCustomers/i18n.properties"
},
"i18n|sap.suite.ui.generic.template.ObjectPage|AtRiskCustomers": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/ObjectPage/AtRiskCustomers/i18n.properties"
},
"": {
"preload": true,
"dataSource": "mainService",
"settings": {
"defaultBindingMode": "TwoWay",
"defaultCountMode": "Inline",
"refreshAfterChange": false,
"metadataUrlParams": {
"sap-value-list": "all"
}
}
},
"@i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/i18n.properties"
}
},
"extends": {
"extensions": {}
},
"contentDensities": {
"compact": true,
"cozy": false
}
},
"sap.ui.generic.app": {
"_version": "1.3.0",
"pages": {
"AnalyticalListPage|AtRiskCustomers": {
"entitySet": "AtRiskCustomers",
"component": {
"name": "sap.suite.ui.generic.template.AnalyticalListPage",
"list": true,
"settings": {
"multiSelect": false,
"defaultFilterMode": "visual",
"qualifier":"Filter",
"autoHide": true,
"showGoButtonOnFilterBar": true,
"condensedTableLayout": false,
"keyPerformanceIndicators": {
}
}
},
"pages": {
"ObjectPage|AtRiskCustomers": {
"entitySet": "AtRiskCustomers",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
}
}
}
}
}
},
"sap.platform.hcp": {
"uri": ""
}
}

And this is the resulting ALP -

Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

Hi Boudhayan,

Have you found the solution? I am having the same Issue.

0 Kudos

Verify version. otherwise, In xsodata service include aggregate always.

Example:

service { 
	"sample.odata::calc" as "Calcview" 
        keys generate local "ID"
        aggregates always (SUM of "Amount"); 
}  
annotations {
    enable OData4SAP; 
}



former_member603294
Discoverer
0 Kudos

Hi Boudhayan,

My initial guess is that it is happening because of the service namespace missing from the annotation. Could you please share your project zip with us and what backend system you are using with us so we can debug this error?

Regards,

Antariksha.

boudhayan-dev
Employee
Employee
0 Kudos

Hi Antariksha,

I have emailed you the details.

Regards,

Dev

former_member603294
Discoverer
0 Kudos

Hi Boudhayan,

Your question has been answered on our JAM page.

Regards,
Antariksha.

boudhayan-dev
Employee
Employee
0 Kudos

Hi Antariksha,

I made the changes as per your suggestion. Well, it works but partially. I can see the Visual Filter being loaded on the UI now but the chart stays in a "loading" state perennially.

Here is the console log of error that's resulting after the new changes. Can you please take a look ?

1. UI -

2. Changes as per your earlier comment in JAM page -

metadata.xml-


annotation.xml

<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml">
<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml">
<edmx:Include Alias="Auth" Namespace="Org.OData.Authorization.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/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="Communication" Namespace="com.sap.vocabularies.Communication.v1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
<edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1"/>
</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://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Alias="Validation" Namespace="Org.OData.Validation.V1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm">
<Annotations Target="com.odata.v2.sap.cr.AtRiskCustomersType">
<Annotation Term="UI.SelectionFields">
<Collection>
<PropertyPath >EXT_ID</PropertyPath>
<PropertyPath >IMPACT</PropertyPath>
</Collection>
</Annotation>
<Annotation Term="UI.PresentationVariant" Qualifier="FilterImpactByID">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="Text" String="Impact VS EXT_ID"/>
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath >@UI.Chart#FilterImpactByID</AnnotationPath>
</Collection>
</PropertyValue>
<PropertyValue Property="SortOrder">
<Collection>
<Record Type="Common.SortOrderType">
<PropertyValue Property="Property" PropertyPath="IMPACT"/>
<PropertyValue Property="Descending" Bool="true"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.Chart" Qualifier="FilterImpactByID">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Bar"/>
<PropertyValue Property="Title" String="IMPACT vs EXT_ID"/>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>IMPACT</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
<PropertyValue Property="Measure" PropertyPath="IMPACT"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>EXT_ID</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPath="EXT_ID"/>
<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="EXT_ID"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="IMPACT"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="com.odata.v2.sap.cr.AtRiskCustomersType/EXT_ID">
<Annotation Term="Common.ValueList" Qualifier="xyz">
<Record Type="Common.ValueListType">
<PropertyValue Property="CollectionPath" String="AtRiskCustomers"/>
<PropertyValue Property="PresentationVariantQualifier" String="FilterImpactByID"/>
<PropertyValue Property="SearchSupported" Bool="false"/>
</Record>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>



and the relevant parts of the manifest.json -

"sap.ui.generic.app": {
"_version": "1.3.0",
"pages": {
"AnalyticalListPage|AtRiskCustomers": {
"entitySet": "AtRiskCustomers",
"component": {
"name": "sap.suite.ui.generic.template.AnalyticalListPage",
"list": true,
"settings": {
"multiSelect": true,
"autoHide": false,
"showGoButtonOnFilterBar": true,
"condensedTableLayout": true,
"keyPerformanceIndicators": {}
}
},
"pages": {
"ObjectPage|AtRiskCustomers": {
"entitySet": "AtRiskCustomers",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
}
}
}
}
}
}
0 Kudos

Hi Antariksha,

Which JAM page is this? I do not have access. Can't see.

Thanks,

Rosy

Matt_Fraser
Active Contributor

Hi Antariksha,

I'll second what Rosy says. The SAP community is a public forum, not just for SAP employees, and the general public does not have access to JAM. Can you repeat the salient details here for others who have this same issue? In doing so, you'll be doing a service for the community at large.

Thanks!

Matt