P_PMPROJSUPPLYDATA

DDL: P_PMPROJSUPPLYDATA SQL: PMPROJSUPPLYDATA Type: view COMPOSITE

P_PMPROJSUPPLYDATA is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_EngmntProjectSupplyData, I_ProjectMgrOrgDet) and exposes 8 fields with key fields EmploymentInternalID, WorkPackage, WorkItem, EngagementProjectResource.

Data Sources (2)

SourceAliasJoin Type
I_EngmntProjectSupplyData SupplyData inner
I_ProjectMgrOrgDet UserProjects from

Parameters (2)

NameTypeDefault
P_Year scal_year
P_Month fcmnr

Annotations (6)

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

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY EmploymentInternalID I_EngmntProjectSupplyData EmploymentInternalID
KEY WorkPackage I_EngmntProjectSupplyData WorkPackage
KEY WorkItem I_EngmntProjectSupplyData WorkItem
KEY EngagementProjectResource I_EngmntProjectSupplyData EngagementProjectResource
EngagementProjectCategory
WorkPackageStartDate I_EngmntProjectSupplyData WorkPackageStartDate
WorkPackageEndDate I_EngmntProjectSupplyData WorkPackageEndDate
PlndEffortQty
@AbapCatalog.sqlViewName: 'PMPROJSUPPLYDATA'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Project Plan data of a Project Manager'

@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PMPROJSUPPLYDATA
  with parameters
    P_Year  : scal_year,
    P_Month : fcmnr

  as select from I_ProjectMgrOrgDet        as UserProjects
    inner join   I_EngmntProjectSupplyData as SupplyData            on SupplyData.EngagementProjectUUID = UserProjects.EngagementProjectUUID
    
{
  key  SupplyData.EmploymentInternalID,
  key  SupplyData.WorkPackage,
  key  SupplyData.WorkItem,
  key  SupplyData.EngagementProjectResource,
  key  case
        when SupplyData.BillingControlCategory = 'NON_BILL' and SupplyData._EngagementProject.EngagementProjectCategory = 'C'
        then 'S1'
        else '' end                  as BillingControlCategory,
       SupplyData._EngagementProject.EngagementProjectCategory,
       SupplyData.WorkPackageStartDate,
       SupplyData.WorkPackageEndDate,
       sum(SupplyData.PlndEffortQty) as PlndEffortQty
}
where
      SupplyData.FiscalYear   = $parameters.P_Year
  and SupplyData.FiscalPeriod = concat(
    '0', $parameters.P_Month
  )

group by
  SupplyData.EmploymentInternalID,
  SupplyData.WorkPackage,
  SupplyData.WorkItem,
  SupplyData.EngagementProjectResource,
  SupplyData.BillingControlCategory,
  SupplyData._EngagementProject.EngagementProjectCategory,
  SupplyData.WorkPackageStartDate,
  SupplyData.WorkPackageEndDate