on 12-19-2017 6:33 PM
Hi:
I have a stupid simple SAP Cloud Platform Calculation View that has three dimensions (Employee, Calendar Year, and Calendar Month) and one measure (Number of calls). I have also created a .xsodata file to expose this as an OData service. In the .xsodata file, I've added the following:
annotations {
enable OData4SAP;
}
I am seeing the sap:label in the EDMX file, but am I also able to add/see the sap:aggregation-role, too?
Thanks in advance, Ian.
The key is to specify the aggregation in the .xsodata file with the 'aggregates always' clause.
The complete service description is:
service namespace "CCO.com.sap.nacco.service" {
"CV_CONTACT_BYMONTH_V2" as "ContactByMonthSet" with ("CALMONTH", "CALYEAR", "CONTACT_COUNT", "ContactType", "FullName") key generate local "GenID" aggregates always (SUM of "CONTACT_COUNT");
}
annotations {
enable OData4SAP;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want aggregation to your properties, put this annotation above the property :
@DefaultAggregation: #SUM
Regards,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.