I_MaintenancePlan

DDL: I_MAINTENANCEPLAN SQL: IMAINTPLAN Type: view BASIC

Maintenance Plan

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

Data Sources (1)

SourceAliasJoin Type
mpla mpla from

Associations (19)

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.LogicalOperator
[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

Annotations (14)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName IMAINTPLAN view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Maintenance Plan view
ObjectModel.representativeKey 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
AbapCatalog.preserveKey true view
VDM.lifecycle.status #DEPERECATED view
VDM.lifecycle.successor I_MaintenancePlanBasic view

Fields (63)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlan mpla warpl MaintenancePlan
MaintenancePlanDesc mpla wptxt MaintPlanText
CreationDate mpla ersdt Created On
CreatedByUser mpla ernam User Name
LastChangeDate mpla aedat Obsolete
LastChangedByUser mpla aenam User Name
MaintenanceStrategy mpla strat Strategy Fields
SchedulingDuration mpla abrho SchedPeriod
Equipment mpla equnr Equipment
FunctionalLocation mpla tplnr Functional loc.
Customer mpla kunum Customer
NumberOfMaintenanceItems mpla anzps No. items
Language mpla langu Primary lang.
CycleModificationRatio mpla sfakt CycModifFactor
MaintPlanSchedgIndicator mpla stich SchedIndic.
CallHorizonPercent mpla horiz Horizon
CallHorizonInDays mpla horiz_days Call horizon
AuthorizationGroup mpla begru AuthorizGroup
MaintenancePlanInternalID mpla objnr Val. Obj. No.
MaintenanceCall mpla abnum Stage number
MaintenancePlanCategory mpla mptyp MPlan cat.
SchedulingDurationUnit mpla hunit UoM:HandlCap GR
BasicStartDate mpla stadt Municipality
MaintPlanFreeDefinedAttrib mpla plan_sort Sort field
FactoryCalendar mpla fabkl Factory Calend.
MaintPlanIsLockedAgainstCalls mpla lvorm Stock del. flag
LastChangeDateTime mpla changeddatetime Time Stamp
LateCompletionShiftFactor mpla vspos Late Completion
EarlyCompletionShiftFactor mpla vsneg EarlyCompletion
LateCompletionTolerancePercent mpla topos Upper Limit
EarlyCompletionTolerancePct mpla toneg Tolerance (-)
MaintenanceCallHorizonCalcType
LogicalOperator mpla andor Operation type
MultipleCounterPlanShiftFactor mpla mcp_sf Shift Fctr MCP
MaintSchedulingStartCounter mpla szaeh StrtCtrReadg
SchedulingStartDate mpla start_date Valn start date
SchedulingStartTime mpla start_time Time Stamp
MaintSchedulingEndCounter mpla end_counter End Counter
SchedulingEndDate mpla enddt_for_sched End Date for Sched.
MaintenanceLeadFloatInDays mpla puffp Lead float
MaintPlanStartBufferQuantity mpla tgoon FurthrSchedulng
MaintPlanStartBufferUnit
PrdcssrCallObjCompltnIsRqd mpla call_confirm Compl.Requirmnt
MaintenancePlanHasLongText mpla ltknz L-Text Indicat.
_StatusObjectActiveStatus _StatusObjectActiveStatus
_Customer _Customer
_Equipment _Equipment
_FunctionalLocationLabel _FunctionalLocationLabel
_MaintenanceItem _MaintenanceItem
_MaintenancePlanCatParam _MaintenancePlanCatParam
_MaintenanceCall _MaintenanceCall
_MaintPlanCallHistory _MaintPlanCallHistory
_MaintenanceStrategy _MaintenanceStrategy
_FactoryCalendar _FactoryCalendar
_MaintenanceCycle _MaintenanceCycle
_MaintenancePlanCycle _MaintenancePlanCycle
_SchedulingIndicator _SchedulingIndicator
_SchedulingDurationUnit _SchedulingDurationUnit
_LogicalOperator _LogicalOperator
_AuthorizationGroup _AuthorizationGroup
_MaintCallConfIsRequired _MaintCallConfIsRequired
_MaintenancePlanSortField _MaintenancePlanSortField
_MaintPlanStartBufferUnit _MaintPlanStartBufferUnit

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_MaintenancePlan.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IMAINTPLAN

CREATE VIEW I_MaintenancePlan AS
SELECT
  mpla.warpl AS MaintenancePlan,
  mpla.wptxt AS MaintenancePlanDesc,
  mpla.ersdt AS CreationDate,
  mpla.ernam AS CreatedByUser,
  mpla.aedat AS LastChangeDate,
  mpla.aenam AS LastChangedByUser,
  mpla.strat AS MaintenanceStrategy,
  mpla.abrho AS SchedulingDuration,
  mpla.equnr AS Equipment,
  mpla.tplnr AS FunctionalLocation,
  mpla.kunum AS Customer,
  mpla.anzps AS NumberOfMaintenanceItems,
  mpla.langu AS Language,
  mpla.sfakt AS CycleModificationRatio,
  mpla.stich AS MaintPlanSchedgIndicator,
  mpla.horiz AS CallHorizonPercent,
  mpla.horiz_days AS CallHorizonInDays,
  mpla.begru AS AuthorizationGroup,
  mpla.objnr AS MaintenancePlanInternalID,
  mpla.abnum AS MaintenanceCall,
  mpla.mptyp AS MaintenancePlanCategory,
  mpla.hunit AS SchedulingDurationUnit,
  mpla.stadt AS BasicStartDate,
  mpla.plan_sort AS MaintPlanFreeDefinedAttrib,
  mpla.fabkl AS FactoryCalendar,
  mpla.lvorm AS MaintPlanIsLockedAgainstCalls,
  mpla.changeddatetime AS LastChangeDateTime,
  mpla.vspos AS LateCompletionShiftFactor,
  mpla.vsneg AS EarlyCompletionShiftFactor,
  mpla.topos AS LateCompletionTolerancePercent,
  mpla.toneg AS EarlyCompletionTolerancePct,
  cast (mpla.horiz_qualifier as eam_cc_callhorizon_calc_type preserving type) AS MaintenanceCallHorizonCalcType,
  mpla.andor AS LogicalOperator,
  mpla.mcp_sf AS MultipleCounterPlanShiftFactor,
  mpla.szaeh AS MaintSchedulingStartCounter,
  mpla.start_date AS SchedulingStartDate,
  mpla.start_time AS SchedulingStartTime,
  mpla.end_counter AS MaintSchedulingEndCounter,
  mpla.enddt_for_sched AS SchedulingEndDate,
  mpla.puffp AS MaintenanceLeadFloatInDays,
  mpla.tgoon AS MaintPlanStartBufferQuantity,
  cast('TAG' as hunit) AS MaintPlanStartBufferUnit,
  mpla.call_confirm AS PrdcssrCallObjCompltnIsRqd,
  mpla.ltknz AS MaintenancePlanHasLongText
FROM mpla
LEFT OUTER JOIN I_StatusObjectActiveStatus AS _StatusObjectActiveStatus ON _StatusObjectActiveStatus.StatusObject = MaintenancePlanInternalID  -- association [0..*]
LEFT OUTER JOIN I_MaintenanceItem AS _MaintenanceItem ON _MaintenanceItem.MaintenancePlan = MaintenancePlan  -- association [0..*]
LEFT OUTER JOIN I_MaintenancePlanCatParam AS _MaintenancePlanCatParam ON _MaintenancePlanCatParam.MaintenancePlanCategory = MaintenancePlanCategory  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON _Customer.Customer = Customer  -- association [0..1]
LEFT OUTER JOIN I_Equipment AS _Equipment ON _Equipment.Equipment = Equipment  -- association [0..1]
LEFT OUTER JOIN I_FunctionalLocationLabel AS _FunctionalLocationLabel ON _FunctionalLocationLabel.FunctionalLocation = FunctionalLocation  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceCall AS _MaintenanceCall ON _MaintenanceCall.MaintenancePlan = MaintenancePlan AND _MaintenanceCall.MaintenanceCall = MaintenanceCall  -- association [0..*]
LEFT OUTER JOIN I_MaintPlanCallHistory AS _MaintPlanCallHistory ON _MaintPlanCallHistory.MaintenancePlan = MaintenancePlan  -- association [0..*]
LEFT OUTER JOIN I_MaintenanceStrategy AS _MaintenanceStrategy ON _MaintenanceStrategy.MaintenanceStrategy = MaintenanceStrategy  -- association [0..1]
LEFT OUTER JOIN I_FactoryCalendar AS _FactoryCalendar ON _FactoryCalendar.FactoryCalendar = FactoryCalendar  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceCycle AS _MaintenanceCycle ON _MaintenanceCycle.MaintenancePlan = MaintenancePlan  -- association [0..*]
LEFT OUTER JOIN I_MaintenancePlanCycle AS _MaintenancePlanCycle ON _MaintenancePlanCycle.MaintenancePlan = MaintenancePlan  -- association [1..*]
LEFT OUTER JOIN I_MaintPlanSchedgInd AS _SchedulingIndicator ON _SchedulingIndicator.MaintPlanSchedgIndicator = MaintPlanSchedgIndicator  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _SchedulingDurationUnit ON _SchedulingDurationUnit.UnitOfMeasure = SchedulingDurationUnit  -- association [0..1]
LEFT OUTER JOIN I_MaintPlanLgclOptr AS _LogicalOperator ON _LogicalOperator.LogicalOperator = LogicalOperator  -- association [0..1]
LEFT OUTER JOIN I_TechObjAuthznGrp AS _AuthorizationGroup ON _AuthorizationGroup.TechObjAuthorizationGroup = AuthorizationGroup  -- association [0..1]
LEFT OUTER JOIN I_Indicator AS _MaintCallConfIsRequired ON _MaintCallConfIsRequired.IndicatorValue = PrdcssrCallObjCompltnIsRqd  -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanSortField AS _MaintenancePlanSortField ON _MaintenancePlanSortField.MaintenancePlanSortField = MaintPlanFreeDefinedAttrib  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _MaintPlanStartBufferUnit ON _MaintPlanStartBufferUnit.UnitOfMeasure = MaintPlanStartBufferUnit  -- association [0..1]
;