cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Chart - TypeError: Cannot read properties of undefined (reading 'findQueryResultByName')

0 Kudos
154

SAP BTP Fiori App Generator Chart issue :
TypeError: Cannot read properties of undefined (reading 'findQueryResultByName')
at q._setIsAnalyticalProperty (Chart-dbg.js:2041:41)

my metadata.xml :
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" xmlns:c4c="http://www.sap.com/Protocols/C4CData" Version="1.0">
<edmx:DataServices>
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="activity" xml:lang="en" sap:schema-version="1">
<EntityType Name="Tasks" sap:value-list="true"
sap:content-version="1">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" />
<Property Name="Subject" Type="Edm.String"/>
<Property Name="StatusText" Type="Edm.String"/>
<Property Name="Processor" Type="Edm.String" sap:aggregation-role="dimension"/>
<Property Name="CompletionPercent" Type="Edm.Decimal" Precision="5" Scale="2" sap:aggregation-role="measure"/>
</EntityType>
<EntityContainer Name="activity" m:IsDefaultEntityContainer="true">
<EntitySet Name="TasksCollection" EntityType="activity.Tasks" sap:creatable="false"
sap:updatable="false" sap:deletable="false" sap:requires-filter="true" sap:content-version="1"/>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

My annotation.xml :
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Analytics.xml">
<edmx:Include Namespace="com.sap.vocabularies.Analytics.v1" Alias="Analytics"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
<edmx:Reference Uri="/sap/c4c/odata/v1/activity/$metadata">
<edmx:Include Namespace="activity"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
<Annotations Target="activity.Tasks">
<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="ObjectID"/>
<PropertyValue Property="Label" String="Object ID"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Subject"/>
<PropertyValue Property="Label" String="Subject"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="StatusText"/>
<PropertyValue Property="Label" String="Status Text"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Processor"/>
<PropertyValue Property="Label" String="Processor"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="CompletionPercent"/>
<PropertyValue Property="Label" String="Completion Percent"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>

<Annotation Term="UI.Chart" Qualifier="Default">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="Description" String="Appointments Count per Organizer"/>
<PropertyValue Property="Title" String="Appointments Count"/>
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Column"/>
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>Processor</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPath="Processor"/>
<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>CompletionPercent</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath="CompletionPercent"/>
<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>

<Annotation Term="UI.PresentationVariant">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="Text" String="Default"/>
<PropertyValue Property="SortOrder">
<Collection>
<Record Type="Common.SortOrderType">
<PropertyValue Property="Property" PropertyPath="Processor"/>
<PropertyValue Property="Descending" Bool="false"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="IncludeGrandTotal" Bool="false"/>
<PropertyValue Property="InitialExpansionLevel" Int="0"/>
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.LineItem</AnnotationPath>
<AnnotationPath>@UI.Chart#Default</AnnotationPath>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

My TaskCollection Sample API is 

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "type": "activity.Tasks",
                    "etag": "W/\"datetimeoffset'2024-10-07T11%3A28%3A56.4645160Z'\""
                },
                "ObjectID": "00163EA88D161EDABCA1799E7F300752",
                "DocumentType": "Z001",
                "DocumentTypeText": "Strategic Account Task",
                "ID": "123",
                "Subject": "Strategic Account Request",
                "Status": "2",
                "StatusText": "In Process",
                "StartDateTime": "/Date(1599485400000)/",
                "StartDatetimeZoneCode": "EST",
                "StartDatetimeZoneCodeText": "Eastern Time (New York)",
                "ActivityList": null,
                "DueDateTime": "/Date(1599487200000)/",
                "DueDatetimeZoneCode": "EST",
                "DueDatetimeZoneCodeText": "Eastern Time (New York)",
                "PlannedDuration": "",
                "ActualDuration": "",
                "CompletionDateTime": null,
                "MainEmployeeResponsiblePartyID": "8000002228",
                "MainAccountPartyID": "1000120",
                "MainContactPartyID": "",
                "ProcessorPartyID": "8000002228",
                "CompletionPercent": "0.00",
                "Category": "0005",
                "CategoryText": "Preparation",
                "PriorityCode": "3",
                "PriorityCodeText": "Normal",
                "SalesTerritoryID": "19",
                "SalesTerritoryName": "Commercial",
                "SalesOrganisationID": "COM",
                "DistributionChannelCode": "01",
                "DistributionChannelCodeText": "Direct sales",
                "DivisionCode": "",
                "DivisionCodeText": "",
                "Account": "A.011495.0000",
                "AccountUUID": "00163EA8-8D4F-1EDA-B1FC-2053383B9FAC",
                "DataOriginTypeCode": "1",
                "DataOriginTypeCodeText": "Manual Data Entry",
                "Owner": "Ken Mills",
                "OwnerUUID": "00163EA8-8D7E-1EDA-BBDA-EA09AE216EDB",
                "PrimaryContact": "",
                "PrimaryContactUUID": null,
                "Processor": "Ken Mills",
                "ProcessorEmailURI": "ken_mills@test.com.tst",
                "ProcessorPartyName": "Ken Mills",
                "ProcessorUUID": "00163EA8-8D7E-1EDA-BBDA-EA09AE216EDB",
                "ReportedDateTime": "/Date(1599485400000)/",
                "UUID": "00163EA8-8D16-1EDA-BCA1-799E7F300752",
                "ChangedBy": "",
                "LastChangeDateTime": "/Date(1728300536464)/",
                "MandatoryFlag": false,
                "EntityLastChangedOn": "/Date(1728300536464)/",
                "ETag": "/Date(1728300536464)/",
                "CreatedBySSI": "",
                "CreatedBySSIText": "",
                "CloseDate_KUT": null,
                "DurkanEmailID_KUT": "",
                "MyRVPHasApprovedThisRequest_KUT": false,
                "VisitSurvey_KUT": "",
                "TasksTextCollection": {
                    "__deferred": {
                    }
                },
                "TasksBTDReference": {
                    "__deferred": {
                    }
                },
                "TasksInvolvedParties": {
                    "__deferred": {
                    }
                },
                "TasksAttachmentFolder": {
                    "__deferred": {
                    }
                }
            }
        ]
    }
}




Accepted Solutions (0)

Answers (0)