I_MaintenancePlanBasic

DDL: I_MAINTENANCEPLANBASIC SQL: IMAINTPLANBASIC Type: view BASIC

Maintenance Plan

I_MaintenancePlanBasic is a Basic CDS View that provides data about "Maintenance Plan" in SAP S/4HANA. It reads from 1 data source (mpla) and exposes 64 fields with key field MaintenancePlan. It has 20 associations to related views.

Data Sources (1)

SourceAliasJoin Type
mpla mpla from

Associations (20)

CardinalityTargetAliasCondition
[0..*] I_StatusObjectActiveStatus _StatusObjectActiveStatus _StatusObjectActiveStatus.StatusObject = $projection.MaintenancePlanInternalID
[0..*] I_MaintenanceItem _MaintenanceItem _MaintenanceItem.MaintenancePlan = $projection.MaintenancePlan
[0..1] I_MaintenancePlanCatParam _MaintenancePlanCatParam _MaintenancePlanCatParam.MaintenancePlanCategory = $projection.MaintenancePlanCategory
[0..1] I_Customer _Customer _Customer.Customer = $projection.Customer
[0..1] I_Equipment _Equipment _Equipment.Equipment = $projection.Equipment
[0..1] I_FunctionalLocationLabel _FunctionalLocationLabel _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation
[0..*] I_MaintenanceCall _MaintenanceCall _MaintenanceCall.MaintenancePlan = $projection.MaintenancePlan and _MaintenanceCall.MaintenanceCall = $projection.MaintenanceCall
[0..*] I_MaintPlanCallHistory _MaintPlanCallHistory _MaintPlanCallHistory.MaintenancePlan = $projection.MaintenancePlan
[0..1] I_MaintenanceStrategy _MaintenanceStrategy _MaintenanceStrategy.MaintenanceStrategy = $projection.MaintenanceStrategy
[0..1] I_FactoryCalendar _FactoryCalendar _FactoryCalendar.FactoryCalendar = $projection.FactoryCalendar
[0..*] I_MaintenanceCycle _MaintenanceCycle _MaintenanceCycle.MaintenancePlan = $projection.MaintenancePlan
[1..*] I_MaintenancePlanCycle _MaintenancePlanCycle _MaintenancePlanCycle.MaintenancePlan = $projection.MaintenancePlan
[0..1] I_MaintPlanSchedgInd _SchedulingIndicator _SchedulingIndicator.MaintPlanSchedgIndicator = $projection.MaintPlanSchedgIndicator
[0..1] I_UnitOfMeasure _SchedulingDurationUnit _SchedulingDurationUnit.UnitOfMeasure = $projection.SchedulingDurationUnit
[0..1] I_MaintPlanLgclOptr _LogicalOperator _LogicalOperator.LogicalOperator = $projection.MaintPlanLogicalOperatorCode
[0..1] I_TechObjAuthznGrp _AuthorizationGroup _AuthorizationGroup.TechObjAuthorizationGroup = $projection.AuthorizationGroup
[0..1] I_Indicator _MaintCallConfIsRequired _MaintCallConfIsRequired.IndicatorValue = $projection.PrdcssrCallObjCompltnIsRqd
[0..1] I_MaintenancePlanSortField _MaintenancePlanSortField _MaintenancePlanSortField.MaintenancePlanSortField = $projection.MaintPlanFreeDefinedAttrib
[0..1] I_UnitOfMeasure _MaintPlanStartBufferUnit _MaintPlanStartBufferUnit.UnitOfMeasure = $projection.MaintPlanStartBufferUnit -- Extensions, do not expose as association:
[0..1] E_MaintenancePlan _MaintenancePlanExtension $projection.MaintenancePlan = _MaintenancePlanExtension.MaintenancePlan

Annotations (14)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName IMAINTPLANBASIC view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Maintenance Plan view
ObjectModel.representativeKey MaintenancePlan view
ObjectModel.semanticKey MaintenancePlan view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #BASIC view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #CDS_MODELING_DATA_SOURCE view
AbapCatalog.preserveKey true view

Fields (64)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlan mpla warpl
MaintenancePlanDesc mpla wptxt
CreationDate mpla ersdt
CreatedByUser mpla ernam
LastChangeDate mpla aedat
LastChangedByUser mpla aenam
MaintenanceStrategy mpla strat
SchedulingDuration mpla abrho
Equipment mpla equnr
FunctionalLocation mpla tplnr
Customer mpla kunum
NumberOfMaintenanceItems mpla anzps
Language mpla langu
CycleModificationRatio mpla sfakt
MaintPlanSchedgIndicator mpla stich
CallHorizonPercent mpla horiz
CallHorizonInDays mpla horiz_days
AuthorizationGroup mpla begru
MaintenancePlanInternalID mpla objnr
MaintenanceCall mpla abnum
MaintenancePlanCategory mpla mptyp
SchedulingDurationUnit mpla hunit
BasicStartDate mpla stadt
MaintPlanFreeDefinedAttrib mpla plan_sort
FactoryCalendar mpla fabkl
MaintPlanIsLockedAgainstCalls mpla lvorm
LastChangeDateTime mpla changeddatetime
LateCompletionShiftInPercent mpla vspos
EarlyCompletionShiftInPercent mpla vsneg
LateCompletionTolerancePercent mpla topos
EarlyCompletionTolerancePct mpla toneg
MaintenanceCallHorizonCalcType
MaintPlanLogicalOperatorCode mpla andor
MultipleCounterPlanShiftFactor mpla mcp_sf
MaintPlanStartCntrReadingValue mpla szaeh
SchedulingStartDate mpla start_date
SchedulingStartTime mpla start_time
MaintPlanEndCntrReadingValue mpla end_counter
SchedulingEndDate mpla enddt_for_sched
MaintenanceLeadFloatInDays mpla puffp
MaintPlnStrtBufDurationInDays mpla tgoon
MaintPlanStartBufferUnit
PrdcssrCallObjCompltnIsRqd mpla call_confirm
MaintenancePlanHasLongText mpla ltknz
MaintenancePlanCallObject _MaintenancePlanCatParam MaintenancePlanCallObject
_StatusObjectActiveStatus _StatusObjectActiveStatus
_Customer _Customer
_Equipment _Equipment
_FunctionalLocationLabel _FunctionalLocationLabel
_MaintenanceItem _MaintenanceItem
_MaintenancePlanCatParam _MaintenancePlanCatParam
_MaintenanceCall _MaintenanceCall
_MaintPlanCallHistory _MaintPlanCallHistory
_MaintenanceStrategy _MaintenanceStrategy
_FactoryCalendar _FactoryCalendar
_MaintenanceCycle _MaintenanceCycle
_SchedulingIndicator _SchedulingIndicator
_SchedulingDurationUnit _SchedulingDurationUnit
_LogicalOperator _LogicalOperator
_AuthorizationGroup _AuthorizationGroup
_MaintCallConfIsRequired _MaintCallConfIsRequired
_MaintenancePlanSortField _MaintenancePlanSortField
_MaintPlanStartBufferUnit _MaintPlanStartBufferUnit
_MaintenancePlanCycle _MaintenancePlanCycle
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'IMAINTPLANBASIC'
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Maintenance Plan'
@ObjectModel: {
    representativeKey: 'MaintenancePlan',
    semanticKey:  'MaintenancePlan',
    usageType: {
        dataClass: #MASTER,
        serviceQuality: #A,
        sizeCategory: #L
    }
}
@VDM.viewType: #BASIC
@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.modelingPattern:             #CDS_MODELING_DATA_SOURCE
@ObjectModel.supportedCapabilities:     [ #CDS_MODELING_DATA_SOURCE ]

@AbapCatalog.preserveKey:true

define view I_MaintenancePlanBasic
  as select from mpla
  association [0..*] to I_StatusObjectActiveStatus as _StatusObjectActiveStatus on  _StatusObjectActiveStatus.StatusObject = $projection.MaintenancePlanInternalID
  association [0..*] to I_MaintenanceItem          as _MaintenanceItem          on  _MaintenanceItem.MaintenancePlan = $projection.MaintenancePlan
  association [0..1] to I_MaintenancePlanCatParam  as _MaintenancePlanCatParam  on  _MaintenancePlanCatParam.MaintenancePlanCategory = $projection.MaintenancePlanCategory
  association [0..1] to I_Customer                 as _Customer                 on  _Customer.Customer = $projection.Customer
  association [0..1] to I_Equipment                as _Equipment                on  _Equipment.Equipment = $projection.Equipment
  association [0..1] to I_FunctionalLocationLabel  as _FunctionalLocationLabel  on  _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation
  association [0..*] to I_MaintenanceCall          as _MaintenanceCall          on  _MaintenanceCall.MaintenancePlan = $projection.MaintenancePlan
                                                                                and _MaintenanceCall.MaintenanceCall = $projection.MaintenanceCall
  association [0..*] to I_MaintPlanCallHistory     as _MaintPlanCallHistory     on  _MaintPlanCallHistory.MaintenancePlan = $projection.MaintenancePlan
  association [0..1] to I_MaintenanceStrategy      as _MaintenanceStrategy      on  _MaintenanceStrategy.MaintenanceStrategy = $projection.MaintenanceStrategy

  association [0..1] to I_FactoryCalendar          as _FactoryCalendar          on  _FactoryCalendar.FactoryCalendar = $projection.FactoryCalendar
  association [0..*] to I_MaintenanceCycle         as _MaintenanceCycle         on  _MaintenanceCycle.MaintenancePlan = $projection.MaintenancePlan
  association [1..*] to I_MaintenancePlanCycle     as _MaintenancePlanCycle     on  _MaintenancePlanCycle.MaintenancePlan = $projection.MaintenancePlan
  association [0..1] to I_MaintPlanSchedgInd       as _SchedulingIndicator      on  _SchedulingIndicator.MaintPlanSchedgIndicator = $projection.MaintPlanSchedgIndicator
  association [0..1] to I_UnitOfMeasure            as _SchedulingDurationUnit   on  _SchedulingDurationUnit.UnitOfMeasure = $projection.SchedulingDurationUnit
  association [0..1] to I_MaintPlanLgclOptr        as _LogicalOperator          on  _LogicalOperator.LogicalOperator = $projection.MaintPlanLogicalOperatorCode
  association [0..1] to I_TechObjAuthznGrp         as _AuthorizationGroup       on  _AuthorizationGroup.TechObjAuthorizationGroup = $projection.AuthorizationGroup
  association [0..1] to I_Indicator                as _MaintCallConfIsRequired  on  _MaintCallConfIsRequired.IndicatorValue = $projection.PrdcssrCallObjCompltnIsRqd
  association [0..1] to I_MaintenancePlanSortField as _MaintenancePlanSortField on  _MaintenancePlanSortField.MaintenancePlanSortField = $projection.MaintPlanFreeDefinedAttrib
  association [0..1] to I_UnitOfMeasure            as _MaintPlanStartBufferUnit on  _MaintPlanStartBufferUnit.UnitOfMeasure = $projection.MaintPlanStartBufferUnit
   -- Extensions, do not expose as association:
  association [0..1] to E_MaintenancePlan          as _MaintenancePlanExtension on $projection.MaintenancePlan = _MaintenancePlanExtension.MaintenancePlan
 // association [1..1] to ZI_MaintPlanCallHorizonTypeTex as _CallHorizonUnit  on _CallHorizonUnit.MaintenanceCallHorizonCalcType     = $projection.MaintenanceCallHorizonCalcType

{
      // Key

      @ObjectModel.text.element: 'MaintenancePlanDesc'
  key mpla.warpl                                                                  as MaintenancePlan,
      // Text

      @Semantics.text: true
      mpla.wptxt                                                                  as MaintenancePlanDesc,

      @Semantics.businessDate.createdAt: true
      mpla.ersdt                                                                  as CreationDate,

      @Semantics.user.createdBy: true
      mpla.ernam                                                                  as CreatedByUser,

      @Semantics.businessDate.lastChangedAt: true
      mpla.aedat                                                                  as LastChangeDate,

      @Semantics.user.lastChangedBy: true
      mpla.aenam                                                                  as LastChangedByUser,

//      @Consumption.valueHelpDefinition: [{

//        entity: {

//            name: 'I_MaintenanceStrategyStdVH',

//            element: 'MaintenanceStrategy'

//        }

//      }]

//      @ObjectModel.foreignKey.association: '_MaintenanceStrategy'

      mpla.strat                                                                  as MaintenanceStrategy,

      @Semantics.quantity.unitOfMeasure: 'SchedulingDurationUnit'
      mpla.abrho                                                                  as SchedulingDuration,

//      @Consumption.valueHelpDefinition: [{

//        entity: {

//            name:    'I_EquipmentStdVH',

//            element: 'Equipment'

//        },

//        additionalBinding: [{

//            localElement: 'Customer',

//            element: 'Customer'

//        }]

//      }]

      @ObjectModel.foreignKey.association: '_Equipment'
      mpla.equnr                                                                  as Equipment,

      @ObjectModel.foreignKey.association: '_FunctionalLocationLabel'
//      @Consumption.valueHelpDefinition: [

//        { entity:  { name:    'I_FunctionalLocationStdVH',

//                     element: 'Equipment' }

//        }]

      mpla.tplnr                                                                  as FunctionalLocation,

      @Consumption.valueHelpDefinition: [{
        entity: {
            name: 'I_Customer_VH',
            element: 'Customer'
        }
      }]
      @ObjectModel.foreignKey.association: '_Customer'
      mpla.kunum                                                                  as Customer,

      mpla.anzps                                                                  as NumberOfMaintenanceItems,

      @Semantics.language: true
      mpla.langu                                                                  as Language,

      mpla.sfakt                                                                  as CycleModificationRatio,

      @ObjectModel.foreignKey.association: '_SchedulingIndicator'
      mpla.stich                                                                  as MaintPlanSchedgIndicator,

      mpla.horiz                                                                  as CallHorizonPercent,
      //The MaintenanceCallHorizonCalcType field has a CHAR1 type. However, the unitofmeasure annotation is expected UNIT specific type

      //@Semantics.quantity.unitOfMeasure: 'MaintenanceCallHorizonCalcType'  

      mpla.horiz_days                                                             as CallHorizonInDays,

      @ObjectModel.foreignKey.association: '_AuthorizationGroup'
      mpla.begru                                                                  as AuthorizationGroup,

      mpla.objnr                                                                  as MaintenancePlanInternalID,

      mpla.abnum                                                                  as MaintenanceCall,

      @ObjectModel.foreignKey.association: '_MaintenancePlanCatParam'
      mpla.mptyp                                                                  as MaintenancePlanCategory,

      @ObjectModel.foreignKey.association: '_SchedulingDurationUnit'
      @Semantics.unitOfMeasure: true
      mpla.hunit                                                                  as SchedulingDurationUnit,

      mpla.stadt                                                                  as BasicStartDate,

      @ObjectModel.foreignKey.association: '_MaintenancePlanSortField'
      mpla.plan_sort                                                              as MaintPlanFreeDefinedAttrib,

      @ObjectModel.foreignKey.association: '_FactoryCalendar'
      mpla.fabkl                                                                  as FactoryCalendar,

      mpla.lvorm                                                                  as MaintPlanIsLockedAgainstCalls,

      mpla.changeddatetime                                                        as LastChangeDateTime,

      mpla.vspos                                                                  as LateCompletionShiftInPercent,

      mpla.vsneg                                                                  as EarlyCompletionShiftInPercent,
 
      mpla.topos                                                                  as LateCompletionTolerancePercent,

      mpla.toneg                                                                  as EarlyCompletionTolerancePct,

      cast (mpla.horiz_qualifier as eam_cc_callhorizon_calc_type preserving type) as MaintenanceCallHorizonCalcType,

      @ObjectModel.foreignKey.association: '_LogicalOperator'
      mpla.andor                                                                  as MaintPlanLogicalOperatorCode,
  
      mpla.mcp_sf                                                                 as MultipleCounterPlanShiftFactor,

      mpla.szaeh                                                                  as MaintPlanStartCntrReadingValue,

      mpla.start_date                                                             as SchedulingStartDate,

      mpla.start_time                                                             as SchedulingStartTime,

//      @ObjectModel.foreignKey.association: '_UnitOfMeasure'

      mpla.end_counter                                                            as MaintPlanEndCntrReadingValue,
 
      mpla.enddt_for_sched                                                        as SchedulingEndDate,

      mpla.puffp                                                                  as MaintenanceLeadFloatInDays,

      mpla.tgoon                                                                  as MaintPlnStrtBufDurationInDays,

      @ObjectModel.foreignKey.association: '_MaintPlanStartBufferUnit'
      cast('TAG' as hunit)                                                        as MaintPlanStartBufferUnit,

      @Semantics.booleanIndicator: true   
      @ObjectModel.foreignKey.association: '_MaintCallConfIsRequired'
      mpla.call_confirm                                                           as PrdcssrCallObjCompltnIsRqd,
      
       mpla.ltknz                                                                 as MaintenancePlanHasLongText,  
       
       _MaintenancePlanCatParam.MaintenancePlanCallObject                         as MaintenancePlanCallObject,
      
      /* Associations */
      _StatusObjectActiveStatus,
      _Customer,
      _Equipment,
      _FunctionalLocationLabel,
      _MaintenanceItem,
      _MaintenancePlanCatParam,
      _MaintenanceCall,
      _MaintPlanCallHistory,
      _MaintenanceStrategy,
      _FactoryCalendar,
      _MaintenanceCycle,
      _SchedulingIndicator,
      _SchedulingDurationUnit,
      _LogicalOperator,
      _AuthorizationGroup,
      _MaintCallConfIsRequired,
      _MaintenancePlanSortField,
      _MaintPlanStartBufferUnit,
      _MaintenancePlanCycle
      //_CallHorizonUnit

}
where
  _MaintenancePlanCatParam.OrderCategoryScreenTypeCode <> 'O190' // stability study is not PM but QM relevant

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCEPLANCATPARAM",
"MPLA"
],
"ASSOCIATED":
[
"E_MAINTENANCEPLAN",
"I_CUSTOMER",
"I_EQUIPMENT",
"I_FACTORYCALENDAR",
"I_FUNCTIONALLOCATIONLABEL",
"I_INDICATOR",
"I_MAINTENANCECALL",
"I_MAINTENANCECYCLE",
"I_MAINTENANCEITEM",
"I_MAINTENANCEPLANCATPARAM",
"I_MAINTENANCEPLANCYCLE",
"I_MAINTENANCEPLANSORTFIELD",
"I_MAINTENANCESTRATEGY",
"I_MAINTPLANCALLHISTORY",
"I_MAINTPLANLGCLOPTR",
"I_MAINTPLANSCHEDGIND",
"I_STATUSOBJECTACTIVESTATUS",
"I_TECHOBJAUTHZNGRP",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/