CDS标准视图:维护计划 I_MaintenancePlanBasic
- 视图名称:维护计划 I_MaintenancePlanBasic
- 视图类型:基础
- 视图代码:
点击查看代码
@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
-
事务代码:IP03
-
视图结构:
字段名称 | 设备名称 |
---|---|
维护计划 | MAINTENANCEPLAN |
维护计划文本 | MAINTENANCEPLANDESC |
创建日期 | CREATIONDATE |
创建人 | CREATEDBYUSER |
更改日期 | LASTCHANGEDATE |
更改人 | LASTCHANGEDBYUSER |
策略 | MAINTENANCESTRATEGY |
计划期间 | SCHEDULINGDURATION |
设备 | EQUIPMENT |
功能位置 | FUNCTIONALLOCATION |
客户 | CUSTOMER |
项目号 | NUMBEROFMAINTENANCEITEMS |
语言 | LANGUAGE |
周期修改系数 | CYCLEMODIFICATIONRATIO |
计划标识 | MAINTPLANSCHEDGINDICATOR |
调用期 | CALLHORIZONPERCENT |
调用期 | CALLHORIZONINDAYS |
授权组 | AUTHORIZATIONGROUP |
对象编号 | MAINTENANCEPLANINTERNALID |
调用号 | MAINTENANCECALL |
维护计划类型 | MAINTENANCEPLANCATEGORY |
计划间隔的单位 | SCHEDULINGDURATIONUNIT |
周期起始 | BASICSTARTDATE |
分类字段 | MAINTPLANFREEDEFINEDATTRIB |
工厂日历 | FACTORYCALENDAR |
已锁定 | MAINTPLANISLOCKEDAGAINSTCALLS |
时戳 | LASTCHANGEDATETIME |
晚期完全 | LATECOMPLETIONSHIFTINPERCENT |
早期完全 | EARLYCOMPLETIONSHIFTINPERCENT |
允差(+) | LATECOMPLETIONTOLERANCEPERCENT |
允差(-) | EARLYCOMPLETIONTOLERANCEPCT |
计算类型 | MAINTENANCECALLHORIZONCALCTYPE |
工序类型 | MAINTPLANLOGICALOPERATORCODE |
班次因子 MCP | MULTIPLECOUNTERPLANSHIFTFACTOR |
结构计数器读数 | MAINTPLANSTARTCNTRREADINGVALUE |
开始日期 | SCHEDULINGSTARTDATE |
开始时间 | SCHEDULINGSTARTTIME |
结束计数器 | MAINTPLANENDCNTRREADINGVALUE |
计划结束日期 | SCHEDULINGENDDATE |
提前缓冲 | MAINTENANCELEADFLOATINDAYS |
详细计划 | MAINTPLNSTRTBUFDURATIONINDAYS |
计划间隔的单位 | MAINTPLANSTARTBUFFERUNIT |
完成要求 | PRDCSSRCALLOBJCOMPLTNISRQD |
长文本标识 | MAINTENANCEPLANHASLONGTEXT |
调用对象 | MAINTENANCEPLANCALLOBJECT |
本文来自博客园,作者:观兴,转载请注明原文链接:https://www.cnblogs.com/guanxing/p/18641229