cancel
Showing results for 
Search instead for 
Did you mean: 

CAP: Analytical query does not expand on descriptions

jthuijls
Participant

Hi,

Noticing that the annotations for descriptions are not properly expanding when using an analytical query. Perhaps I'm not using the correct annotations, I have not tried this in ABAP CDS either. Let's assume the following sample:

entity Orders: cuid, managed {
  customer: Association to Customers;
  total: Decimals(9,2);
}

entity Customers: cuid, managed {
  name: String(100)
}
@sap.semantics: 'aggregate'
annotate OrderService.Orders with @(
  Analytics: {
    Query: true
  },
) {
 customer @(
   Common: {
     Text: customer.name,
     TextArrangement : #TextOnly,
     Label : '{i18n>Customer}'
   }
 );
 total @DefaultAggregation: #SUM @sap.aggregation.role: 'measure';
}

Without the analytics parts, this expand results in the customer name being displayed since the data is fetched. With the analytics bit enabled and the aggregations taking place, customer name is *not* fetched since the expand does not exist.

OrdersAnalytics?$skip=0&$top=20&$select=month,total,customer_ID,customer/name,ID&$expand=customer&$inlinecount=allpages

What's the best way of dealing with this?

0 Kudos

Hello Jorg,

Did you find a solution for this issue I have the same one now.

Regards,

Yosra

Accepted Solutions (0)

Answers (0)