P_WorkPackageList

DDL: P_WORKPACKAGELIST SQL: PWORKPACKAGELIST Type: view COMPOSITE Package: CPD_CDS

WorkPackages List (Including PPM)

P_WorkPackageList is a Composite CDS View that provides data about "WorkPackages List (Including PPM)" in SAP S/4HANA. It reads from 4 data sources (I_EnterpriseProject, I_EngagementProjFinancialPlan, I_EnterpriseProjectElement, I_EnterpriseProjectElement) and exposes 39 fields. It has 1 association to related views. Part of development package CPD_CDS.

Data Sources (4)

SourceAliasJoin Type
I_EnterpriseProject EnterpriseProject inner
I_EngagementProjFinancialPlan FinancialPlan inner
I_EnterpriseProjectElement WorkPackage from
I_EnterpriseProjectElement WorkPackage union

Associations (1)

CardinalityTargetAliasCondition
[1] I_EngagementProject _EngagementProject _EngagementProject.EngagementProjectUUID = FinancialPlan.EngagementProjectUUID

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PWORKPACKAGELIST view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view

Fields (39)

KeyFieldSource TableSource FieldDescription
Project _EngagementProject EngagementProject
EngagementProjectType _EngagementProject EngagementProjectType
EngagementProjectServiceOrg _EngagementProject EngagementProjectServiceOrg
EngagementProjectCategory _EngagementProject EngagementProjectCategory
ControllingArea _EngagementProject ControllingArea
ProfitCenter _EngagementProject ProfitCenter
ProjectElementUUID
WorkPackage I_EnterpriseProjectElement WorkPackage
WorkPackageName I_EnterpriseProjectElement WorkPackageName
WBSElementInternalID
WorkPackageStartDate I_EnterpriseProjectElement WorkPackageStartDate
WorkPackageEndDate I_EnterpriseProjectElement WorkPackageEndDate
CompanyCode _EngagementProject CompanyCode
ResponsibleCostCenter
Plant
ProjectProfileCode
EnterpriseProjectType
FunctionalArea
EmploymentInternalID EngagementProjectSupplyData EmploymentInternalID
ProjectasProject
EngagementProjectType
EngagementProjectServiceOrg
EngagementProjectCategory
ControllingArea I_EnterpriseProjectElement ControllingArea
ProfitCenter I_EnterpriseProjectElement ProfitCenter
ProjectElementUUID I_EnterpriseProjectElement ProjectElementUUID
WorkPackage I_EnterpriseProjectElement ProjectElement
WorkPackageName I_EnterpriseProjectElement ProjectElementDescription
WBSElementInternalID I_EnterpriseProjectElement WBSElementInternalID
WorkPackageStartDate I_EnterpriseProjectElement PlannedStartDate
WorkPackageEndDate I_EnterpriseProjectElement PlannedEndDate
CompanyCode I_EnterpriseProject CompanyCode
ResponsibleCostCenter I_EnterpriseProject ResponsibleCostCenter
Plant I_EnterpriseProject Plant
ProjectProfileCode I_EnterpriseProject ProjectProfileCode
EnterpriseProjectType I_EnterpriseProject EnterpriseProjectType
FunctionalArea I_EnterpriseProject FunctionalArea
EmploymentInternalID
TimePostingIsRestricted
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PWORKPACKAGELIST'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter:true

// This CDS view projects the list of WorkPackages from CPM and PPM projects


define view P_WorkPackageList
  as select distinct from  I_WorkPackage                 as WorkPackage
    inner join             I_EngagementProjFinancialPlan as FinancialPlan             on FinancialPlan.EngagementProjFinPlanUUID = WorkPackage.EngagementProjFinPlanUUID
    left outer to one join I_EngmntProjectSupplyData     as EngagementProjectSupplyData on  EngagementProjectSupplyData.WorkPackage          =  WorkPackage.WorkPackage
                                                                                   
  association [1] to I_EngagementProject as _EngagementProject on _EngagementProject.EngagementProjectUUID = FinancialPlan.EngagementProjectUUID
{
  _EngagementProject.EngagementProject           as Project,
  _EngagementProject.EngagementProjectType       as EngagementProjectType,
  _EngagementProject.EngagementProjectServiceOrg as EngagementProjectServiceOrg,
  _EngagementProject.EngagementProjectCategory   as EngagementProjectCategory,
  _EngagementProject.ControllingArea             as ControllingArea,
  _EngagementProject.ProfitCenter                as ProfitCenter,
  hextobin('00000000000000000000000000000000')   as ProjectElementUUID,
  WorkPackage.WorkPackage                        as WorkPackage,
  WorkPackage.WorkPackageName                    as WorkPackageName,
  WorkPackage._WBSElement.WBSElementInternalID   as WBSElementInternalID,
  WorkPackage.WorkPackageStartDate               as WorkPackageStartDate,
  WorkPackage.WorkPackageEndDate                 as WorkPackageEndDate,
  _EngagementProject.CompanyCode                 as CompanyCode,
  cast('          ' as kostlv preserving type )          as ResponsibleCostCenter,
  cast('    ' as werks_d preserving type )               as Plant,
  cast('       ' as profidproj preserving type )         as ProjectProfileCode,
  cast('  ' as ps_prart preserving type )                as EnterpriseProjectType,
  cast('                ' as fm_farea preserving type )  as FunctionalArea,
  EngagementProjectSupplyData.EmploymentInternalID as EmploymentInternalID,
  _EngagementProject.RestrictedTimePosting       as TimePostingIsRestricted
}
where
  _EngagementProject.EngagementProjectStage = 'P003' // In Execution


union

select from  I_EnterpriseProjectElement as WorkPackage
  inner join I_EnterpriseProject as EnterpriseProject on WorkPackage.ProjectUUID = EnterpriseProject.ProjectUUID
{
  EnterpriseProject.Project                                 as Project,
  cast('    ' as /cpd/eng_mp_type preserving type )         as EngagementProjectType,
  cast('     ' as /cpd/pws_ws_org_unit_id preserving type ) as EngagementProjectServiceOrg,
  cast('' as /cpd/eng_proj_type preserving type )           as EngagementProjectCategory,
  WorkPackage.ControllingArea                               as ControllingArea,
  WorkPackage.ProfitCenter                                  as ProfitCenter,
  WorkPackage.ProjectElementUUID                            as ProjectElementUUID,
  WorkPackage.ProjectElement                                as WorkPackage,
  WorkPackage.ProjectElementDescription                     as WorkPackageName,
  WorkPackage.WBSElementInternalID                          as WBSElementInternalID,
  WorkPackage.PlannedStartDate                              as WorkPackageStartDate,
  WorkPackage.PlannedEndDate                                as WorkPackageEndDate,
  EnterpriseProject.CompanyCode                             as CompanyCode,
  EnterpriseProject.ResponsibleCostCenter                   as ResponsibleCostCenter,
  EnterpriseProject.Plant                                   as Plant,
  EnterpriseProject.ProjectProfileCode                      as ProjectProfileCode,
  EnterpriseProject.EnterpriseProjectType                   as EnterpriseProjectType,
  EnterpriseProject.FunctionalArea                          as FunctionalArea,
  cast('00000000' as hrobjid preserving type )              as EmploymentInternalID,
  cast('' as /cpd/restrict_time_posting preserving type )   as TimePostingIsRestricted
}
where
  WorkPackage.ProcessingStatus = '10' and // Released

  // Filter PPM projects (To avoid duplicates in case in future CPM and PPM projects are merged)

  EnterpriseProject.ProjectProfileCode = 'YP02' and
  EnterpriseProject.ProjectProfileCode = 'YP03' and 
  EnterpriseProject.ProjectProfileCode = 'YP04' and 
  EnterpriseProject.ProjectProfileCode = 'YP05'