P_RSHAssignment

DDL: P_RSHASSIGNMENT SQL: PRSHASSIGN Type: view COMPOSITE

P_RSHAssignment is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_RSHProjectAssignment) and exposes 8 fields with key field ProjAssignmentUUID. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_RSHProjectAssignment ProjectAssignment from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_PersonWorkAgreement_1 _PersonWorkAgreement _PersonWorkAgreement.PersonWorkAgreement = $projection.EmploymentInternalID

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PRSHASSIGN view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY ProjAssignmentUUID I_RSHProjectAssignment ProjAssignmentUUID
ResourceDemandUUID I_RSHProjectAssignment ResourceDemandUUID
EmploymentInternalID I_RSHProjectAssignment EmploymentInternalID
ProjAssignmentStartDate I_RSHProjectAssignment ProjAssignmentStartDate
ProjAssignmentEndDate I_RSHProjectAssignment ProjAssignmentEndDate
AssignedHours I_RSHProjectAssignment ProjAssignmentTotalHours
AuthorizationGroup
IsBusinessPurposeCompleted
@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
}