@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Call charge' define view entity {{P}}I_CALL_CHARGE as select from {{p}}calls { key call_id as call_id, customer as customer, cast( ceil( cast( duration_sec as abap.dec(15,2) ) / 60 ) as abap.int4 ) as billable_min, cast( case dest_type when 'N' then 9 when 'I' then 25 else 15 end as abap.dec(5,2) ) / 100 as rate, cast( round( cast( ceil( cast( duration_sec as abap.dec(15,2) ) / 60 ) as abap.dec(15,2) ) * ( cast( case dest_type when 'N' then 9 when 'Z' then 25 else 15 end as abap.dec(5,2) ) / 100 ) * case when duration_sec > 1800 then cast( 90 as abap.dec(5,2) ) / 100 else cast( 100 as abap.dec(5,2) ) / 100 end , 2 ) as abap.dec(15,2) ) as charge }