on 2023 Aug 16 8:49 AM
Hi Experts,
I have CDS views and I want to display a chart in the Object Page. In preview (ADT) I get an error:
ApplySupported is not added to the annotations
Here are the views:
@AbapCatalog.sqlViewName: 'ZCMATPK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Material Stock'
@VDM.viewType: #CONSUMPTION
@UI.headerInfo: { typeName: 'Material' ,
typeNamePlural: 'Materials' ,
title: { type: #STANDARD , value: 'Material'} ,
description: { type: #STANDARD, value: 'MaterialName' } }
define view ZC_MaterialPK
as select from ZI_MaterialPK
association [0..*] to ZI_MaterialStock as _MaterialStock on $projection.Material = _MaterialStock.Material
{
@UI.facet: [
{ id: 'idWeight' ,
purpose: #HEADER,
label: 'Weight' ,
type: #FIELDGROUP_REFERENCE,
targetQualifier: 'hdWeight'} ,
{ id:'idGeneralInformation' ,
type: #COLLECTION ,
label: 'General Information' ,
position: 10 } ,
{ type: #IDENTIFICATION_REFERENCE ,
label : 'General Information',
parentId: 'idGeneralInformation',
id: 'idIdentification' ,
position: 10 },
{ type: #FIELDGROUP_REFERENCE ,
label : 'Last Changed',
targetQualifier: 'fgLastChanged' ,
parentId: 'idGeneralInformation' ,
id : 'idGroupLastChanged' ,
position: 20 },
{ id: 'idLineItemMatPlant' ,
type : #LINEITEM_REFERENCE ,
label : 'Plant Data' ,
position: 20 ,
targetElement: '_MaterialPlant'} ,
{ id : 'idChart' ,
type: #CHART_REFERENCE ,
label : 'Chart',
targetElement: '_MaterialStock',
position: 30 }
]
@UI.selectionField: [{ position: 10 }]
@UI.lineItem: [{ position: 10 }]
@UI.identification: [{ position: 10 }]
@ObjectModel.text.element: ['MaterialName']
key Material,
@UI.selectionField: [{ position: 20 }]
@UI.lineItem: [{ position: 20 }]
@UI.identification: [{ position: 20 }]
@ObjectModel.text.element: ['MaterialTypeName']
MaterialType,
@UI.selectionField: [{ position: 30 }]
@UI.lineItem: [{ position: 30 }]
@UI.identification: [{ position: 30 }]
@ObjectModel.text.element: ['MaterialGroupName']
MaterialGroup,
@UI.fieldGroup: [{ qualifier: 'hdWeight' , position: 10 }]
@Semantics.quantity.unitOfMeasure: 'MaterialWeightUnit'
MaterialGrossWeight,
@UI.fieldGroup: [{ qualifier: 'hdWeight' , position: 20 }]
@Semantics.quantity.unitOfMeasure: 'MaterialWeightUnit'
MaterialNetWeight,
@Semantics.unitOfMeasure: true
MaterialWeightUnit,
@UI.fieldGroup: [{ qualifier: 'fgLastChanged' , position: 10 }]
LastChangedby,
@UI.fieldGroup: [{ qualifier: 'fgLastChanged' , position: 20 }]
LastChangedOn,
MaterialTypeName,
MaterialGroupName,
MaterialName,
_MaterialPlant,
_MaterialStock
}
@AbapCatalog.sqlViewName: 'ZIMATSTK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'test'
@UI.chart: [{
title: 'Stock by Plant and St Location',
description: 'Stock by Plant' ,
chartType: #COLUMN,
dimensions: ['Plant', 'StorageLocation'],
measures: ['UnrestrictedStock']
}]
define view ZI_MaterialStock
as select from I_MaterialUnrestrictedUseStock
{
key Material,
key Plant,
key StorageLocation,
@Semantics.unitOfMeasure: true
MaterialBaseUnit,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #SUM
MatlWrhsStkQtyInMatlBaseUnit as UnrestrictedStock,
/* Associations */
_Material,
_MaterialBaseUnit,
_Plant,
_StorageLocation
}
I follow that example:
CDS-Fiori Elements – Object Page – Chart Facet
After previewing in ADT I get this error:

What annotation am I missing?
It works well with OData V2. No problem.
But I have it / want it in V4.
please help
Thanks
Jarda
Request clarification before answering.
Hi,
yes, this is a known restriction currently that RAP does not add this annotation - there is a requirement in the pipeline but is currently still a restriction. For now, you should add this as a local annotation.
Best Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.