Getting unexpected key 'ID ' in metadata after adding @DefaultAggregation: #SUM in my cds
If I remove the @DefaultAggregation: #SUM annotation, the error disappears. However, our business requirements state that we must display the total at the end, so this annotation is necessary. Please let me know if there are any solutions for this issue."
below is my code:
@EndUserText.label: 'Order Cost Analytics'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@vdm.viewType: #CONSUMPTION
@ObjectModel.usageType: {
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@Metadata.allowExtensions: true
@analytics.dataCategory: #CUBE
@odata.publish: true
define view entity /HCLDC/C_ORDERCOSTREPORTAPP
as select from /HCLDC/I_ORDERCOSTREPORTAPPDET
{
@AnalyticsDetails.query.axis: #ROWS
key DocumentNumber,
@AnalyticsDetails.query.axis: #ROWS
@Former Member.lineItem: [{ position: 30 }]
key Object,
@AnalyticsDetails.query.axis: #ROWS
key MaintenanceNotification,
@AnalyticsDetails.query.axis: #ROWS
key ValueCategory,
@AnalyticsDetails.query.axis: #ROWS
key MaintenanceOrder,
@Former Member.lineItem: [{ position: 50 }]
@AnalyticsDetails.query.axis: #ROWS
key fiscalyear,
DocumentType,
DocumentVersion,
DocumentPart,
ControllingArea,
ObjectType,
MaintPriorityType,
MaintPriority,
MaintenanceProcessingPhase,
MaintObjectLocAcctAssgmtNmbr,
TopOrderNotification,
// @Former Member.lineItem: [{ position: 80 }]
ValueCategoryDesc,
// @Former Member.lineItem: [{ position: 90 }]
@AnalyticsDetails.query.axis: #ROWS
PlanningPlant,
@DefaultAggregation: #SUM
// @Semantics.amount.currencyCode: 'Currency'
@AnalyticsDetails.query.axis: #COLUMNS
ActualCost,
@DefaultAggregation: #SUM
// @Semantics.amount.currencyCode: 'Currency'
@AnalyticsDetails.query.axis: #COLUMNS
PlannedCost,
@DefaultAggregation: #SUM
// @Semantics.amount.currencyCode: 'Currency'
@AnalyticsDetails.query.axis: #COLUMNS
TasklistCost,
@DefaultAggregation: #SUM
@AnalyticsDetails.query.axis: #COLUMNS
ApprovalEstCost,
Equipment,
Assembly,
}
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 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.