R_MaintenancePlanTP

DDL: R_MAINTENANCEPLANTP Type: view_entity TRANSACTIONAL

Maintenance Plan Header

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

Data Sources (1)

SourceAliasJoin Type
I_MaintenancePlanBasic I_MaintenancePlanBasic from

Associations (21)

CardinalityTargetAliasCondition
[1..1] I_MaintenanceStrategyT _StrategyText $projection.MaintenanceStrategy = _StrategyText.MaintenanceStrategy and _StrategyText.Language = $session.system_language
[0..*] R_MaintenanceItemTP _Item $projection.MaintenancePlan = _Item.MaintenancePlan
[0..*] I_MaintenancePlanSchedule _Schedules $projection.MaintenancePlan = _Schedules.MaintenancePlan
[1..1] I_MaintPlanCallHorizonCalcType _CallHrznCalcTypeTxt $projection.CallHorizonUnit = _CallHrznCalcTypeTxt.MaintenanceCallHorizonCalcType
[0..1] I_MaintenancePlanType _MaintenancePlanType $projection.MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType
[0..1] R_MaintenancePlanCycleTP _SingleCycle $projection.MaintenancePlan = _SingleCycle.MaintenancePlan and _SingleCycle.MaintenancePlanCycle = '01'
[1..1] I_MaintenancePlanStatus _MaintPlanActiveSystemStatus $projection.MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[1..1] I_MaintPlanSchedgInd _SchedIndicator $projection.MaintPlanSchedgIndicator = _SchedIndicator.MaintPlanSchedgIndicator
[1..1] I_UnitOfMeasure _UnitOfMeasure $projection.SchedulingDurationUnit = _UnitOfMeasure.UnitOfMeasure
[1..1] I_MaintPlanLgclOptrText _LogicalOperatorText $projection.MaintPlanLogicalOperatorCode = _LogicalOperatorText.LogicalOperator and _LogicalOperatorText.Language = $session.system_language
[0..1] I_MaintPlanLgclOptr _LogicalOperator _LogicalOperator.LogicalOperator = $projection.MaintPlanLogicalOperatorCode
[0..1] I_MaintenancePlanCallDate _MaintenancePlanCallDate $projection.MaintenancePlan = _MaintenancePlanCallDate.MaintenancePlan
[0..1] I_StatusObjectStatusBasic _ActivePlan $projection.MaintenancePlanInternalID = _ActivePlan.StatusObject and _ActivePlan.StatusCode = 'I0001' and _ActivePlan.StatusIsInactive is initial
[0..1] I_StatusObjectStatusBasic _InactivePlan $projection.MaintenancePlanInternalID = _InactivePlan.StatusObject and _InactivePlan.StatusCode = 'I0320' and _InactivePlan.StatusIsInactive is initial
[0..1] I_StatusObjectStatusBasic _DeletedPlan $projection.MaintenancePlanInternalID = _DeletedPlan.StatusObject and _DeletedPlan.StatusCode = 'I0076' and _DeletedPlan.StatusIsInactive is initial
[0..1] E_MaintenancePlan _MaintenancePlanExtension $projection.MaintenancePlan = _MaintenancePlanExtension.MaintenancePlan
[0..*] R_MaintenancePlanCycleTP _MaintenanceCycle
[0..*] R_MaintPlanToMaintItemTP _MaintenanceItemLink
[0..*] R_MaintenancePlanTextTP _LongText

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Maintenance Plan Header view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.modelingPattern #TRANSACTIONAL_ENTITY view
ObjectModel.sapObjectNodeType.name MaintenancePlan view

Fields (74)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlan MaintenancePlan MaintenancePlan
MaintenancePlanDesc MaintenancePlanDesc MaintPlanText
CreationDate CreationDate Time Stamp
CreatedByUser CreatedByUser User Name
LastChangeDate LastChangeDate Time Stamp
LastChangedByUser LastChangedByUser User Name
MaintenanceStrategy MaintenanceStrategy Strategy Fields
MaintenancePlanCycleSet
SchedulingDuration SchedulingDuration SchedPeriod
SchedulingDurationUnit SchedulingDurationUnit UoM:HandlCap GR
NumberOfMaintenanceItems NumberOfMaintenanceItems No. items
CycleModificationRatio CycleModificationRatio CycModifFactor
MaintPlanSchedgIndicator MaintPlanSchedgIndicator SchedIndic.
CallHorizonPercent CallHorizonPercent Horizon
CallHorizonInDays CallHorizonInDays Call horizon
MaintenanceCallHorizonCalcType MaintenanceCallHorizonCalcType
AuthorizationGroup AuthorizationGroup AuthorizGroup
MaintenancePlanInternalID MaintenancePlanInternalID Val. Obj. No.
MaintenanceCall MaintenanceCall Call Number
MaintenancePlanCategory MaintenancePlanCategory MPlan cat.
MaintPlanFreeDefinedAttrib MaintPlanFreeDefinedAttrib Sort field
BasicStartDate BasicStartDate Municipality
SchedulingStartDate SchedulingStartDate Valn start date
SchedulingStartTime SchedulingStartTime Time Stamp
clientNULLasMaintPlanSchedgStartDateTime
MaintPlanStartCntrReadingValue
MaintPlnStrtBufDurationInDays MaintPlnStrtBufDurationInDays FurthrSchedulng
MaintPlanStartBufferUnit MaintPlanStartBufferUnit
FactoryCalendar FactoryCalendar Factory Calendar
LateCompletionShiftInPercent LateCompletionShiftInPercent Late Completion
LateCompletionTolerancePercent LateCompletionTolerancePercent Upper Limit
EarlyCompletionShiftInPercent EarlyCompletionShiftInPercent EarlyCompletion
EarlyCompletionTolerancePct EarlyCompletionTolerancePct Tolerance (-)
PrdcssrCallObjCompltnIsRqd PrdcssrCallObjCompltnIsRqd Compl.Requirmnt
MaintPlanLogicalOperatorCode Operation type
SchedulingEndDate SchedulingEndDate End Date for Sched.
MaintPlanEndCntrReadingValue
LastChangeDateTime LastChangeDateTime Timestamp
MultipleCounterPlanShiftFactor MultipleCounterPlanShiftFactor Shift Fctr MCP
MaintenanceLeadFloatInDays MaintenanceLeadFloatInDays Lead float
MaintenancePlanCallObject MaintenancePlanCallObject
IsAttachmentsEnabled
_MaintenancePlanCycle _MaintenancePlanCycle
_StatusObjectActiveStatus _StatusObjectActiveStatus
_MaintenanceItem _MaintenanceItem
_MaintenancePlanCatParam _MaintenancePlanCatParam
_MaintenancePlanType _MaintenancePlanType
_MaintenanceStrategy _MaintenanceStrategy
_MaintenanceCycle _MaintenanceCycle
_FactoryCalendar _FactoryCalendar
_SchedulingIndicator _SchedulingIndicator
_MaintPlanCallHistory _MaintPlanCallHistory
_SchedulingDurationUnit _SchedulingDurationUnit
_AuthorizationGroup _AuthorizationGroup
_MaintCallConfIsRequired _MaintCallConfIsRequired
_MaintenancePlanSortField _MaintenancePlanSortField
_MaintPlanStartBufferUnit _MaintPlanStartBufferUnit
_StrategyText _StrategyText
_Item _Item
_Schedules _Schedules
_LongText _LongText
_MaintenanceItemLink _MaintenanceItemLink
_SingleCycle _SingleCycle
_CallHrznCalcTypeTxt _CallHrznCalcTypeTxt
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_SchedIndicator _SchedIndicator
_UnitOfMeasure _UnitOfMeasure
_LogicalOperator _LogicalOperator
_LogicalOperatorText _LogicalOperatorText
_MaintenancePlanCallDate _MaintenancePlanCallDate
_ActivePlan _ActivePlan
_InactivePlan _InactivePlan
_DeletedPlan _DeletedPlan

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 R_MaintenancePlanTP.
-- 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.

CREATE VIEW R_MaintenancePlanTP AS
SELECT
  MaintenancePlan,
  MaintenancePlanDesc,
  CreationDate,
  CreatedByUser,
  LastChangeDate,
  LastChangedByUser,
  MaintenanceStrategy,
  cast(' ' as wset ) AS MaintenancePlanCycleSet,
  SchedulingDuration,
  SchedulingDurationUnit,
  NumberOfMaintenanceItems,
  CycleModificationRatio,
  MaintPlanSchedgIndicator,
  CallHorizonPercent,
  CallHorizonInDays,
  MaintenanceCallHorizonCalcType,
  AuthorizationGroup,
  MaintenancePlanInternalID,
  MaintenanceCall,
  MaintenancePlanCategory,
  MaintPlanFreeDefinedAttrib,
  BasicStartDate,
  SchedulingStartDate,
  SchedulingStartTime,
  dats_tims_to_tstmp( SchedulingStartDate, SchedulingStartTime, abap_system_timezone($session.client,'NULL'), $session.client, 'NULL' ) as MaintPlanSchedgStartDateTime AS clientNULLasMaintPlanSchedgStartDateTime,
  ltrim(MaintPlanStartCntrReadingValue, ' ') AS MaintPlanStartCntrReadingValue,
  MaintPlnStrtBufDurationInDays,
  MaintPlanStartBufferUnit,
  FactoryCalendar,
  LateCompletionShiftInPercent,
  LateCompletionTolerancePercent,
  EarlyCompletionShiftInPercent,
  EarlyCompletionTolerancePct,
  PrdcssrCallObjCompltnIsRqd,
  cast( MaintPlanLogicalOperatorCode as eams_mplan_logop preserving type ) AS MaintPlanLogicalOperatorCode,
  SchedulingEndDate,
  ltrim(MaintPlanEndCntrReadingValue, ' ') AS MaintPlanEndCntrReadingValue,
  LastChangeDateTime,
  MultipleCounterPlanShiftFactor,
  MaintenanceLeadFloatInDays,
  MaintenancePlanCallObject,
  cast(' ' as cv_orig preserving type ) AS IsAttachmentsEnabled
FROM I_MaintenancePlanBasic
LEFT OUTER JOIN I_MaintenanceStrategyT AS _StrategyText ON MaintenanceStrategy = _StrategyText.MaintenanceStrategy AND _StrategyText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN R_MaintenanceItemTP AS _Item ON MaintenancePlan = _Item.MaintenancePlan  -- association [0..*]
LEFT OUTER JOIN I_MaintenancePlanSchedule AS _Schedules ON MaintenancePlan = _Schedules.MaintenancePlan  -- association [0..*]
LEFT OUTER JOIN I_MaintPlanCallHorizonCalcType AS _CallHrznCalcTypeTxt ON CallHorizonUnit = _CallHrznCalcTypeTxt.MaintenanceCallHorizonCalcType  -- association [1..1]
LEFT OUTER JOIN I_MaintenancePlanType AS _MaintenancePlanType ON MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType  -- association [0..1]
LEFT OUTER JOIN R_MaintenancePlanCycleTP AS _SingleCycle ON MaintenancePlan = _SingleCycle.MaintenancePlan AND _SingleCycle.MaintenancePlanCycle = '01'  -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanStatus AS _MaintPlanActiveSystemStatus ON MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan  -- association [1..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_MaintPlanSchedgInd AS _SchedIndicator ON MaintPlanSchedgIndicator = _SchedIndicator.MaintPlanSchedgIndicator  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON SchedulingDurationUnit = _UnitOfMeasure.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_MaintPlanLgclOptrText AS _LogicalOperatorText ON MaintPlanLogicalOperatorCode = _LogicalOperatorText.LogicalOperator AND _LogicalOperatorText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_MaintPlanLgclOptr AS _LogicalOperator ON _LogicalOperator.LogicalOperator = MaintPlanLogicalOperatorCode  -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanCallDate AS _MaintenancePlanCallDate ON MaintenancePlan = _MaintenancePlanCallDate.MaintenancePlan  -- association [0..1]
LEFT OUTER JOIN I_StatusObjectStatusBasic AS _ActivePlan ON MaintenancePlanInternalID = _ActivePlan.StatusObject AND _ActivePlan.StatusCode = 'I0001' AND _ActivePlan.StatusIsInactive is initial  -- association [0..1]
LEFT OUTER JOIN I_StatusObjectStatusBasic AS _InactivePlan ON MaintenancePlanInternalID = _InactivePlan.StatusObject AND _InactivePlan.StatusCode = 'I0320' AND _InactivePlan.StatusIsInactive is initial  -- association [0..1]
LEFT OUTER JOIN I_StatusObjectStatusBasic AS _DeletedPlan ON MaintenancePlanInternalID = _DeletedPlan.StatusObject AND _DeletedPlan.StatusCode = 'I0076' AND _DeletedPlan.StatusIsInactive is initial  -- association [0..1]
LEFT OUTER JOIN E_MaintenancePlan AS _MaintenancePlanExtension ON MaintenancePlan = _MaintenancePlanExtension.MaintenancePlan  -- association [0..1]
LEFT OUTER JOIN R_MaintenancePlanCycleTP AS _MaintenanceCycle ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN R_MaintPlanToMaintItemTP AS _MaintenanceItemLink ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN R_MaintenancePlanTextTP AS _LongText ON /* condition not available in parsed metadata */  -- association [0..*]
;