cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Retrieve Aggregated Data from a CDS View Cube in ABAP?

Hxseyn
Explorer
0 Kudos
830

Hello everyone,

I am still relatively new to working with CDS views and have little experience in this area. I have created an analytical CDS view (cube) and an analytical query in SAP.

In the transaction RSRTS_ODP_DIS (Transient Provider) I can view the aggregated result of my CDS View Cube - in my case several totals. However, when I run the CDS View Cube in Eclipse, it behaves like a normal CDS View and does not perform any aggregations or calculations.

My question: How can I programmatically retrieve the aggregated result of the CDS View Cube that I see in transaction RSRTS_ODP_DIS within in a class or ABAP program?
My goal is to enrich this aggregated data in a DPC class with additional information and then make it available in an OData service via a function import.

Has anyone encountered a similar scenario or has an idea how to achieve this?

Thanks in advance!

View Entire Topic
junwu
SAP Champion
SAP Champion
0 Kudos
Hxseyn
Explorer
0 Kudos
Thank you for your answer. I have tested this and successfully called my query with DATA(lr_std_query) = NEW cl_lba_std_query( i_query_name = ‘MyQuery’. Is it possible that I call a CDS CUBE view with its result in my ABAP class as well?
junwu
SAP Champion
SAP Champion
0 Kudos
why you are obsessed with that? if you call cds, you have to do the aggregation by your code using sql to aggregate the data