P_MaintPlanSchedulingOverview

DDL: P_MAINTPLANSCHEDULINGOVERVIEW SQL: PMPSCHEDGOVW Type: view COMPOSITE

Maintenance Plan Scheduling Overview

P_MaintPlanSchedulingOverview is a Composite CDS View that provides data about "Maintenance Plan Scheduling Overview" in SAP S/4HANA. It reads from 1 data source (I_MaintPlanCallObject) and exposes 76 fields with key fields MaintenancePlan, MaintenancePlanCallNumber, MaintenanceItem. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintPlanCallObject I_MaintPlanCallObject from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_MaintenancePlanType _MaintenancePlanType $projection.MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType
[0..1] I_MaintenancePlanCallStatus _MaintenancePlanCallStatus $projection.MaintenancePlanCallStatus = _MaintenancePlanCallStatus.MaintenancePlanCallStatus
[1..1] I_MaintenancePlanStatus _MaintPlanActiveSystemStatus $projection.MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PMPSCHEDGOVW view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey MaintenancePlanCallNumber view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Maintenance Plan Scheduling Overview view

Fields (76)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlan I_MaintPlanCallObject MaintenancePlan
KEY MaintenancePlanCallNumber I_MaintPlanCallObject MaintenancePlanCallNumber
KEY MaintenanceItem I_MaintPlanCallObject MaintenanceItem
MaintenanceOrder I_MaintPlanCallObject MaintenanceOrder
MaintenanceNotification I_MaintPlanCallObject MaintenanceNotification
MaintCallHorizonIsNotReached I_MaintPlanCallObject MaintCallHorizonIsNotReached
PlannedStartDateendasPlannedStartDate
ReleasedByUserName I_MaintPlanCallObject ReleasedByUserName
ServiceOrder I_MaintPlanCallObject ServiceOrder
CompletionDate I_MaintPlanCallObject CompletionDate
CompletionTime I_MaintPlanCallObject CompletionTime
ServiceEntrySheet I_MaintPlanCallObject ServiceEntrySheet
RevisionNumber
MaintenancePlanCategory
MaintenanceStrategy
MaintenanceCallNextPlannedDate
MaintenancePlanSortField
MaintenancePlanCycle
MeasuringPoint
MaintenanceItemDescription
FunctionalLocation
FunctionalLocationObjectType
ConstructionMaterial
Equipment
EquipmentObjectType
Class
Assembly
Material
SerialNumber
MaintItemHasObjectList
MaintenancePlannerGroup
MaintenancePlanningPlant
BusinessArea
MaintenanceOrderType
NotificationType
MaintenanceActivityType
MainWorkCenterInternalID
MainWorkCenter
TaskListType
TaskListGroup
TaskListGroupCounter
PurchaseOrder
PurchaseOrderItem
MaintenancePlant
AssetLocation
AssetRoom
PlantSection
WorkCenter
ABCIndicator
MaintObjectFreeDefinedAttrib
CompanyCode
MasterFixedAsset
FixedAsset
ControllingArea
CostCenter
WBSElementExternalID
StandingOrderNumber
SalesDocument
SalesDocumentItem
SalesOrganization
DistributionChannel
OrganizationDivision
AuthorizationGroup
_MaintenancePlan I_MaintPlanCallObject _MaintenancePlan
_MaintenanceItem I_MaintPlanCallObject _MaintenanceItem
_MaintenanceOrder I_MaintPlanCallObject _MaintenanceOrder
_MaintenanceNotification I_MaintPlanCallObject _MaintenanceNotification
_MaintPlanCallHistory I_MaintPlanCallObject _MaintPlanCallHistory
_Equipment
_FunctionalLocation
_TaskListGroup_2
_TaskListGroupCounter_2
_MaintenancePlanCatParam
_MaintenancePlanType _MaintenancePlanType
_MaintenancePlanCallStatus _MaintenancePlanCallStatus
_MaintPlanActiveSystemStatus _MaintPlanActiveSystemStatus
@AbapCatalog.sqlViewName: 'PMPSCHEDGOVW'
@VDM: {
    viewType: #COMPOSITE,
    private:true
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.representativeKey:  'MaintenancePlanCallNumber'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck:#NOT_REQUIRED
@AccessControl.personalData.blocking : #REQUIRED
@EndUserText.label: 'Maintenance Plan Scheduling Overview'

define view P_MaintPlanSchedulingOverview
  as select from           I_MaintPlanCallObject
    left outer to one join I_ClfnObjectClassForKeyDate( P_KeyDate: $session.system_date ) as Classification on Classification.ClfnObjectID = MaintenancePlan
  association [0..1] to I_MaintenancePlanType         as _MaintenancePlanType         on $projection.MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType
  association [0..1] to I_MaintenancePlanCallStatus   as _MaintenancePlanCallStatus   on $projection.MaintenancePlanCallStatus = _MaintenancePlanCallStatus.MaintenancePlanCallStatus
  //association [0..1] to I_MaintPlanActiveSystemStatus as _MaintPlanActiveSystemStatus on $projection.MaintPlanActiveSystemStatus = _MaintPlanActiveSystemStatus.MaintPlanActiveSystemStatus

  association [1..1] to I_MaintenancePlanStatus        as _MaintPlanActiveSystemStatus  on $projection.MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan
{
      @ObjectModel.foreignKey.association: '_MaintenancePlan'
  key I_MaintPlanCallObject.MaintenancePlan                                                                                                     as MaintenancePlan,
  key I_MaintPlanCallObject.MaintenancePlanCallNumber                                                                                           as MaintenancePlanCallNumber,
      @ObjectModel.foreignKey.association: '_MaintenanceItem'
  key I_MaintPlanCallObject.MaintenanceItem                                                                                                     as MaintenanceItem,
      @ObjectModel.foreignKey.association: '_MaintenanceOrder'
      I_MaintPlanCallObject.MaintenanceOrder                                                                                                    as MaintenanceOrder,
      @ObjectModel.foreignKey.association: '_MaintenanceNotification'
      I_MaintPlanCallObject.MaintenanceNotification                                                                                             as MaintenanceNotification,
      I_MaintPlanCallObject.MaintCallHorizonIsNotReached                                                                                        as MaintCallHorizonIsNotReached,
      case
      when I_MaintPlanCallObject._MaintenanceOrder.MaintOrdBasicStartDate   <> '00000000' then I_MaintPlanCallObject._MaintenanceOrder.MaintOrdBasicStartDate
      when I_MaintPlanCallObject._MaintenanceNotification.RequiredStartDate <> '00000000' then I_MaintPlanCallObject._MaintenanceNotification.RequiredStartDate
      else I_MaintPlanCallObject.PlannedStartDate
      end                                                                                                                                       as PlannedStartDate,
      case
      when I_MaintPlanCallObject._MaintenanceOrder.LatestAcceptableCompletionDate   <> '00000000' then I_MaintPlanCallObject._MaintenanceOrder.LatestAcceptableCompletionDate
      when I_MaintPlanCallObject._MaintenanceNotification._PMNotifMaintenanceData.LatestAcceptableCompletionDate <> '00000000' then I_MaintPlanCallObject._MaintenanceNotification._PMNotifMaintenanceData.LatestAcceptableCompletionDate
      end                                                                                                                                       as LatestAcceptableCompletionDate,
      I_MaintPlanCallObject.ReleasedByUserName                                                                                                  as ReleasedByUserName,
      I_MaintPlanCallObject.ServiceOrder                                                                                                        as ServiceOrder,
      I_MaintPlanCallObject.CompletionDate                                                                                                      as CompletionDate,
      I_MaintPlanCallObject.CompletionTime                                                                                                      as CompletionTime,
      I_MaintPlanCallObject.ServiceEntrySheet,
      cast ( I_MaintPlanCallObject.RevisionNumber as j_3rfinv_revno  )                                                                          as RevisionNumber,
      @ObjectModel.foreignKey.association: '_MaintenancePlanCatParam'
      I_MaintPlanCallObject._MaintenancePlan.MaintenancePlanCategory                                                                            as MaintenancePlanCategory,
      I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceStrategy                                                                           as MaintenanceStrategy,
      I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceCallNextPlannedDate                                                                as MaintenanceCallNextPlannedDate,
      case
      when I_MaintPlanCallObject._MaintPlanCallHistory.MaintPlanLastScheduledDate   <> '00000000' then I_MaintPlanCallObject._MaintPlanCallHistory.MaintPlanLastScheduledDate
      else I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceCallDate
      end                                                                                                                                       as MaintenanceCallDate,
      //    @ObjectModel.text.association: '_MaintenancePlanCallStatusText'

      cast ( case I_MaintPlanCallObject._MaintPlanCallHistory.SchedulingStatus
      when 'F' then 'FIXED'
      when 'X' then 'SKIPPED'
      when 'Y' then 'INACTIVE'
      when '' then ( case I_MaintPlanCallObject._MaintPlanCallHistory.SchedulingType
                           when 'M' then 'MANUALCL'
                           else ( case when I_MaintPlanCallObject._MaintPlanCallHistory.MaintCallIsInvokedOnPlndDate = 'X' and I_MaintPlanCallObject._MaintPlanCallHistory.CompletionDate = '00000000' then 'CALLED'
                                      when I_MaintPlanCallObject._MaintPlanCallHistory.MaintCallIsInvokedOnPlndDate = 'X' and I_MaintPlanCallObject._MaintPlanCallHistory.CompletionDate <> '00000000' then 'COMPLETED'
                                      when I_MaintPlanCallObject._MaintPlanCallHistory.MaintCallHorizonIsNotReached = 'X' then 'HOLD'
                                      when I_MaintPlanCallObject._MaintPlanCallHistory.MaintenancePlanCallIsLocked = 'X' and ( I_MaintPlanCallObject._MaintPlanCallHistory.MaintCallHorizonIsNotReached = 'X' or I_MaintPlanCallObject._MaintPlanCallHistory.SchedulingStatus = 'F' )  then 'INACTIVE'
                                  end )
                     end
                     )
      end
      as eam_maintplan_schedg_status )                                                                                                          as MaintenancePlanCallStatus,
      I_MaintPlanCallObject._MaintenancePlan.MaintPlanFreeDefinedAttrib                                                                         as MaintenancePlanSortField,
      I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCycle.MaintenancePlanCycle                                                         as MaintenancePlanCycle,
      I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCycle.MeasuringPoint                                                               as MeasuringPoint,
      //    I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusCode,

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

//      cast ( case

//        when I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusCode = 'I0076' and I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusIsActive  = 'X' then  'DELFLAG  '

//        when I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusCode = 'I0320' and I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusIsActive  = 'X' then 'INACTIVE'

//        when I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusCode = 'I0001' and I_MaintPlanCallObject._MaintenancePlan.MaintenanceCall != 0  then 'SCHEDULED'

//        when I_MaintPlanCallObject._MaintenancePlan._StatusObjectActiveStatus.StatusCode = 'I0001' and I_MaintPlanCallObject._MaintenancePlan.MaintenanceCall = 0 then 'CREATED' end

//       as eam_maintplan_active_sy_status  )                                                                                                     as MaintPlanActiveSystemStatus,


      cast ( case when (_MaintPlanActiveSystemStatus.MaintPlanIsMarkedForDeletion  = 1 ) then 'DELFLAG '
      else case when (_MaintPlanActiveSystemStatus.MaintenancePlanIsInactive  = 1 ) then 'INACTIVE'
      else  'SCHEDULED' end end  as eam_maintplan_active_sy_status )                                                                            as MaintPlanActiveSystemStatus,
      I_MaintPlanCallObject._MaintenanceItem.MaintenanceItemDescription                                                                         as MaintenanceItemDescription,
      //    @ObjectModel.text.association: '_MaintenancePlanType._Text'

      cast(  case I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceStrategy
                 when '' then case I_MaintPlanCallObject._MaintenancePlan.MaintPlanSchedgIndicator
                              when '3' then 'SINGLE PER'
                              when '4' then 'MULTI COUN'
                              else 'SINGLE TIM' end
                 else 'STRATEGY' end as eams_mplan_type preserving type)                                                                        as MaintenancePlanType,
      @ObjectModel.foreignKey.association: '_FunctionalLocation'
      I_MaintPlanCallObject._MaintenanceItem.FunctionalLocation                                                                                 as FunctionalLocation,
      cast ( I_MaintPlanCallObject._MaintenanceItem._FunctionalLocation.TechnicalObjectType as eam_functional_loc_object_type )                 as FunctionalLocationObjectType,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._FunctionalLocation.ConstructionMaterial                                as ConstructionMaterial,
      @ObjectModel.foreignKey.association: '_Equipment'
      I_MaintPlanCallObject._MaintenanceItem.Equipment                                                                                          as Equipment,
      cast ( I_MaintPlanCallObject._MaintenanceItem._Equipment.TechnicalObjectType as eam_equipment_object_type )                               as EquipmentObjectType,
      Classification._Class( P_KeyDate:$session.system_date ).Class                                                                             as Class,
      I_MaintPlanCallObject._MaintenanceItem.Assembly,
      I_MaintPlanCallObject._MaintenanceItem.Material,
      I_MaintPlanCallObject._MaintenanceItem.SerialNumber,
      cast( case I_MaintPlanCallObject._MaintenanceItem.SettlementRuleIsMaintained  when '' then '' else 'X' end  as eam_mitem_has_objectlist ) as MaintItemHasObjectList,
      I_MaintPlanCallObject._MaintenanceItem.MaintenancePlannerGroup                                                                            as MaintenancePlannerGroup,
      I_MaintPlanCallObject._MaintenanceItem.MaintenancePlanningPlant                                                                           as MaintenancePlanningPlant,
      I_MaintPlanCallObject._MaintenanceItem.BusinessArea                                                                                       as BusinessArea,
      I_MaintPlanCallObject._MaintenanceItem.MaintenanceOrderType                                                                               as MaintenanceOrderType,
      I_MaintPlanCallObject._MaintenanceItem.NotificationType                                                                                   as NotificationType,
      I_MaintPlanCallObject._MaintenanceItem.MaintenanceActivityType                                                                            as MaintenanceActivityType,
      I_MaintPlanCallObject._MaintenanceItem.MainWorkCenterInternalID                                                                           as MainWorkCenterInternalID,
      I_MaintPlanCallObject._MaintenanceItem._MainWorkCenter.WorkCenter                                                                         as MainWorkCenter,
      I_MaintPlanCallObject._MaintenanceItem.TaskListType                                                                                       as TaskListType,
      I_MaintPlanCallObject._MaintenanceItem.TaskListGroup                                                                                      as TaskListGroup,
      I_MaintPlanCallObject._MaintenanceItem.TaskListGroupCounter                                                                               as TaskListGroupCounter,
      I_MaintPlanCallObject._MaintenanceItem.PurchaseOrder                                                                                      as PurchaseOrder,
      I_MaintPlanCallObject._MaintenanceItem.PurchaseOrderItem                                                                                  as PurchaseOrderItem,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MaintenancePlant                                                        as MaintenancePlant,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.AssetLocation                                                           as AssetLocation,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.AssetRoom                                                               as AssetRoom,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.PlantSection                                                            as PlantSection,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._WorkCenter.WorkCenter                                                  as WorkCenter,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.ABCIndicator                                                            as ABCIndicator,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MaintObjectFreeDefinedAttrib                                            as MaintObjectFreeDefinedAttrib,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.CompanyCode                                                             as CompanyCode,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MasterFixedAsset                                                        as MasterFixedAsset,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.FixedAsset                                                              as FixedAsset,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.ControllingArea                                                         as ControllingArea,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.CostCenter                                                              as CostCenter,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._WBSElementBasicData.WBSElementExternalID                               as WBSElementExternalID,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.StandingOrderNumber                                                     as StandingOrderNumber,
      I_MaintPlanCallObject._MaintenanceItem._SalesDocument.SalesDocument                                                                       as SalesDocument,
      I_MaintPlanCallObject._MaintenanceItem._SalesDocument._Item.SalesDocumentItem                                                             as SalesDocumentItem,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.SalesOrganization                                                       as SalesOrganization,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.DistributionChannel                                                     as DistributionChannel,
      I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.OrganizationDivision                                                    as OrganizationDivision,
      I_MaintPlanCallObject._MaintenancePlan.AuthorizationGroup                                                                                 as AuthorizationGroup,
      I_MaintPlanCallObject._MaintenancePlan,
      I_MaintPlanCallObject._MaintenanceItem,
      I_MaintPlanCallObject._MaintenanceOrder,
      I_MaintPlanCallObject._MaintenanceNotification,
      I_MaintPlanCallObject._MaintPlanCallHistory,
      I_MaintPlanCallObject._MaintenanceItem._Equipment,
      I_MaintPlanCallObject._MaintenanceItem._FunctionalLocation,
      I_MaintPlanCallObject._MaintenanceItem._TaskListGroup_2,
      I_MaintPlanCallObject._MaintenanceItem._TaskListGroupCounter_2,
      I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCatParam,
      _MaintenancePlanType,
      _MaintenancePlanCallStatus,
      _MaintPlanActiveSystemStatus


}