Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
23 lines
955 B
Plaintext
23 lines
955 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Project effort'
|
|
define view entity {{P}}I_PROJ_EFFORT
|
|
as select from {{p}}proj as proj
|
|
inner join {{p}}asgn as asgn on asgn.proj_id = proj.proj_id
|
|
{
|
|
key proj.proj_id as proj_id,
|
|
proj.proj_name as proj_name,
|
|
count( * ) as assign_count,
|
|
sum( asgn.work_hours ) as total_hours,
|
|
sum( cast( asgn.work_hours as abap.dec( 15, 2 ) ) * asgn.rate ) as total_cost,
|
|
case
|
|
when sum( cast( asgn.work_hours as abap.dec( 15, 2 ) ) * asgn.rate ) > proj.budget
|
|
then 'X'
|
|
else 'N'
|
|
end as over_budget
|
|
}
|
|
where asgn.status = 'A'
|
|
group by
|
|
proj.proj_id,
|
|
proj.proj_name,
|
|
proj.budget
|