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

23 lines
811 B
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 rental.car_group
when 'C' then case rental.season when 'H' then 96 else 80 end
when 'B' then case rental.season when 'H' then 60 else 50 end
else case rental.season when 'H' then 36 else 30 end
end
* case when rental.rental_days >= 7 then rental.rental_days - 1 else rental.rental_days end
+ case rental.car_group
when 'C' then 25
when 'B' then 15
else 11
end
as abap.dec( 15, 2 ) ) as fee
}