R_EnterpriseProjectElement

DDL: R_ENTERPRISEPROJECTELEMENT Type: view_entity BASIC

Enterprise Project Element Internal

R_EnterpriseProjectElement is a Basic CDS View (Dimension) that provides data about "Enterprise Project Element Internal" in SAP S/4HANA. It reads from 1 data source (/s4ppm/task) and exposes 58 fields with key field ProjectElementUUID. It has 18 associations to related views.

Data Sources (1)

SourceAliasJoin Type
/s4ppm/task task from

Associations (18)

CardinalityTargetAliasCondition
[1..1] R_EnterpriseProject _EnterpriseProject _EnterpriseProject.ProjectUUID = $projection.ProjectUUID -- text associations
[0..1] I_PPM_ProcessingStatusText _ProcessingStatusText $projection.ProcessingStatus = _ProcessingStatusText.ProcessingStatus and _ProcessingStatusText.Language = $session.system_language
[0..1] I_InvestmentProfileText _InvestmentProfileText $projection.InvestmentProfile = _InvestmentProfileText.InvestmentProfile and _InvestmentProfileText.Language = $session.system_language
[0..1] I_FunctionalAreaText _FunctionalAreaText $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea and _FunctionalAreaText.Language = $session.system_language
[0..1] I_FactoryCalendarText _FactoryCalendarText $projection.FactoryCalendar = _FactoryCalendarText.FactoryCalendar and _FactoryCalendarText.Language = $session.system_language
[0..1] I_FunctionalLocationText _FunctionalLocationText $projection.FunctionalLocation = _FunctionalLocationText.FunctionalLocation and _FunctionalLocationText.Language = $session.system_language
[0..1] I_CostCenterText _CostCenter $projection.CostCenter = _CostCenter.CostCenter and $projection.ControllingArea = _CostCenter.ControllingArea and _CostCenter.ValidityEndDate >= $session.system_date and _CostCenter.ValidityStartDate <= $session.system_date and _CostCenter.Language = $session.system_language
[0..1] I_CostCenterText _ResponsibleCostCenter $projection.ResponsibleCostCenter = _ResponsibleCostCenter.CostCenter and $projection.ControllingArea = _ResponsibleCostCenter.ControllingArea and _ResponsibleCostCenter.ValidityEndDate >= $session.system_date and _ResponsibleCostCenter.ValidityStartDate <= $session.system_date and _ResponsibleCostCenter.Language = $session.system_language
[0..1] I_ProfitCenterText _ProfitCenter $projection.ProfitCenter = _ProfitCenter.ProfitCenter and $projection.ControllingArea = _ProfitCenter.ControllingArea and _ProfitCenter.ValidityEndDate >= $session.system_date and _ProfitCenter.ValidityStartDate <= $session.system_date and _ProfitCenter.Language = $session.system_language
[0..1] I_UserContactCard _CreatedByUser $projection.CreatedByUser = _CreatedByUser.ContactCardID
[0..1] I_UserContactCard _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.ContactCardID
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..1] I_PPM_Tasktype _tasktype $projection.EntProjectElementType = _tasktype.TaskType
[1..1] I_PPM_MilestoneApprovalStatus _MilestoneApprovalStatus $projection.MilestoneApprovalStatus = _MilestoneApprovalStatus.MilestoneApprovalStatus
[0..1] I_EnterpriseProjectForUser _EnterpriseProjectForUser _EnterpriseProjectForUser.ProjectUUID = $projection.ProjectUUID ---Extension
[1..1] E_PPM_Task _ProjectElementExtension $projection.ProjectElementUUID = _ProjectElementExtension.TaskUUID

Annotations (14)

NameValueLevelField
EndUserText.label Enterprise Project Element Internal view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.representativeKey ProjectElementUUID view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view
Analytics.internalName #LOCAL view
Analytics.dataExtraction.enabled true view
Analytics.dataCategory #DIMENSION view
Metadata.allowExtensions true view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (58)

KeyFieldSource TableSource FieldDescription
KEY ProjectElementUUID /s4ppm/task guid
ProjectElement
ProjectUUID /s4ppm/task project_guid
ProjectElementDescription /s4ppm/task name
ProcessingStatus /s4ppm/task proc_status_own
PlannedStartDate /s4ppm/task latest_start_date
PlannedEndDate /s4ppm/task latest_finish_date
ActualStartDate /s4ppm/task actualstart_date
ActualFinishDate /s4ppm/task actualfinish_date
SortingNumber /s4ppm/task sort_number
EntProjectElementObjectType /s4ppm/task object_type
EntProjectElementType /s4ppm/task task_type
TaskTemplateUUID /s4ppm/task template_guid
IsProjectMilestone /s4ppm/task milestone
TaxJurisdiction prps txjcd
FunctionalLocation prps tplnr
WBSElementIsBillingElement prps fakkz
WBSElementInternalID
ProjectInternalID
ParentObjectUUID
ProjectElementOrdinalNumber
WBSIsStatisticalWBSElement prps xstat
CompanyCode prps pbukr
ControllingArea prps pkokr
CostCenter prps kostl
CostingSheet prps kalsm
FactoryCalendar prps fabkl
FunctionalArea prps func_area
InvestmentProfile prps imprf
Location prps stort
Plant prps werks
ProfitCenter prps prctr
ResponsibleCostCenter prps fkstl
ResultAnalysisInternalID prps abgsl
LeadingSalesOrder prps vbeln_prps
LeadingSalesOrderItem prps posnr_prps
CreatedByUser /s4ppm/task created_by
CreationDateTime /s4ppm/task created_on
LastChangedByUser /s4ppm/task changed_by
LastChangeDateTime /s4ppm/task changed_on
MilestoneApprovalStatus /s4ppm/task mlstn_apprvl_status
IsMainMilestone _tasktype IsEssentialMilestone
_ProcessingStatusText _ProcessingStatusText
_InvestmentProfileText _InvestmentProfileText
_FunctionalAreaText _FunctionalAreaText
_FactoryCalendarText _FactoryCalendarText
_FunctionalLocationText _FunctionalLocationText
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_CompanyCode _CompanyCode
_Plant _Plant
_CostCenter _CostCenter
_ResponsibleCostCenter _ResponsibleCostCenter
_ProfitCenter _ProfitCenter
_ControllingArea _ControllingArea
_MilestoneApprovalStatus _MilestoneApprovalStatus
_EnterpriseProject _EnterpriseProject
_EnterpriseProjectForUser _EnterpriseProjectForUser
@EndUserText.label: 'Enterprise Project Element Internal'

@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED

@ObjectModel: {
   semanticKey  :     [ 'ProjectElement' ],
   representativeKey: 'ProjectElementUUID',
   supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ],
   usageType: {
     serviceQuality : #B,
     dataClass      : #MASTER,
     sizeCategory   : #XL
   }
}

@Metadata.ignorePropagatedAnnotations: true

@Analytics.internalName:#LOCAL
@Analytics.dataExtraction: {
        enabled :true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: '/s4ppm/task', role :#MAIN,
                    viewElement: ['ProjectElementUUID'],
                    tableElement: ['guid']
                },
                {
                    table: 'prps', role :#LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['WBSElementInternalID'],
                    tableElement: ['pspnr']
                }
            ]
        }
}
@Analytics.dataCategory: #DIMENSION
@Metadata.allowExtensions:true
@VDM.viewType: #BASIC
@VDM.lifecycle.contract.type:  #SAP_INTERNAL_API

define view entity R_EnterpriseProjectElement
  as select from           /s4ppm/task      as task
  //Left Outer Join To get also Milestones

    left outer to one join prps             as prps  on prps.pspnr = task.pspnr


  //to make sure parent is empty in case of parent being PST

    left outer to one join /s4ppm/hierarchy as hiera on  hiera.object_guid    =  task.guid
                                                     and hiera.hierarchy_type =  'T'
                                                     and task.object_type     <> 'DPO'

  association [1..1] to R_EnterpriseProject         as _EnterpriseProject       on  _EnterpriseProject.ProjectUUID = $projection.ProjectUUID

  -- text associations
  association [0..1] to I_PPM_ProcessingStatusText  as _ProcessingStatusText    on  $projection.ProcessingStatus = _ProcessingStatusText.ProcessingStatus
                                                                                and _ProcessingStatusText.Language = $session.system_language

  association [0..1] to I_InvestmentProfileText     as _InvestmentProfileText   on  $projection.InvestmentProfile = _InvestmentProfileText.InvestmentProfile
                                                                                and _InvestmentProfileText.Language = $session.system_language

  association [0..1] to I_FunctionalAreaText        as _FunctionalAreaText      on  $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
                                                                                and _FunctionalAreaText.Language = $session.system_language

  association [0..1] to I_FactoryCalendarText       as _FactoryCalendarText     on  $projection.FactoryCalendar = _FactoryCalendarText.FactoryCalendar
                                                                                and _FactoryCalendarText.Language = $session.system_language

  association [0..1] to I_FunctionalLocationText    as _FunctionalLocationText  on  $projection.FunctionalLocation = _FunctionalLocationText.FunctionalLocation
                                                                                and _FunctionalLocationText.Language = $session.system_language

  association [0..1] to I_CostCenterText            as _CostCenter              on  $projection.CostCenter      = _CostCenter.CostCenter
                                                                                and $projection.ControllingArea = _CostCenter.ControllingArea
                                                                                and _CostCenter.ValidityEndDate >= $session.system_date
                                                                                and _CostCenter.ValidityStartDate <= $session.system_date
                                                                                and _CostCenter.Language = $session.system_language

  association [0..1] to I_CostCenterText            as _ResponsibleCostCenter   on  $projection.ResponsibleCostCenter = _ResponsibleCostCenter.CostCenter
                                                                                and $projection.ControllingArea       = _ResponsibleCostCenter.ControllingArea
                                                                                and _ResponsibleCostCenter.ValidityEndDate >= $session.system_date
                                                                                and _ResponsibleCostCenter.ValidityStartDate <= $session.system_date
                                                                                and _ResponsibleCostCenter.Language = $session.system_language

  association [0..1] to I_ProfitCenterText          as _ProfitCenter            on  $projection.ProfitCenter    = _ProfitCenter.ProfitCenter
                                                                                and $projection.ControllingArea = _ProfitCenter.ControllingArea
                                                                                and _ProfitCenter.ValidityEndDate >= $session.system_date
                                                                                and _ProfitCenter.ValidityStartDate <= $session.system_date
                                                                                and _ProfitCenter.Language = $session.system_language

  association [0..1] to I_UserContactCard           as _CreatedByUser           on  $projection.CreatedByUser = _CreatedByUser.ContactCardID
  association [0..1] to I_UserContactCard           as _LastChangedByUser       on  $projection.LastChangedByUser = _LastChangedByUser.ContactCardID
  association [0..1] to I_CompanyCode               as _CompanyCode             on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_Plant                     as _Plant                   on  $projection.Plant = _Plant.Plant
  association [0..1] to I_ControllingArea           as _ControllingArea         on  $projection.ControllingArea = _ControllingArea.ControllingArea
  association [0..1] to I_PPM_Tasktype              as _tasktype                on  $projection.EntProjectElementType = _tasktype.TaskType
  association [1..1] to I_PPM_MilestoneApprovalStatus   as _MilestoneApprovalStatus on $projection.MilestoneApprovalStatus = _MilestoneApprovalStatus.MilestoneApprovalStatus 

  //For Cat 7 Authorization                                                                                      

  association [0..1] to I_EnterpriseProjectForUser     as _EnterpriseProjectForUser on _EnterpriseProjectForUser.ProjectUUID = $projection.ProjectUUID
  ---Extension Association
  association [1..1] to E_PPM_Task                  as _ProjectElementExtension on  $projection.ProjectElementUUID = _ProjectElementExtension.TaskUUID

{
  key task.guid                                                          as ProjectElementUUID,
      cast ( task.external_id as /s4ppm/project_ele_id preserving type ) as ProjectElement,
      @ObjectModel.foreignKey.association: '_EnterpriseProject'
      task.project_guid                                                  as ProjectUUID,
      @Semantics.text: true
      task.name                                                          as ProjectElementDescription,
      task.proc_status_own                                               as ProcessingStatus,

      @EndUserText:
         { quickInfo:  'Latest Planned Start',
           label:      'Latest Planned Start'  }
      task.latest_start_date                                             as PlannedStartDate,
      @EndUserText:
         { quickInfo:  'Latest Planned Finish',
           label    :  'Latest Planned Finish' }
      task.latest_finish_date                                            as PlannedEndDate,
      task.actualstart_date                                              as ActualStartDate,
      task.actualfinish_date                                             as ActualFinishDate,
      task.sort_number                                                   as SortingNumber,
      task.object_type                                                   as EntProjectElementObjectType,
      //2008 EPPM Harmonization Start

      task.task_type                                                     as EntProjectElementType,

      task.template_guid                                                 as TaskTemplateUUID,

      @Semantics.booleanIndicator: true
      task.milestone                                                     as IsProjectMilestone,
      prps.txjcd                                                         as TaxJurisdiction,
      prps.tplnr                                                         as FunctionalLocation,
      prps.fakkz                                                         as WBSElementIsBillingElement,
      //2008 EPPM Harmonization End

      cast ( task.pspnr as ps_s4_pspnr preserving type )                 as WBSElementInternalID,
      //2105 Adding Project internal ID as part of BW integration.

      cast ( prps.psphi as ps_s4_proj_pspnr preserving type )            as ProjectInternalID,

      cast ( hiera.up as /s4ppm/tv_parent_entity_guid preserving type )  as ParentObjectUUID,
      cast (hiera.sort_number as /s4ppm/tv_sort_number preserving type ) as ProjectElementOrdinalNumber,

      prps.xstat                                                         as WBSIsStatisticalWBSElement,
      prps.pbukr                                                         as CompanyCode,
      prps.pkokr                                                         as ControllingArea,
      prps.kostl                                                         as CostCenter,
      prps.kalsm                                                         as CostingSheet,
      prps.fabkl                                                         as FactoryCalendar,
      prps.func_area                                                     as FunctionalArea,
      prps.imprf                                                         as InvestmentProfile,
      prps.stort                                                         as Location,
      prps.werks                                                         as Plant,
      prps.prctr                                                         as ProfitCenter,
      prps.fkstl                                                         as ResponsibleCostCenter,
      //SO Integration

      prps.abgsl                                                         as ResultAnalysisInternalID,
      prps.vbeln_prps                                                    as LeadingSalesOrder,
      prps.posnr_prps                                                    as LeadingSalesOrderItem,
      @Semantics.user.createdBy: true
      task.created_by                                                    as CreatedByUser,
      @Semantics.systemDateTime.createdAt: true
      task.created_on                                                    as CreationDateTime,
      @Semantics.user.lastChangedBy: true
      task.changed_by                                                    as LastChangedByUser,
      @Semantics.systemDateTime.lastChangedAt: true
      task.changed_on                                                    as LastChangeDateTime,
      
      task.forecast_finish_date                                          as ForecastedEndDate,            
      task.mlstn_apprvl_status                                           as MilestoneApprovalStatus,
      _tasktype.IsEssentialMilestone                                     as IsMainMilestone,
      
      _ProcessingStatusText,
      _InvestmentProfileText,
      _FunctionalAreaText,
      _FactoryCalendarText,
      _FunctionalLocationText,
      _CreatedByUser,
      _LastChangedByUser,
      _CompanyCode,
      _Plant,
      _CostCenter,
      _ResponsibleCostCenter,
      _ProfitCenter,
      _ControllingArea,
      _MilestoneApprovalStatus,

      _EnterpriseProject,
      _EnterpriseProjectForUser

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PPM_TASKTYPE",
"/S4PPM/HIERARCHY",
"/S4PPM/TASK",
"PRPS"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTERTEXT",
"I_ENTERPRISEPROJECTFORUSER",
"I_FACTORYCALENDARTEXT",
"I_FUNCTIONALAREATEXT",
"I_FUNCTIONALLOCATIONTEXT",
"I_INVESTMENTPROFILETEXT",
"I_PLANT",
"I_PPM_MILESTONEAPPROVALSTATUS",
"I_PPM_PROCESSINGSTATUSTEXT",
"I_PROFITCENTERTEXT",
"I_USERCONTACTCARD",
"R_ENTERPRISEPROJECT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/