@AbapCatalog.sqlViewName: 'PRSHASSIGN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: Resource Assignments
Specification: This View returns the details of assignment (header) per resource and resource request
- this means that 0..1 assignment (header) is returned per each combination of resource and resource request
- Durations of Daily Assignments per Resource & Request are added up by selected I-View
- Start & End Date are determined as min & max Start & End of Daily Assignments per Resource & Request by selected
- Assignment GUID refers to assignment header per resource & Request
Requires: No
Ensures: All request specific assigned resources are returned.
Owners: TR
Contributors: TR, JS
Unit Test required Y/N: No
Additional comments NOTE: for now, this view will only return 0..1 assignment per request because multiple supply
line items are not allowed yet on project side!!!!
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHAssignment
as select from I_RSHProjectAssignment as ProjectAssignment
//Cardinality is correct: 1 work agreement can only be assigned to 1 person (ID) but 1 person (ID) to several work agreements
association [0..1] to I_PersonWorkAgreement_1 as _PersonWorkAgreement on _PersonWorkAgreement.PersonWorkAgreement = $projection.EmploymentInternalID
{
key ProjectAssignment.ProjAssignmentUUID as ProjAssignmentUUID,
ProjectAssignment.ResourceDemandUUID as ResourceDemandUUID,
ProjectAssignment.EmploymentInternalID as EmploymentInternalID,
ProjectAssignment.ProjAssignmentStartDate as ProjAssignmentStartDate,
ProjectAssignment.ProjAssignmentEndDate as ProjAssignmentEndDate,
ProjectAssignment.ProjAssignmentTotalHours as AssignedHours,
_PersonWorkAgreement._WorkforcePerson.AuthorizationGroup,
_PersonWorkAgreement._WorkforcePerson.IsBusinessPurposeCompleted
}