P_PERSONWORKAGRMTORGLDETAILS1

DDL: P_PERSONWORKAGRMTORGLDETAILS1 Type: view_entity COMPOSITE Package: VDM_WFD_WORK_FORCE

ZI_PersonWorkAgrmtOrglDetails1

P_PERSONWORKAGRMTORGLDETAILS1 is a Composite CDS View that provides data about "ZI_PersonWorkAgrmtOrglDetails1" in SAP S/4HANA. It reads from 3 data sources (I_CostCenter, I_WorkAssignmentDetailsAll, I_WorkAssignmentDetailsAll) and exposes 24 fields with key fields PersonWorkAgreement, StartDate, EndDate, StartDate, EndDate. It has 3 associations to related views. Part of development package VDM_WFD_WORK_FORCE.

Data Sources (3)

SourceAliasJoin Type
I_CostCenter CostCenter inner
I_WorkAssignmentDetailsAll dets from
I_WorkAssignmentDetailsAll dets union_all

Associations (3)

CardinalityTargetAliasCondition
[1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..*] I_PersonWorkAgrmtJobText _PersonWorkAgrmtJobText $projection.Job = _PersonWorkAgrmtJobText.Job and _PersonWorkAgrmtJobText.EndDate >= $projection.EndDate and _PersonWorkAgrmtJobText.StartDate <= $projection.EndDate
[0..*] I_OrganizationalUnitText _OrganizationalUnitText $projection.OrganizationalUnit = _OrganizationalUnitText.OrganizationalUnit and _OrganizationalUnitText.EndDate >= $projection.EndDate and _OrganizationalUnitText.StartDate <= $projection.EndDate

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label ZI_PersonWorkAgrmtOrglDetails1 view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY PersonWorkAgreement
KEY StartDate
KEY EndDate
CompanyCode I_WorkAssignmentDetailsAll CompanyCode
CostCenter I_WorkAssignmentDetailsAll CostCenter
Job
OrganizationalUnit
PersonWorkAgrmtAuthznGrpg
ControllingArea I_CostCenter ControllingArea
ValidityEndDate I_CostCenter ValidityEndDate
_CompanyCode _CompanyCode
_PersonWorkAgrmtJobText _PersonWorkAgrmtJobText
KEY StartDate
KEY EndDate
CompanyCode I_WorkAssignmentDetailsAll CompanyCode
CostCenter I_WorkAssignmentDetailsAll CostCenter
Job
OrganizationalUnit
PersonWorkAgrmtAuthznGrpg
ControllingArea
ValidityEndDate
_CompanyCode _CompanyCode
_PersonWorkAgrmtJobText _PersonWorkAgrmtJobText
_OrganizationalUnitText _OrganizationalUnitText
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'ZI_PersonWorkAgrmtOrglDetails1'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
@VDM.viewType: #COMPOSITE
@VDM.private:true
define view entity P_PERSONWORKAGRMTORGLDETAILS1
  as select from I_WorkAssignmentDetailsAll as dets
    inner join   I_CostCenter     as CostCenter on  dets.CostCenter             =  CostCenter.CostCenter
                                                and dets.CompanyCode            =  CostCenter.CompanyCode
                                                and CostCenter.ValidityEndDate   >= dets.WorkAssignmentEndDate
                                                and CostCenter.ValidityStartDate <= dets.WorkAssignmentEndDate

  association [1]    to I_CompanyCode            as _CompanyCode            on  $projection.CompanyCode = _CompanyCode.CompanyCode

  association [0..*] to I_PersonWorkAgrmtJobText as _PersonWorkAgrmtJobText on  $projection.Job                   = _PersonWorkAgrmtJobText.Job
                                                                            and _PersonWorkAgrmtJobText.EndDate   >= $projection.EndDate
                                                                            and _PersonWorkAgrmtJobText.StartDate <= $projection.EndDate
  association [0..*] to I_OrganizationalUnitText as _OrganizationalUnitText on  $projection.OrganizationalUnit    = _OrganizationalUnitText.OrganizationalUnit
                                                                            and _OrganizationalUnitText.EndDate   >= $projection.EndDate
                                                                            and _OrganizationalUnitText.StartDate <= $projection.EndDate
{
  key  cast( dets.WorkAssignment as persno preserving type ) as PersonWorkAgreement,
       @Semantics.businessDate.from
  key  cast( dets.WorkAssignmentStartDate as begda preserving type )           as StartDate,
       @Semantics.businessDate.to
  key  cast( dets.WorkAssignmentEndDate as endda preserving type )             as EndDate,
       dets.CompanyCode                                          as CompanyCode,
       dets.CostCenter                                           as CostCenter,
       cast( dets.WorkforcePersonJobCode as stell )                             as Job,
       cast( '' as orgeh )                                        as OrganizationalUnit,
       cast( '' as vdsk1 )                                        as PersonWorkAgrmtAuthznGrpg,
       CostCenter.ControllingArea,
       CostCenter.ValidityEndDate,

       _CompanyCode,
       //_CostCenter,

       _PersonWorkAgrmtJobText,
       _OrganizationalUnitText
}
where
      dets.CompanyCode           <> ''
//  and dets.technical_inactive_ind is initial

  and dets.CostCenter            <> ''


union all

select from I_WorkAssignmentDetailsAll as dets


association [1]    to I_CompanyCode            as _CompanyCode            on  $projection.CompanyCode = _CompanyCode.CompanyCode

association [0..*] to I_PersonWorkAgrmtJobText as _PersonWorkAgrmtJobText on  $projection.Job                   = _PersonWorkAgrmtJobText.Job
                                                                          and _PersonWorkAgrmtJobText.EndDate   >= $projection.EndDate
                                                                          and _PersonWorkAgrmtJobText.StartDate <= $projection.EndDate
association [0..*] to I_OrganizationalUnitText as _OrganizationalUnitText on  $projection.OrganizationalUnit    = _OrganizationalUnitText.OrganizationalUnit
                                                                          and _OrganizationalUnitText.EndDate   >= $projection.EndDate
                                                                          and _OrganizationalUnitText.StartDate <= $projection.EndDate
{
  key  cast( dets.WorkAssignment as persno preserving type ) as PersonWorkAgreement,

  key  cast( dets.WorkAssignmentStartDate as begda preserving type )           as StartDate,

  key  cast( dets.WorkAssignmentEndDate as endda preserving type )             as EndDate,
       dets.CompanyCode                                          as CompanyCode,
       dets.CostCenter                                           as CostCenter,
       cast( dets.WorkforcePersonJobCode as stell )                             as Job,
       cast( '' as orgeh )                                        as OrganizationalUnit,
       cast( '' as vdsk1 )                                        as PersonWorkAgrmtAuthznGrpg,
       ''                                                         as ControllingArea,
       cast ( '00000000' as datbi)                                as ValidityEndDate,
       _CompanyCode,
       //_CostCenter,

       _PersonWorkAgrmtJobText,
       _OrganizationalUnitText
}
where
      dets.CompanyCode           <> ''
//  and dets.technical_inactive_ind is initial

  and dets.CostCenter            =  ''