Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to access aggregates values from SAP HANA xS oData

$
0
0

Hi Rohit,

 

You can aggregate the columns of objects (without metadata) that are necessary for the derivation of aggregation

by explicitly denoting the column names and the functions to use, as illustrated in the following example of a

service definition: sample.odata:aggrexpl.xsodata

service {

"sample.odata::revenues" as "Revenues"

keys generate local "ID"

aggregates always (SUM of "Amount");

}

 

The results of the entity set Revenues always contain the aggregated value of the column Amount. To extract the aggregated revenue amount per year, add $select=Year,Amount to your requested URI.

 

When there are unquie id's(like sales order number) in the result of the odata call then Aggregation will not happen, remove the unique id by using $select in the URI without the uniqueid

 

Best Regards,
Ranjit


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>