cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding the configuration of Visual Filter in Analytical List Report

shady_shen
Employee
Employee
0 Kudos

Dear SAPer,

I'm new with ALP and has met with configuration (annotation) issue with ALP. I keep receive such error as "Uncaught (in promise) TypeError: Cannot read property 'PHASE_ID' of undefined", But I couldn't figure out where my annotation is wrong. Could you please help point it out for me?

As has pasted below, it is a very simple ALP application.

For the sake of debugging, I merge all the annotation into the metadata.xml but it still doesn't work.

I tried to create a visual filter on field PHASE_ID out of Entity ProjectDetail.

The value help is based on the same Entity. I created a ValueFilter under the target of ProjectDetailType/PHASE_ID and one presentationVariant, one UI.Chart and one selectionFields under the target of ProjectDetailType. But the visual filter is not visible...

metadata.xml:

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">


<edmx:Reference Uri="https://refapps-w3763b655.dispatcher.int.sap.hana.ondemand.com/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470968/UI.xml?api=v2" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
</edmx:Reference>


<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="2.0">
<Schema xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="I042500_PROJ.odata.project">

<EntityType Name="ProjectDetailType">
<Key>
<PropertyRef Name="PID"/>
</Key>
<Property Name="PID" Type="Edm.Int32" Nullable="false"/>
<Property Name="P_NAME" Type="Edm.String" MaxLength="100"/>
<Property Name="CID" Type="Edm.Int32"/>
<Property Name="C_NAME" Type="Edm.String" MaxLength="100"/>
<Property Name="PHASE_ID" Type="Edm.Int32"/>
<Property Name="COST_PLANNED" Type="Edm.Double"/>
<Property Name="COST_PREDICTED" Type="Edm.Double"/>
<Property Name="COST_DIFF_RATIO" Type="Edm.Double"/>
<Property Name="GROSS_MARGIN" Type="Edm.Double"/>
<Property Name="CR_NUMBER" Type="Edm.Int32"/>
<Property Name="ISSUE_NOT_CLOSED" Type="Edm.Int32"/>
<Property Name="RISK_NOT_CLOSED" Type="Edm.Int32"/>
<NavigationProperty Name="_CurrentMileStone" Relationship="I042500_PROJ.odata.project.A_CurrentMileStoneType" FromRole="ProjectDetailPrincipal" ToRole="CurrentMileStoneDependent"/>
<NavigationProperty Name="_Milestones" Relationship="I042500_PROJ.odata.project.A_MilestonesType" FromRole="ProjectDetailPrincipal" ToRole="MilestonesDependent"/>
</EntityType>


<EntityType Name="CurrentMileStoneType">
<Key>
<PropertyRef Name="PID"/>
</Key>
<Property Name="PID" Type="Edm.Int32" Nullable="false"/>
<Property Name="MID" Type="Edm.Int32" Nullable="false"/>
<Property Name="M_NAME" Type="Edm.String" MaxLength="100"/>
<Property Name="IS_DELAYED" Type="Edm.Int32" Nullable="false"/>
<Property Name="DAYS_DELAYED" Type="Edm.Int32"/>
</EntityType>


<EntityType Name="MilestonesType">
<Key>
<PropertyRef Name="PID"/>
<PropertyRef Name="MID"/>
</Key>
<Property Name="PID" Type="Edm.Int32" Nullable="false"/>
<Property Name="MID" Type="Edm.Int32" Nullable="false"/>
<Property Name="M_NAME" Type="Edm.String" MaxLength="100"/>
<Property Name="IS_DELAYED" Type="Edm.Int32" Nullable="false"/>
<Property Name="DAYS_DELAYED" Type="Edm.Int32"/>
<Property Name="SDATE_PLANNED" Type="Edm.DateTime"/>
<Property Name="SDATE_ACTUAL" Type="Edm.DateTime"/>
<Property Name="EDATE_PLANNED" Type="Edm.DateTime"/>
<Property Name="EDATE_PREDICTED" Type="Edm.DateTime"/>
<Property Name="EDATE_ACTUAL" Type="Edm.DateTime"/>
<Property Name="IS_CURRENT" Type="Edm.Int32"/>
</EntityType>


<Association Name="A_CurrentMileStoneType">
<End Type="I042500_PROJ.odata.project.ProjectDetailType" Role="ProjectDetailPrincipal" Multiplicity="1"/>
<End Type="I042500_PROJ.odata.project.CurrentMileStoneType" Role="CurrentMileStoneDependent" Multiplicity="1"/>
</Association>


<Association Name="A_MilestonesType">
<End Type="I042500_PROJ.odata.project.ProjectDetailType" Role="ProjectDetailPrincipal" Multiplicity="1"/>
<End Type="I042500_PROJ.odata.project.MilestonesType" Role="MilestonesDependent" Multiplicity="*"/>
</Association>


<EntityContainer Name="project" m:IsDefaultEntityContainer="true">
<EntitySet Name="ProjectDetail" EntityType="I042500_PROJ.odata.project.ProjectDetailType"/>
<EntitySet Name="CurrentMileStone" EntityType="I042500_PROJ.odata.project.CurrentMileStoneType"/>
<EntitySet Name="Milestones" EntityType="I042500_PROJ.odata.project.MilestonesType"/>
<AssociationSet Name="A_CurrentMileStone" Association="I042500_PROJ.odata.project.A_CurrentMileStoneType">
<End Role="ProjectDetailPrincipal" EntitySet="ProjectDetail"/>
<End Role="CurrentMileStoneDependent" EntitySet="CurrentMileStone"/>
</AssociationSet>
<AssociationSet Name="A_Milestones" Association="I042500_PROJ.odata.project.A_MilestonesType">
<End Role="ProjectDetailPrincipal" EntitySet="ProjectDetail"/>
<End Role="MilestonesDependent" EntitySet="Milestones"/>
</AssociationSet>
</EntityContainer>


<Annotations Target="I042500_PROJ.odata.project.ProjectDetailType/PHASE_ID" Qualifier="VisualFilter" xmlns="http://docs.oasis-open.org/odata/ns/edm">

<Annotation Term="Common.ValueList">
<Record>
<PropertyValue Property="Label" String="Project Phase"/>
<PropertyValue Property="CollectionPath" String="ProjectDetail"/>
<PropertyValue Bool="false" Property="SearchSupported"/>
<PropertyValue Property="Parameters">

<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="PHASE_ID"/>
<PropertyValue Property="ValueListProperty" PropertyPath="PHASE_ID"/>
</Record>
</Collection>

</PropertyValue>
<PropertyValue Property="PresentationVariantQualifier" String="PV_PHASE"/>
</Record>
</Annotation>
</Annotations>

<Annotations Target="I042500_PROJ.odata.project.ProjectDetailType" xmlns="http://docs.oasis-open.org/odata/ns/edm">

<Annotation Term="UI.SelectionFields">
<Collection>
<PropertyPath>PHASE_ID</PropertyPath>
</Collection>
</Annotation>

<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="P_NAME"/>
<PropertyValue Property="Label" String="{@i18n>PROJECT_NAME}"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="C_NAME"/>
<PropertyValue Property="Label" String="{@i18n>CUSTOMER_NAME}"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="_CurrentMileStone/M_NAME"/>
<PropertyValue Property="Label" String="{@i18n>CURRENT_MILESTONE}"/>
</Record>
</Collection>
</Annotation>

<Annotation Term="UI.PresentationVariant" Qualifier="PV_PHASE">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="SortOrder"/>
<PropertyValue Property="GroupBy">
<Collection>
<PropertyPath>PHASE_ID</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="TotalBy"/>
<PropertyValue Property="Total"/>
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.Chart#DETAIL_PHASE_ID</AnnotationPath>
</Collection>
</PropertyValue>
<PropertyValue Property="RequestAtLeast"/>
</Record>
</Annotation>

<Annotation Term="UI.Chart" Qualifier="DETAIL_PHASE_ID">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut"/>

<PropertyValue Property="Measures">
<Collection>
<PropertyPath>CR_NUMBER</PropertyPath>
</Collection>
</PropertyValue>


<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath="CR_NUMBER"/>
<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
</Record>
</Collection>
</PropertyValue>


<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>PHASE_ID</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPath="PHASE_ID"/>
<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
</Record>
</Collection>
</PropertyValue>


<PropertyValue Property="Actions"/>
</Record>
</Annotation>


</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

Thanks and Best Regards

Shady

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Shady ,

Good day

I am also facing the same issue. were you able to resolve it . If yes can you please let me know the solution for this.

Thanks,

Saranya Sakthi.