on 07-03-2014 10:59 AM
Hi,
I recently created an OData Service with the Netweaver Gateway Service Builder (SEGW), but unfortunately the grouping of properties does not seem to work as I know it from XS OData services.
When I call the url below on an XS OData, I get a result where A and B are aggregated by YEAR
.../odata/CA_CFA.xsodata/cfa?$select=A,B,YEAR
This grouping does not work the same when I call the same $select parameter on the OData service I defined in SEGW.
The properties A and B have the semantic set to "aggregate" and YEAR is set as a dimension.
Is there a way to achieve the same behaviour with the ABAP OData service as with the XS OData service?
Thank you!
Hi,
$select will return the field specified in resultset in OData query. for e.g. http://services.odata.org/OData/OData.svc/Products?$select=Rating,Price
aggregation is not supported by OData version 2.0 on which SAP Gateway is based on.
It will be available in OData 4.0 as mentioned here OData Extension for Data Aggregation Version 4.0
you need to implement the grouping logic on client side. refer this discussion on similar lines Get a count of a linked collection using OData and LINQ - Stack Overflow
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandra,
thanks for your answer. I was not specific enough in my question.
My problem was more a backend problem of implicitly aggregating certain columns when selecting these columns with the $select url parameter as it is possible with XS OData and the setting "aggregates always". In the meantime I found out how to achieve the same behaviour with the ABAP OData Service and SADL.
Still it is good to know what is about to come with OData 4.0.
Thanks a lot.
Cheers,
Johannes
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.