@AbapCatalog.sqlViewName: '{{P}}VGRN' @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Green fee per tee time' define view {{P}}I_GREEN_FEE as select from {{p}}tee as tee inner join {{p}}member as mem on mem.member_id = tee.member_id { key tee.tee_id as tee_id, tee.member_id as member_id, mem.member_kind as member_kind, tee.day_kind as day_kind, tee.player_count as player_count, case mem.member_kind when 'J' then case tee.day_kind when 'W' then cast( 8 as abap.dec(7,2) ) * tee.player_count when 'E' then cast( 12 as abap.dec(7,2) ) * tee.player_count else cast( 12 as abap.dec(7,2) ) * tee.player_count end when 'S' then case tee.day_kind when 'W' then cast( 20 as abap.dec(7,2) ) * tee.player_count when 'E' then cast( 30 as abap.dec(7,2) ) * tee.player_count else cast( 35 as abap.dec(7,2) ) * tee.player_count end else case tee.day_kind when 'W' then cast( 35 as abap.dec(7,2) ) * tee.player_count when 'E' then cast( 55 as abap.dec(7,2) ) * tee.player_count else cast( 60 as abap.dec(7,2) ) * tee.player_count end end as green_fee }