R_MaintenancePlanTP
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 71 fields with key field MaintenancePlan. It has 17 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintenancePlanBasic | I_MaintenancePlanBasic | from |
Associations (17)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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..*] | R_MaintenancePlanCycleTP | _MaintenanceCycle | |
| [0..*] | R_MaintPlanToMaintItemTP | _MaintenanceItemLink | |
| [0..*] | R_MaintenancePlanTextTP | _LongText | |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 (71)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaintenancePlan | MaintenancePlan | ||
| MaintenancePlanDesc | MaintenancePlanDesc | |||
| CreationDate | CreationDate | |||
| CreatedByUser | CreatedByUser | |||
| LastChangeDate | LastChangeDate | |||
| LastChangedByUser | LastChangedByUser | |||
| MaintenanceStrategy | MaintenanceStrategy | |||
| MaintenancePlanCycleSet | ||||
| SchedulingDuration | SchedulingDuration | |||
| SchedulingDurationUnit | SchedulingDurationUnit | |||
| NumberOfMaintenanceItems | NumberOfMaintenanceItems | |||
| CycleModificationRatio | CycleModificationRatio | |||
| MaintPlanSchedgIndicator | MaintPlanSchedgIndicator | |||
| CallHorizonPercent | CallHorizonPercent | |||
| CallHorizonInDays | CallHorizonInDays | |||
| MaintenanceCallHorizonCalcType | MaintenanceCallHorizonCalcType | |||
| AuthorizationGroup | AuthorizationGroup | |||
| MaintenancePlanInternalID | MaintenancePlanInternalID | |||
| MaintenanceCall | MaintenanceCall | |||
| MaintenancePlanCategory | MaintenancePlanCategory | |||
| MaintPlanFreeDefinedAttrib | MaintPlanFreeDefinedAttrib | |||
| BasicStartDate | BasicStartDate | |||
| SchedulingStartDate | SchedulingStartDate | |||
| SchedulingStartTime | SchedulingStartTime | |||
| clientNULLasMaintPlanSchedgStartDateTime | ||||
| MaintPlanStartCntrReadingValue | ||||
| MaintPlnStrtBufDurationInDays | MaintPlnStrtBufDurationInDays | |||
| MaintPlanStartBufferUnit | MaintPlanStartBufferUnit | |||
| FactoryCalendar | FactoryCalendar | |||
| LateCompletionShiftInPercent | LateCompletionShiftInPercent | |||
| LateCompletionTolerancePercent | LateCompletionTolerancePercent | |||
| EarlyCompletionShiftInPercent | EarlyCompletionShiftInPercent | |||
| EarlyCompletionTolerancePct | EarlyCompletionTolerancePct | |||
| PrdcssrCallObjCompltnIsRqd | PrdcssrCallObjCompltnIsRqd | |||
| MaintPlanLogicalOperatorCode | ||||
| SchedulingEndDate | SchedulingEndDate | |||
| MaintPlanEndCntrReadingValue | ||||
| LastChangeDateTime | LastChangeDateTime | |||
| MultipleCounterPlanShiftFactor | MultipleCounterPlanShiftFactor | |||
| MaintenanceLeadFloatInDays | MaintenanceLeadFloatInDays | |||
| 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 |
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@EndUserText.label: 'Maintenance Plan Header'
@VDM: {
usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE],
viewType: #TRANSACTIONAL,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@ObjectModel : {
usageType : {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
},
modelingPattern: #TRANSACTIONAL_ENTITY,
supportedCapabilities: [ #TRANSACTIONAL_PROVIDER ],
semanticKey: ['MaintenancePlan']
}
@ObjectModel.sapObjectNodeType.name: 'MaintenancePlan'
define root view entity R_MaintenancePlanTP
as select from I_MaintenancePlanBasic
composition [0..*] of R_MaintenancePlanCycleTP as _MaintenanceCycle
composition [0..*] of R_MaintPlanToMaintItemTP as _MaintenanceItemLink
association [1..1] to I_MaintenanceStrategyT as _StrategyText on $projection.MaintenanceStrategy = _StrategyText.MaintenanceStrategy
and _StrategyText.Language = $session.system_language
composition [0..*] of R_MaintenancePlanTextTP as _LongText
association [0..*] to R_MaintenanceItemTP as _Item on $projection.MaintenancePlan = _Item.MaintenancePlan
association [0..*] to I_MaintenancePlanSchedule as _Schedules on $projection.MaintenancePlan = _Schedules.MaintenancePlan
association [1..1] to I_MaintPlanCallHorizonCalcType as _CallHrznCalcTypeTxt on $projection.CallHorizonUnit = _CallHrznCalcTypeTxt.MaintenanceCallHorizonCalcType
association [0..1] to I_MaintenancePlanType as _MaintenancePlanType on $projection.MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType
association [0..1] to R_MaintenancePlanCycleTP as _SingleCycle on $projection.MaintenancePlan = _SingleCycle.MaintenancePlan
and _SingleCycle.MaintenancePlanCycle = '01'
association [1..1] to I_MaintenancePlanStatus as _MaintPlanActiveSystemStatus on $projection.MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
association [1..1] to I_MaintPlanSchedgInd as _SchedIndicator on $projection.MaintPlanSchedgIndicator = _SchedIndicator.MaintPlanSchedgIndicator
association [1..1] to I_UnitOfMeasure as _UnitOfMeasure on $projection.SchedulingDurationUnit = _UnitOfMeasure.UnitOfMeasure
association [1..1] to I_MaintPlanLgclOptrText as _LogicalOperatorText on $projection.MaintPlanLogicalOperatorCode = _LogicalOperatorText.LogicalOperator
and _LogicalOperatorText.Language = $session.system_language
association [0..1] to I_MaintPlanLgclOptr as _LogicalOperator on _LogicalOperator.LogicalOperator = $projection.MaintPlanLogicalOperatorCode
association [0..1] to I_MaintenancePlanCallDate as _MaintenancePlanCallDate on $projection.MaintenancePlan = _MaintenancePlanCallDate.MaintenancePlan
{
key MaintenancePlan,
MaintenancePlanDesc,
CreationDate,
CreatedByUser,
LastChangeDate,
LastChangedByUser,
MaintenanceStrategy,
cast(' ' as wset ) as MaintenancePlanCycleSet,
SchedulingDuration,
SchedulingDurationUnit,
NumberOfMaintenanceItems,
CycleModificationRatio,
MaintPlanSchedgIndicator,
cast(
case MaintenanceStrategy
when '' then
case 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,
CallHorizonPercent,
CallHorizonInDays,
MaintenanceCallHorizonCalcType,
cast( case when MaintenanceCallHorizonCalcType = '' then '%'
else MaintenanceCallHorizonCalcType end as eam_cc_callhorizon_calc_type preserving type ) as CallHorizonUnit,
AuthorizationGroup,
MaintenancePlanInternalID,
MaintenanceCall,
MaintenancePlanCategory,
MaintPlanFreeDefinedAttrib,
BasicStartDate,
SchedulingStartDate,
SchedulingStartTime,
//Start of change - Merge StartDateTime
@Semantics.dateTime: true
dats_tims_to_tstmp( SchedulingStartDate,
SchedulingStartTime,
abap_system_timezone($session.client,'NULL'),
$session.client,
'NULL' ) as MaintPlanSchedgStartDateTime,
//End of change - Merge StartDateTime
ltrim(MaintPlanStartCntrReadingValue, ' ') as MaintPlanStartCntrReadingValue,
MaintPlnStrtBufDurationInDays,
MaintPlanStartBufferUnit,
FactoryCalendar,
LateCompletionShiftInPercent,
LateCompletionTolerancePercent,
EarlyCompletionShiftInPercent,
EarlyCompletionTolerancePct,
PrdcssrCallObjCompltnIsRqd,
@ObjectModel.foreignKey.association: '_LogicalOperator'
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,
case when (_MaintPlanActiveSystemStatus.MaintPlanIsMarkedForDeletion = 1 ) then 'I0076'
else case when (_MaintPlanActiveSystemStatus.MaintenancePlanIsInactive = 1 ) then 'I0320'
else 'I0001' end end as SystemStatus,
_MaintenancePlanCycle,
_StatusObjectActiveStatus,
_MaintenanceItem,
_MaintenancePlanCatParam,
_MaintenancePlanType,
_MaintenanceStrategy,
_MaintenanceCycle,
_FactoryCalendar,
_SchedulingIndicator,
_MaintPlanCallHistory,
_SchedulingDurationUnit,
_AuthorizationGroup,
_MaintCallConfIsRequired,
_MaintenancePlanSortField,
_MaintPlanStartBufferUnit,
_StrategyText,
_Item,
_Schedules,
_LongText,
_MaintenanceItemLink,
_SingleCycle,
_CallHrznCalcTypeTxt,
_CreatedByUser,
_LastChangedByUser,
_SchedIndicator,
_UnitOfMeasure,
_LogicalOperator,
_LogicalOperatorText,
_MaintenancePlanCallDate
} where ( _MaintenancePlanCatParam.MaintenancePlanCallObject is initial or _MaintenancePlanCatParam.MaintenancePlanCallObject = '2' or MaintenancePlanCallObject = '5' )
and _MaintenancePlanCatParam.MaintPlanHasContract <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCEPLANBASIC",
"I_MAINTENANCEPLANCATPARAM",
"I_MAINTENANCEPLANSTATUS"
],
"ASSOCIATED":
[
"I_FACTORYCALENDAR",
"I_INDICATOR",
"I_MAINTENANCEITEM",
"I_MAINTENANCEPLANCALLDATE",
"I_MAINTENANCEPLANCATPARAM",
"I_MAINTENANCEPLANCYCLE",
"I_MAINTENANCEPLANSCHEDULE",
"I_MAINTENANCEPLANSORTFIELD",
"I_MAINTENANCEPLANTYPE",
"I_MAINTENANCESTRATEGY",
"I_MAINTENANCESTRATEGYT",
"I_MAINTPLANCALLHISTORY",
"I_MAINTPLANCALLHORIZONCALCTYPE",
"I_MAINTPLANLGCLOPTR",
"I_MAINTPLANLGCLOPTRTEXT",
"I_MAINTPLANSCHEDGIND",
"I_STATUSOBJECTACTIVESTATUS",
"I_TECHOBJAUTHZNGRP",
"I_UNITOFMEASURE",
"I_USER",
"R_MAINTENANCEITEMTP",
"R_MAINTENANCEPLANCYCLETP",
"R_MAINTENANCEPLANTEXTTP",
"R_MAINTPLANTOMAINTITEMTP"
],
"BASE":
[
"I_MAINTENANCEPLANBASIC"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA