2019 Mar 23 1:34 AM - edited 2024 Feb 04 12:41 AM
Dear Sap Community,
I ask kindly if there is a way fro insert in the custom CDS View the possibility to create a subtotal grouped for Company and Customer (fr example)
Thanks a lot in advance
Natale
Request clarification before answering.
Hi Natale
In addition to Jeroen's suggestion, when you create your custom CDS view you can use the SUM Aggregation on the Field Properties tab. Then if you select the field in your OData call, it will come back with the subtotal value.
For example, let's say you have CompanyCode, Customer and AmountInTransactionCurrency on a CDS view. On the Field Properties tab, if you select Sum in the Aggregation drop down and then if you call OData URL ?$select=AmountInTransactionCurrency,CompanyCode,Customer you will get a single record back with the entire transaction records aggregated. If you don't explicitly select AmountInTransactionCurrency, you would get all of the records back.
Thanks,
Marty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
15 | |
8 | |
7 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.