I_MAINTPLANMAINTCALL
Maintenance calls for Maintenance Plan
I_MAINTPLANMAINTCALL is a CDS View in S/4HANA. Maintenance calls for Maintenance Plan. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaintenancePlanScheduleTP | view | from | CONSUMPTION | Maintenance Calls |
| I_MaintPlanMaintCallTP | view | from | TRANSACTIONAL | Maintenance Calls for Maint. Plan (Transactional Processing) |
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'IMNTPLNMNTCALL'
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Maintenance calls for Maintenance Plan'
@ObjectModel: {
representativeKey: 'MaintenancePlanCallNumber',
semanticKey: [ 'MaintenancePlan','MaintenancePlanCallNumber' ],
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #M
}
}
@VDM.viewType: #COMPOSITE
@AbapCatalog.preserveKey: true
define view I_MaintPlanMaintCall
as select from I_MaintPlanCallHistory
association [0..1] to I_MaintCallSchedulingType as _SchedulingType on _SchedulingType.SchedulingType = $projection.SchedulingType
association [0..1] to P_MaintenanceSingleCycle as _MaintenanceSingleCycle on _MaintenanceSingleCycle.MaintenancePlan = $projection.MaintenancePlan
association [0..1] to I_UnitOfMeasure as _MaintTaskPerformanceUnit on _MaintTaskPerformanceUnit.UnitOfMeasure = $projection.MaintenanceTaskPerformanceUnit
association [0..1] to P_MaintCallCompltnDateTime as _MaintCallCompltnDateTime on _MaintCallCompltnDateTime.MaintenancePlan = $projection.MaintenancePlan
and _MaintCallCompltnDateTime.MaintenanceCall = $projection.MaintenancePlanCallNumber
association [1..*] to I_MaintPlanCallHrznCalcTypeTxt as _CallHrznCalcTypeTxt on _CallHrznCalcTypeTxt.MaintenanceCallHorizonCalcType = $projection.MaintenanceCallHorizonCalcType
{
key MaintenancePlan,
key MaintenancePlanCallNumber,
@ObjectModel.foreignKey.association: '_SchedulingType'
max( SchedulingType ) as SchedulingType,
max( SchedulingStatus ) as SchedulingStatus,
max ( _MaintenanceSingleCycle.MeasuringPoint) as MeasuringPoint,
@ObjectModel.foreignKey.association: '_MaintTaskPerformanceUnit'
cast( max (
case _MaintenanceSingleCycle.MaintenanceTaskPerformanceUnit
when '' then _MaintenancePackage.MaintenanceTaskPerformanceUnit
else _MaintenanceSingleCycle.MaintenanceTaskPerformanceUnit
end
) as dzeieh ) as MaintenanceTaskPerformanceUnit,
min( MaintenanceCallNextPlannedDate ) as MaintenanceCallNextPlannedDate,
min( MaintenanceCallDate ) as MaintenanceCallDate,
max(
case CompletionDate
when '00000000' then _MaintCallCompltnDateTime.CompletionDate
else CompletionDate
end
) as CompletionDate,
max( _MaintCallCompltnDateTime.CompletionTime ) as CompletionTime,
min( CycleSetSequence ) as CycleSetSequence,
min( MaintCallCompltnCntrRdng ) as MaintCallCompltnCntrRdng,
min( MaintCallNextPlndCntrRdng ) as MaintCallNextPlndCntrRdng,
max( MaintenanceCallIsOutstanding ) as MaintenanceCallIsOutstanding,
max( MaintCallIsInvokedOnPlndDate ) as MaintCallIsInvokedOnPlndDate,
max( MaintCallHorizonIsNotReached ) as MaintCallHorizonIsNotReached,
min( MaintPlanLastScheduledDate ) as MaintPlanLastScheduledDate,
ReleasedByUserName,
_ReleasedByUserName.UserDescription,
cast ('' as abap.sstring(256) ) as MaintPlnCnctntdDuePackagesTxt,
cast ('' as abap.sstring(11) ) as MaintCallCompltnDateVariance,
//----------Added for new app call section enhancement--------//
max(MaintenancePackage) as MaintenancePackage,
max(MaintenanceStrategy) as MaintenanceStrategy,
max(_MaintenancePlan.MaintenanceCallHorizonCalcType) as MaintenanceCallHorizonCalcType,
max( MaintPlanPrdcssrCallCompltnDte) as MaintPlanPrdcssrCallCompltnDte,
max(MaintenancePlanManualCallDate) as MaintenancePlanManualCallDate,
_CallHrznCalcTypeTxt,
//-------------//
/* Associations - locally defined */
_MaintenancePlan,
_SchedulingType,
_MaintTaskPerformanceUnit,
_ReleasedByUserName
}
group by
MaintenancePlan,
MaintenancePlanCallNumber,
ReleasedByUserName,
_ReleasedByUserName.UserDescription
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCEPACKAGE",
"I_MAINTENANCEPLAN",
"I_MAINTPLANCALLHISTORY",
"I_USER",
"P_MAINTCALLCOMPLTNDATETIME",
"P_MAINTENANCESINGLECYCLE"
],
"ASSOCIATED":
[
"I_MAINTCALLSCHEDULINGTYPE",
"I_MAINTENANCEPLAN",
"I_MAINTPLANCALLHRZNCALCTYPETXT",
"I_UNITOFMEASURE",
"I_USER",
"P_MAINTCALLCOMPLTNDATETIME",
"P_MAINTENANCESINGLECYCLE"
],
"BASE":
[
"I_MAINTPLANCALLHISTORY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/