I am working on ABAP CDS view and stuck somewhere, actually i have date and amount field and i have to show sum of amount year wise, but when i run below query it didnt group by on year and show year multiple time
@AbapCatalog.sqlViewName: 'ZTEST'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sales Cash Flow Report'
@VDM.viewType: #CONSUMPTION
@Analytics.dataCategory: #CUBE
define view ZRESV07 as select from vicdcfpay as PAY
{
left(PAY.dfaell,4) as Year
sum(PAY.bkond) as Amount
}
group by PAY.dfaell