@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Book revenue in period' define view entity {{P}}I_BOOK_REVENUE with parameters p_from : abap.dats, p_to : abap.dats as select from {{p}}book as bk inner join {{p}}sale as sl on sl.book_id = bk.book_id { key bk.book_id as book_id, bk.title as title, bk.category as category, max( sl.quantity ) as sold_quantity, sum( cast( sl.quantity as abap.dec( 10, 0 ) ) * bk.price ) as revenue } where sl.sale_date between $parameters.p_from and $parameters.p_to group by bk.book_id, bk.title, bk.category