on 08-28-2023 9:50 AM
Hi experts,
I have a CDS View with UI annotations. It should display a bar chart in a object page. It works fine:
Here is my CDS:
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Order operations values in line'
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@UI.chart: [
{
title: 'Test Chart',
chartType: #BAR_STACKED,
dimensions: [
'OrderInternalID'
],
measures: [
'Operation1', 'Operation2', 'Operation3', 'Operation4', 'Operation5', 'Operation6', 'Operation7', 'Operation8', 'Operation9', 'Operation10'
],
measureAttributes: [{
measure: 'Operation1',
asDataPoint: true
},
{
measure: 'Operation2',
asDataPoint: true
},
{
measure: 'Operation3',
asDataPoint: true
}
]
}
]
define view entity ZI_OrderOperationsLine
as select from ZI_OrderOperationsValues
{
@EndUserText.label: 'OrderInternalID'
@UI.lineItem: [{importance: #HIGH }]
@UI.selectionField: [{element: 'OrderInternalID' }]
key OrderInternalID,
WorkQtyUnit,
@Semantics.quantity.unitOfMeasure: 'WorkQtyUnit'
@DefaultAggregation: #SUM
@EndUserText.label: 'Jednicka'
sum(Operation1) as Operation1,
max(OperationText1) as OperationText1,
@Semantics.quantity.unitOfMeasure: 'WorkQtyUnit'
@DefaultAggregation: #SUM
@EndUserText.label: 'Dvojka'
sum(Operation2) as Operation2,
max(OperationText2) as OperationText2,
@Semantics.quantity.unitOfMeasure: 'WorkQtyUnit'
@EndUserText.label: 'Trojka'
@DefaultAggregation: #SUM
@UI.lineItem: [{importance: #HIGH }]
@UI.selectionField: [{element: 'Operation3' }]
sum(Operation3) as Operation3,
max(OperationText3) as OperationText3,
@Semantics.quantity.unitOfMeasure: 'WorkQtyUnit'
@DefaultAggregation: #SUM
@EndUserText.quickInfo: 'ctyrka'
sum(Operation4) as Operation4,
max(OperationText4) as OperationText4,
The problem is there should by a label with description and value.
Something like this:
here is the data structure:
Can I achieve it with CDS annotations or is it impossible. If so is there a way with "free style" and vizFrame?
Thank you very much.
Jarda
thank you for your response, i used an approximative logique and it's worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.