Skip to Content
0
Sep 13, 2023 at 06:06 AM

'AggregatableProperties' parameter not work for object page table section in LROP

146 Views

Hello experts,

I am new for CAP. I had two problems after I set the 'AggregatableProperties' parameter. The first problem is the 'AggregatableProperties' parameter not work. The second peoblem is other columns not have value except groupableProperties. Any relevant documentation is fine. Thank you very much! Here is my CAP CDS code:

 
annotate service.DeviationItemsByQuantity with @(
Aggregation.CustomAggregate #quantityDifference : 'Edm.Decimal',
Aggregation.CustomAggregate #quantityRelatedNetValueDifference : 'Edm.Decimal',
) {
quantityDifference @Aggregation.default: #SUM;
quantityRelatedNetValueDifference @Aggregation.default: #SUM;
};

annotate service.DeviationItemsByQuantity with @Aggregation.ApplySupported : {
GroupableProperties : [
deliveryNumber,
deliveryItemNumber,
],
AggregatableProperties : [
{Property : quantityDifference },
{Property : quantityRelatedNetValueDifference }
],
};

annotate service.DeviationItemsByQuantity with @UI.PresentationVariant : {
GroupBy : [ // default grouping in table
deliveryNumber,
deliveryItemNumber
],
Total : [ // default aggregation in table
quantityDifference
],
Visualizations : [
'@UI.LineItem',
]
};

annotate service.DeviationItemsByQuantity with @(
UI.LineItem : [
{
Value : deliveryNumber,
Label : '{i18n>deliveryNumber}'
},{
Value : deliveryItemNumber,
Label : '{i18n>deliveryItemNumber}'
},{
Value : quantityDifference,
Label : '{i18n>quantityDifference}'
},{
Value : quantityRelatedNetValueDifference,
Label : '{i18n>quantityRelatedNetValueDifference}'
},{
Value : approved,
Label : '{i18n>approved}'
},

]
);