CDS标准视图:维护项目数据 C_MaintenanceItemDEX
- 视图名称:维护项目数据 C_MaintenanceItemDEX
- 视图类型:基础
- 视图代码:
点击查看代码
@AbapCatalog.sqlViewName: 'CMAINTITEMDEX'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Item Data Extractor'
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.privilegedAssociations: ['_LocationAccountAssignment','_Location' ]
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions:true
@Analytics: {
dataCategory: #DIMENSION,
dataExtraction: {
enabled: true,
delta.byElement: {
name: 'LastChangeDateTime'
}
}
}
@Analytics.internalName:#LOCAL
@AbapCatalog.preserveKey:true
@ObjectModel: {
usageType.serviceQuality: #D,
usageType.sizeCategory: #XL,
usageType.dataClass: #MIXED
}
@ObjectModel.representativeKey: 'MaintenanceItem'
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.modelingPattern: #EXTRACTION_DATA_SOURCE
@ObjectModel.supportedCapabilities: [ #EXTRACTION_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET, #ANALYTICAL_DIMENSION ]
define view C_MaintenanceItemDEX
as select from I_MaintenanceItemTechObj
association [0..*] to I_EquipmentData as _EquipmentData on $projection.Equipment = _EquipmentData.Equipment
association [0..1] to I_FunctionalLocationData as _FunctionalLocationData on $projection.FunctionalLocation = _FunctionalLocationData.FunctionalLocation
association [0..1] to I_Plant as _WorkCenterPlant on $projection.WorkCenterPlant = _WorkCenterPlant.Plant
association [0..1] to I_WorkCenter as _WorkCenter on $projection.workcenterinternalid = _WorkCenter.WorkCenterInternalID
and _WorkCenter.WorkCenterTypeCode = 'A'
association [0..1] to I_WorkCenterBySemanticKey as _MainWorkCenterBySemanticKey on $projection.MainWorkCenter = _MainWorkCenterBySemanticKey.WorkCenter
and $projection.MainWorkCenterPlant = _MainWorkCenterBySemanticKey.Plant //Item tab in SAPGUI
association [0..1] to I_WorkCenterBySemanticKey as _WorkCenterBySemanticKey on $projection.workcenter = _WorkCenterBySemanticKey.WorkCenter
and $projection.WorkCenterPlant = _WorkCenterBySemanticKey.Plant //Item location tab in SAPGUI
association [0..1] to I_MaintenancePlanPlant as _MaintenancePlanPlant on $projection.MaintenancePlanningPlant = _MaintenancePlanPlant.MaintenancePlanningPlant
-- Extensions, do not expose as association:
association [0..1] to E_MaintenanceItemBasic as _MaintenanceItemExtension on _MaintenanceItemExtension.MaintenanceItem = $projection.MaintenanceItem
{
@ObjectModel.text.element: ['MaintenanceItemDescription']
key MaintenanceItem,
@ObjectModel.foreignKey.association: '_LocationAccountAssignment'
MaintObjectLocAcctAssgmtNmbr,
@ObjectModel.foreignKey.association: '_MaintenancePlannerGroup'
MaintenancePlannerGroup,
@ObjectModel.foreignKey.association: '_MaintenancePlanPlant'
MaintenancePlanningPlant, //Item tab in SAPGUI
BusinessArea,
@ObjectModel.foreignKey.association: '_MainWorkCenter'
MainWorkCenterInternalID,
@ObjectModel.foreignKey.association: '_WorkCenterType'
WorkCenterTypeCode,
@ObjectModel.foreignKey.association: '_MainWorkCenterBySemanticKey'
cast( _MainWorkCenter.WorkCenter as gewrk preserving type ) as MainWorkCenter, //Item tab in SAPGUI
@ObjectModel.foreignKey.association: '_Plant'
_MainWorkCenter.Plant as MainWorkCenterPlant, //Item tab in SAPGUI
@ObjectModel.foreignKey.association: '_TaskListType'
TaskListType,
@ObjectModel.foreignKey.association: '_TaskListGroup'
TaskListGroup,
@ObjectModel.foreignKey.association: '_TaskListGroupCounter'
TaskListGroupCounter,
@ObjectModel.foreignKey.association: '_EquipmentData'
Equipment,
Assembly,
@Semantics.systemDate.createdAt: true
CreationDate,
@Semantics.user.createdBy: true
CreatedByUser,
@Semantics.systemDate.lastChangedAt: true
LastChangeDate,
@Semantics.user.lastChangedBy: true
LastChangedByUser,
@Semantics.text: true
MaintenanceItemDescription,
@ObjectModel.foreignKey.association: '_MaintenancePlan'
MaintenancePlan,
MaintenancePlanItemPosition,
@ObjectModel.foreignKey.association: '_MaintenanceStrategy'
MaintenanceStrategy,
@ObjectModel.foreignKey.association: '_MaintenancePlanCatParam'
MaintenancePlanCategory,
NotificationType,
@ObjectModel.foreignKey.association: '_MaintenanceNotification'
MaintenanceNotification,
@ObjectModel.foreignKey.association: '_PMNotificationPriorityType'
MaintPriorityType,
@ObjectModel.foreignKey.association: '_PMNotificationPriority'
MaintPriority,
@ObjectModel.foreignKey.association: '_MaintenanceOrder'
MaintenanceOrder,
@ObjectModel.foreignKey.association: '_MaintenanceActivityType'
MaintenanceActivityType,
@ObjectModel.foreignKey.association: '_MaintenanceOrderType'
MaintenanceOrderType,
//cast (SerialNumber as eam_serialnumber preserving type ) as SerialNumber,
SerialNumber,
@ObjectModel.foreignKey.association: '_Material'
Material,
@ObjectModel.foreignKey.association: '_MaintOperationSystCondition'
OperationSystemCondition,
NumberOfTaskListExecutions,
MaintenanceItemIsInactive,
ObjectInternalID,
MaintObjectCategory as MaintenanceItemCategoryCode,
@ObjectModel.foreignKey.association: '_SalesDocument'
SalesDocument,
@ObjectModel.foreignKey.association: '_PurchaseOrder'
PurchaseOrder,
@ObjectModel.foreignKey.association: '_PurchaseOrderItem'
PurchaseOrderItem,
@ObjectModel.foreignKey.association: '_SettlementOrdForServiceProcmt'
SettlementOrder as SettlementOrdForServiceProcmt,
@Semantics.systemDateTime.lastChangedAt: true
MaintPlanLastChangeDateTime as LastChangeDateTime,
//LastChangeDateTime,
ImmediateReleaseIsBlocked,
CycleSetSequence,
@ObjectModel.foreignKey.association: '_PMReferenceElement'
ReferenceElement,
@ObjectModel.foreignKey.association: '_WorkCenter'
_LocationAccountAssignment.WorkCenterInternalID,
@ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
_LocationAccountAssignment._WorkCenter.WorkCenter, //Item location tab in SAPGUI
@ObjectModel.foreignKey.association: '_WorkCenterPlant'
_LocationAccountAssignment._WorkCenter.Plant as WorkCenterPlant,
@ObjectModel.foreignKey.association: '_ABCIndicator'
_LocationAccountAssignment.ABCIndicator as ABCIndicator,
@ObjectModel.foreignKey.association: '_SettlementOrder'
_LocationAccountAssignment.SettlementOrder as SettlementOrder,
@ObjectModel.foreignKey.association: '_PlantSection'
_LocationAccountAssignment.PlantSection as PlantSection,
@ObjectModel.foreignKey.association: '_CompanyCode'
_LocationAccountAssignment.CompanyCode as CompanyCode,
@ObjectModel.foreignKey.association: '_ControllingArea'
_LocationAccountAssignment.ControllingArea as ControllingArea,
@ObjectModel.foreignKey.association: '_CostCenter'
_LocationAccountAssignment.CostCenter as CostCenter,
_LocationAccountAssignment.AssetRoom as AssetRoom,
@ObjectModel.foreignKey.association: '_WBSElementBasicData'
cast( _LocationAccountAssignment.WBSElementInternalID as ps_s4_pspnr preserving type ) as WBSElementInternalID,
//cast( _LocationAccountAssignment._WBSElementBasicData.WBSElement as ps_posid preserving type ) as WBSElement,
@ObjectModel.foreignKey.association: '_Location'
_LocationAccountAssignment.AssetLocation as AssetLocation,
@ObjectModel.foreignKey.association: '_MaintenancePlant'
_LocationAccountAssignment.MaintenancePlant as MaintenancePlant, //Item location tab in SAPGUI
@ObjectModel.foreignKey.association: '_FunctionalLocationData'
cast(_LocationAccountAssignment.FunctionalLocation as functionallocation preserving type) as FunctionalLocation,
// Make associations public
// I_MaintenanceItemTechObj
_MaintenancePlannerGroup,
_MaintenancePlanningPlant,
_MaintenancePlan, //Item location tab in SAPGUI
_MaintenanceStrategy,
_MaintenancePlanCatParam,
_PMNotificationPriority,
_Equipment,
_EquipmentData,
@ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
_FunctionalLocationData,
_MaintenanceNotification,
_MaintenanceOrder,
_MaintenanceTaskList,
_TaskListType,
_TaskListGroup_2 as _TaskListGroup,
_TaskListGroupCounter_2 as _TaskListGroupCounter,
_MaintenanceActivityType,
_MaintenanceOrderType,
_MainWorkCenter, //Item tab in SAPGUI
_MainWorkCenter._Plant,
_WorkCenterPlant,
_MainWorkCenterBySemanticKey,
_WorkCenterBySemanticKey,
_WorkCenter,
_WorkCenterType,
_Assembly,
_PMNotificationType,
_Material,
_SalesDocument,
_PurchaseOrder,
_PurchaseOrderItem,
_SettlementOrder as _SettlementOrdForServiceProcmt,
_MaintOperationSystCondition,
_PMReferenceElement,
_MaintenancePlanPlant,
// I_LocationAccountAssignment
_LocationAccountAssignment,
_LocationAccountAssignment._ABCIndicator,
_LocationAccountAssignment._SettlementOrder,
_LocationAccountAssignment._PlantSection,
_LocationAccountAssignment._CompanyCode,
_LocationAccountAssignment._ControllingArea,
_LocationAccountAssignment._CostCenter,
_LocationAccountAssignment._WBSElementBasicData,
_LocationAccountAssignment._Location,
_LocationAccountAssignment._MaintenancePlant,
_LocationAccountAssignment._FunctionalLocation,
_PMNotificationPriorityType
}
-
事务代码:IP06
-
视图结构:
字段名称 | 设备名称 |
---|---|
维护项目 | MAINTENANCEITEM |
位置/科目分配 | MAINTOBJECTLOCACCTASSGMTNMBR |
计划人员组 | MAINTENANCEPLANNERGROUP |
计划工厂 | MAINTENANCEPLANNINGPLANT |
业务范围 | BUSINESSAREA |
工作中心 | MAINWORKCENTERINTERNALID |
对象类型 | WORKCENTERTYPECODE |
主工作中心 | MAINWORKCENTER |
工厂 | MAINWORKCENTERPLANT |
任务清单类型 | TASKLISTTYPE |
组 | TASKLISTGROUP |
组计数器 | TASKLISTGROUPCOUNTER |
设备 | EQUIPMENT |
装配 | ASSEMBLY |
创建日期 | CREATIONDATE |
创建人 | CREATEDBYUSER |
更改日期 | LASTCHANGEDATE |
更改人 | LASTCHANGEDBYUSER |
维护项目文本 | MAINTENANCEITEMDESCRIPTION |
维护计划 | MAINTENANCEPLAN |
项目编号 | MAINTENANCEPLANITEMPOSITION |
策略 | MAINTENANCESTRATEGY |
维护计划类型 | MAINTENANCEPLANCATEGORY |
通知类型 | NOTIFICATIONTYPE |
通知 | MAINTENANCENOTIFICATION |
优先级类型 | MAINTPRIORITYTYPE |
优先级 | MAINTPRIORITY |
上一订单 | MAINTENANCEORDER |
维护作业类型 | MAINTENANCEACTIVITYTYPE |
订单类型 | MAINTENANCEORDERTYPE |
序列号 | SERIALNUMBER |
物料 | MATERIAL |
系统条件 | OPERATIONSYSTEMCONDITION |
任务清单因子 | NUMBEROFTASKLISTEXECUTIONS |
未激活 | MAINTENANCEITEMISINACTIVE |
对象编号 | OBJECTINTERNALID |
维护项目类别 | MAINTENANCEITEMCATEGORYCODE |
销售凭证 | SALESDOCUMENT |
采购订单 | PURCHASEORDER |
项目 | PURCHASEORDERITEM |
结算订单 | SETTLEMENTORDFORSERVICEPROCMT |
时戳 | LASTCHANGEDATETIME |
请勿释放 | IMMEDIATERELEASEISBLOCKED |
循环集顺序 | CYCLESETSEQUENCE |
参考元素 PM/PS | REFERENCEELEMENT |
PP工作中心 | WORKCENTERINTERNALID |
工作中心 | WORKCENTER |
工厂 | WORKCENTERPLANT |
ABC 标识 | ABCINDICATOR |
结算订单 | SETTLEMENTORDER |
厂区 | PLANTSECTION |
公司代码 | COMPANYCODE |
成本控制范围 | CONTROLLINGAREA |
成本中心 | COSTCENTER |
房间 | ASSETROOM |
WBS 内部标识 | WBSELEMENTINTERNALID |
位置 | ASSETLOCATION |
维护工厂 | MAINTENANCEPLANT |
功能位置 | FUNCTIONALLOCATION |
本文来自博客园,作者:观兴,转载请注明原文链接:https://www.cnblogs.com/guanxing/p/18640926