Files
abap-llm/tasks_gen/train/G1011/faulty/m4_i_repair_charge.ddls.asddls

16 lines
692 B
Plaintext

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Repair charge per customer'
define view entity {{P}}I_REPAIR_CHARGE
as select from {{p}}job as job
inner join {{p}}rate as rate on rate.shoe_type = job.shoe_type
and rate.repair_type = job.repair_type
{
key job.customer as customer,
count( * ) as job_count,
sum( job.pairs ) as total_pairs,
sum( cast( job.pairs as abap.dec( 10, 0 ) ) * rate.price ) as total_charge
}
where job.job_state <> 'D'
group by
job.customer