Files
abap-llm/tasks_gen/train/G1931/seed/i_rental_fee.ddls.asddls
2026-10-05 22:08:59 +02:00

30 lines
1.3 KiB
Plaintext

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Rental fee'
define view entity {{P}}I_RENTAL_FEE
as select from {{p}}rental as rental
{
key rental.rental_id as rental_id,
rental.car_group as car_group,
rental.rental_days as rental_days,
cast(
case when rental.rental_days >= 7
then case when rental.car_group = 'C' then case when rental.season = 'H' then 96 else 80 end
when rental.car_group = 'B' then case when rental.season = 'H' then 60 else 50 end
else case when rental.season = 'H' then 36 else 30 end
end * ( rental.rental_days - 1 )
+ case when rental.car_group = 'C' then 25
when rental.car_group = 'B' then 15
else 10
end
else case when rental.car_group = 'C' then case when rental.season = 'H' then 96 else 80 end
when rental.car_group = 'B' then case when rental.season = 'H' then 60 else 50 end
else case when rental.season = 'H' then 36 else 30 end
end * rental.rental_days
+ case when rental.car_group = 'C' then 25
when rental.car_group = 'B' then 15
else 10
end
end
as abap.dec( 15, 2 ) ) as fee
}