I_MAINTENANCEPLANBASIC

CDS View

Maintenance Plan

I_MAINTENANCEPLANBASIC is a CDS View in S/4HANA. Maintenance Plan. It contains 7 fields. 10 CDS views read from this table.

CDS Views using this table (10)

ViewTypeJoinVDMDescription
C_Insplot_Object view left_outer CONSUMPTION Inspection Lot Object Page
I_MaintenancePlanSituation view_entity from COMPOSITE Situation Handling Maint Plan Header
I_MaintenancePlanStatus view from COMPOSITE Maintenance Plan System Status
I_MaintenancePlanText view from COMPOSITE Maintenance Plan Long Text
P_MaintenancePlanSearch view from BASIC
P_RSHMaintAssetBoardShapes view union_all CONSUMPTION Maintenance asset board shapes
P_RSHMaintPlanConsumption view from CONSUMPTION Maintenance Plan Consumption
R_MaintenancePlanTP view_entity from TRANSACTIONAL Maintenance Plan Header
R_MaintPlanClfnCharValueTP view inner TRANSACTIONAL Maintenance Plan Classification Class Characteristics Value
R_MaintPlanClfnClassTP view inner TRANSACTIONAL Maintenance Plan Classification Class

Fields (7)

KeyField CDS FieldsUsed in Views
KEY MaintenancePlan MaintenancePlan 4
AuthorizationGroup AuthorizationGroup 1
Language Language 1
MaintenancePlanCallObject MaintenancePlanCallObject 1
MaintenancePlanDesc MaintenancePlanDesc 1
MaintenanceStrategy MaintenanceStrategy 1
MaintPlanSchedgIndicator MaintPlanSchedgIndicator 1
@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