SAP Knowledge Base Article - Public

3246792 - Cannot output sum aggregation with Custom CDS Views


You want to create an item that outputs the total value for each aggregate key in the custom CDS View output item. However, even if "Sum" is set for Aggregation, the total value cannot be output as expected.




Unfortunately, aggregations cannot be achieved through the Custom CDS views app, this is a limitation. Aggregations are used to define the interpretation of numeric data e.g. in an analytical scenario. As a result to setting an aggregation, a field is e.g. interpreted as measure when you use it in a custom analytical query later on. That's why you must define an aggregation behavior for each numeric field in an analytical scenario, except for the representative key. Optionally, you can also define timestamps and dates as measures if this is required for your business case.


The aggregations are only covered in the analytical scenario together with Custom Analytical Queries app. There are no plans to include this functionality in the Custom CDS Views app. But it should be possible to achieve it with Embedded Steampunk.

See Also

For more conceptual details, about analytical scenarios, refer to Analytical Scenarios: Dimensions and Cubes.

For more information about what to take into account and about how to create dimensions and cubes, refer to Creating a Dimension and Creating a Cube.

You can also check 3201919 - Custom CDS Views – Frequently Asked Questions


sum, aggregation, custom cds views, analytical scenarios, output , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem


SAP S/4HANA Cloud all versions