I_PROJECTMILESTONE

CDS View

Project Milestone Details

I_PROJECTMILESTONE is a CDS View in S/4HANA. Project Milestone Details. It contains 19 fields. 5 CDS views read from this table.

CDS Views using this table (5)

ViewTypeJoinVDMDescription
I_MfgOrderOperationTrggrPoint view from COMPOSITE Manufacturing Order Operation Trigger Point
I_MstrProjMlstnDte view inner COMPOSITE Get Project Next Milestone Date
I_ProjectMilestoneValueHelp view from COMPOSITE Project Milestone Value Help
I_TriggerPointText view inner BASIC Trigger Point - Text
P_MilestoneWithVersion view union_all COMPOSITE

Fields (19)

KeyField CDS FieldsUsed in Views
KEY ProjectMilestone ProjectMilestone 1
_WBSElement _WBSElement 1
ActualEndDate ActualEndDate 1
AuthorizationGroup AuthorizationGroup 1
CreatedByUser CreatedByUser 1
CreationDate CreationDate 1
FixedBasicDate FixedBasicDate 1
ForecastedFixedDate ForecastedFixedDate 1
IsDeleted IsDeleted,IsMarkedForDeletion 1
LastChangeDate LastChangeDate 1
LastChangedByUser LastChangedByUser 1
MlstnIsMarkedForRelUptoStopInd TrggrPtIsMarkedForRelUpToStop 1
MlstnIsMarkedForStrtWrkflwTsk TrggrPtIsMrkdForStartWrkflwTsk 1
MlstnReleaseStopIsActive TrggrPtReleaseStopIsActive 1
OrderCategory OrderCategory 1
ScheduledBasicDate ScheduledBasicDate 1
ScheduledForecastedDate ScheduledForecastedDate 1
UsageCode TriggerPointUsage,UsageCode 2
WBSElementInternalID WBSElementInternalID 1
@AbapCatalog.sqlViewName: 'IPROJMILESTONE'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #CHECK
//@AccessControl.privilegedAssociations:  [ '_Extension' ]

//@Analytics: { dataCategory: #DIMENSION, dataExtraction.enabled: true }

@EndUserText.label: 'Project Milestone Details'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.representativeKey: 'ProjectMilestone'
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@VDM.lifecycle.contract.type:  #SAP_INTERNAL_API

define view I_Projectmilestone
  as select from mlst
  association [0..1] to I_Projectmilestonetext  as _Text            on  $projection.ProjectMilestone           = _Text.ProjectMilestone
                                                                    and $projection.ProjectMilestoneInternalID = _Text.ProjectMilestoneInternalID
  association [0..1] to I_ProjectNetwork        as _ProjectNetwork  on  $projection.ProjectNetworkInternalID = _ProjectNetwork.ProjectNetworkInternalID
  association [0..1] to I_NetworkActivity       as _NetworkActivity on  _NetworkActivity.ProjectNetworkInternalID  = $projection.ProjectNetworkInternalID
                                                                    and _NetworkActivity.NetworkActivityInternalID = $projection.NetworkActivityInternalID

  association [0..1] to I_WBSElement            as _WBSElement      on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
  association [0..1] to I_Projectmilestoneusage as _UsageText       on  $projection.UsageCode = _UsageText.UsageCode
  association [1..1] to E_ProjectMilestone      as _Extension       on  mlst.mlst_zaehl = _Extension.ProjectMilestone
// Multilanguage Short text

  association [0..1] to I_ProjectObjectShortText as _MilestoneShortText  on  _MilestoneShortText.Language   = $session.system_language
                                                                         and _MilestoneShortText.ProjectApplicationIdentifier = 'PS'
                                                                         and ( _MilestoneShortText.ProjectObjectType = 'MW' or
                                                                               _MilestoneShortText.ProjectObjectType = 'ML' )
                                                                         and $projection.ProjectMilestone = _MilestoneShortText.RelatedProjectObject
{

      // @ObjectModel.text.association: '_Text'

      @ObjectModel.text.element: 'MilestoneDescription'
      @EndUserText.label: 'Milestone Number'
  key mlst.mlst_zaehl                                                     as ProjectMilestone,
      @ObjectModel.text.association: '_Text'
      mlst.zaehl                                                          as ProjectMilestoneInternalID,
      cast (mlst.loekz as ps_s4_loevm)                                    as IsDeleted,
      mlst.mlstn                                                          as UsageCode,
      mlst.aufpl                                                          as ProjectNetworkInternalID,
      mlst.aplzl                                                          as NetworkActivityInternalID,
      /*case
         when mlst.pspnr = '00000000'
             then cast(_ProjectNetwork.WBSElementInternalID as ps_posnr)
         else cast(mlst.pspnr as ps_posnr)
      end                                                                as WBSElementInternalID, */
      cast (mlst.pspnr as ps_s4_pspnr)                                    as WBSElementInternalID,
      @Semantics.calendar.dayOfMonth: true
      cast(mlst.tedat as ps_s4_mlst_tedat)                                as ScheduledBasicDate,
      @Semantics.calendar.dayOfMonth: true
      cast(mlst.edatu as lop_fix_date)                                    as FixedBasicDate,
      @Semantics.calendar.dayOfMonth: true
      cast(mlst.tpdat as ps_s4_mlst_tpdat)                                as ScheduledForecastedDate,
      @Semantics.calendar.dayOfMonth: true
      cast(mlst.pdatu as ps_s4_mlst_pdatu)                                as ForecastedFixedDate,

      cast(mlst.kz_trend as ps_s4_mlst_trend)                             as MlstnIsRelevantForTrendAnlys,

      cast(mlst.kz_lstwr as ps_s4_mlst_lstwr)                             as MlstnIsRelevantForPrgrsAnlys,

      cast(mlst.kz_faktp as ps_s4_mlst_faktp)                             as MlstnIsRelevantForDteInSlsDoc,
      @Semantics.calendar.dayOfMonth: true
      cast (mlst.lst_actdt as ppe_actual_date)                            as ActualEndDate,
      // mlst.fproz                          as ProjCostToBeInvoicedPercent,

      cast(mlst.autyp as cowb_autyp)                                      as OrderCategory,
      @Semantics.calendar.dayOfMonth: true
      cast (mlst.dateh as erdat)                                          as CreationDate,
      @Semantics.calendar.dayOfMonth: true
      @Semantics.businessDate.lastChangedAt
      cast (mlst.datev as ps_s4_updat)                                    as LastChangeDate,

      cast(mlst.incnw as ps_s4_mlst_incnw)                                as MlstnIsMarkedForCreateNtwk,

      cast(mlst.incpn as ps_s4_mlst_incpn)                                as MlstnIsMarkedForIncludeSubNtwk,

      cast(mlst.incsn as ps_s4_mlst_incsn)                                as MlstnIsMarkedForCreateSubNtwk,

      cast(mlst.kz_frmst as ps_s4_kz_frmst)                               as MlstnReleaseStopIsActive,

      cast(mlst.kz_wflow as ps_s4_mlst_wflow)                             as MlstnIsUsedforMlstnFunc,
      cast (mlst.begru as begru)                                          as AuthorizationGroup,

      cast(mlst.relms as ps_s4_mlst_relms)                                as MlstnIsMarkedForRelUptoStopInd,

      cast(mlst.relsu as ps_s4_mlst_relsu)                                as MlstnIsMarkedForRelFllwngActy,

      cast (mlst.userh as ernam)                                          as CreatedByUser,

      cast (mlst.userv as ps_s4_aenam)                                    as LastChangedByUser,
      cast(mlst.wkflw  as ps_s4_mlst_wkflw)                               as MlstnIsMarkedForStrtWrkflwTsk,

      cast(mlst.dltas as ps_s4_mlst_dltas)                                as DateIsOffsetToParentEndDate, //Offset to finish

      cast(mlst.prcnt as ps_s4_mlst_prcnt)                                as MlstnDateOffsetPercent, //Offset percent

      @Semantics.unitOfMeasure: true
      cast(mlst.delte as ps_s4_mlst_delte)                                as MlstnDateOffsetDurationUnit, //Offset time unit

      @Semantics.quantity.unitOfMeasure: 'MlstnDateOffsetDurationUnit'
      mlst.delta                                                          as MlstnDateOffsetDuration, //Offset

      cast(mlst.lated as ps_s4_mlst_late)                                 as DateIsOffsetToParentLtstDates, //Offset to Latest Dates

      cast(lst_fertg as ps_s4_cgpl_completion)                            as CompletionRateInPercent,
      //   cast(lst_fertg as cgpl_completion)                           as CompletionPercentage,

      cast(fproz as fproz)                                                as ProjCostToBeInvoicedPercent,
      @EndUserText.label: 'Workflow Task'
      mlst.task_id                                                        as WorkflowTask,
      // cast(fproz as ps_s4_fproz)                               as ProjCostToBeInvoicedInPercent, //REMOVE

      //NEW FIELDS - START

      mlst.lst_acttm                                                      as ActualMilestoneTime,
      mlst.pzeit                                                          as FixedForecastMilestoneTime,
      mlst.ezeit                                                          as FixedBasicMilestoneTime,
      mlst.tptim                                                          as ScheduledForecastMilestoneTime,
      mlst.tetim                                                          as ScheduledBasicMilestoneTime,
      //NEW FIELDS - FINISH

      _Text[1: Language = $session.system_language ].MilestoneDescription as MilestoneDescription,
      _Text,
      _ProjectNetwork,
      _NetworkActivity,
      _WBSElement,
      _UsageText,
      _MilestoneShortText
}
where
     mlst.pspnr <> '00000000'
  or mlst.aplzl <> '00000000'