@AbapCatalog.sqlViewName: 'CMAINTORDTP'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@EndUserText.label: 'Maintenance Order with Draft'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel: {
representativeKey: 'MaintenanceOrder',
semanticKey: ['MaintenanceOrder'],
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
transactionalProcessingDelegated: true,
compositionRoot:true,
draftEnabled: true
}
@Search.searchable: true
@UI: {
headerInfo: {
description: {
value: 'MaintenanceOrderDesc',
type: #STANDARD
},
title: {
value: 'MaintenanceOrder',
type: #STANDARD
},
typeName: 'Maintenance Order',
typeNamePlural: 'Maintenance Orders'
}
}
define view C_MaintOrderTP
as select from I_MaintOrderTP as _MaintOrderTP
association [0..*] to C_MaintOrderOperationTP as _MaintOrderOperationTP on $projection.MaintenanceOrder = _MaintOrderOperationTP.MaintenanceOrder
association [0..1] to I_MaintOrderPlantDefaults as _PlanningPlantDefaults on $projection.MaintenancePlanningPlant = _PlanningPlantDefaults.Plant
association [0..*] to C_MaintenanceJobWorkItem as _MaintenanceJobWorkItem on $projection.MaintenanceOrder = _MaintenanceJobWorkItem.MaintenanceOrder
association [0..*] to I_GenericPriorityText as _PriorityText on _PriorityText.GenericPriorityType = $projection.MaintPriorityType
and _PriorityText.PriorityCode = $projection.MaintPriority
association [0..1] to I_WorkCenter as _WorkCenter on $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID
and $projection.WorkCenterTypeCode = _WorkCenter.WorkCenterTypeCode
association [0..*] to I_WorkCenterText as _WorkCenterText on $projection.WorkCenterInternalID = _WorkCenterText.WorkCenterInternalID
and $projection.WorkCenterTypeCode = _WorkCenterText.WorkCenterTypeCode
association [0..*] to I_OrderTypeText as _OrderTypeText on _OrderTypeText.OrderType = $projection.MaintenanceOrderType
// association [1] to C_TechObjQuickVw as _TechnicalObjectQuickVw on $projection.TechObjIsEquipOrFuncnlLoc = _TechnicalObjectQuickVw.TechObjIsEquipOrFuncnlLoc
// and $projection.TechnicalObject = _TechnicalObjectQuickVw.TechnicalObject
association [0..1] to I_PMContactCardUser as _PMContactCardUser on _PMContactCardUser.UserID = $projection.CreatedByUser
{
@Consumption.semanticObject: 'MaintenanceOrder'
key _MaintOrderTP.MaintenanceOrder,
@UI.hidden: true
_MaintOrderTP.MaintenanceOrderForEdit,
@Consumption.semanticObject: 'MaintenanceObject'
_MaintOrderTP.TechnicalObject,
_MaintOrderTP.TechObjIsEquipOrFuncnlLoc,
@UI.hidden: true
_MaintOrderTP.MaintPriorityType,
@ObjectModel.text.association: '_PriorityText'
@EndUserText.label: 'Priority'
@UI.textArrangement: #TEXT_ONLY
@ObjectModel.readOnly: true
_MaintOrderTP.MaintPriority,
@UI.hidden: true
_MaintOrderTP.MaintenanceProcessingPhase,
@UI.hidden: true
_MaintOrderTP.MaintObjectLocAcctAssgmtNmbr,
@Consumption.semanticObject: 'MaintenanceNotification'
_MaintOrderTP.MaintenanceNotification,
_MaintOrderTP.Equipment,
_MaintOrderTP.FunctionalLocation,
_MaintOrderTP.MaintenanceItem,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaterialStdVH',
element: 'Material' }
}]
// ]--GENERATED
_MaintOrderTP.Assembly,
_MaintOrderTP.SerialNumber,
_MaintOrderTP.MaintenancePlanningPlant,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaintPlnrGrpStdVH',
element: 'MaintenancePlannerGroup' },
additionalBinding: [{ localElement: 'MaintenancePlanningPlant',
element: 'MaintenancePlanningPlant' }]
}]
// ]--GENERATED
_MaintOrderTP.MaintenancePlannerGroup,
_MaintOrderTP.OperationSystemCondition,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaintenanceRevisionStdVH',
element: 'MaintenanceRevision' },
additionalBinding: [{ localElement: 'MaintenancePlanningPlant',
element: 'MaintenancePlanningPlant' }]
}]
// ]--GENERATED
_MaintOrderTP.MaintenanceRevision,
_MaintOrderTP.MaintenancePlan,
@UI.hidden: true
_MaintOrderTP.MaintOrderRoutingNumber,
@ObjectModel.readOnly: true
@ObjectModel.text.association: '_OrderTypeText'
_MaintOrderTP.MaintenanceOrderType,
@UI.hidden: true
_MaintOrderTP.MaintenanceOrderCategory,
@Search.defaultSearchElement: true
_MaintOrderTP.MaintenanceOrderDesc,
_MaintOrderTP.MaintOrdBasicStartDate,
_MaintOrderTP.MaintOrdBasicEndDate,
@EndUserText.label: 'Schedule Start Date'
_MaintOrderTP.ScheduledBasicStartDate,
@EndUserText.label: 'Schedule End Date'
_MaintOrderTP.ScheduledBasicEndDate,
_MaintOrderTP.LatestAcceptableCompletionDate,
@UI.hidden: true
_MaintOrderTP.MaintenanceOrderInternalID,
_MaintOrderTP.AuthorizationGroup,
_MaintOrderTP.MaintenancePlant,
_MaintOrderTP.ControllingArea,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaintActyTypeStdVH',
element: 'MaintenanceActivityType' }
}]
// ]--GENERATED
_MaintOrderTP.MaintenanceActivityType,
_MaintOrderTP.ResponsibleCostCenter,
@UI.hidden: true
_MaintOrderTP.MaintOrderSourceApplication,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PersWrkAgrmtSrchHelp',
element: 'PersonWorkAgreement' }
}]
// ]--GENERATED
@Consumption.hidden: true
_MaintOrderTP.MaintOrdPersonResponsible,
@EndUserText.label: 'Phase'
@UI: {
textArrangement: #TEXT_ONLY
}
// @ObjectModel.foreignKey.association: '_EAMProcessPhase'
@ObjectModel.text.element: ['EAMProcessPhaseCodeDesc']
_MaintOrderTP.MaintOrdProcessPhaseCode,
@ObjectModel.readOnly: true
@EndUserText.label: 'Phase'
_MaintOrderTP._EAMProcessPhase._EAMProcessPhaseText[1:Language = $session.system_language].EAMProcessPhaseCodeDesc as EAMProcessPhaseCodeDesc,
@EndUserText.label: 'Subphase'
@UI: {
textArrangement: #TEXT_ONLY
}
// @ObjectModel.foreignKey.association: '_EAMProcessSubphase'
@ObjectModel.text.element: ['EAMProcessSubphaseCodeDesc']
_MaintOrderTP.MaintOrdProcessSubPhaseCode,
@ObjectModel.readOnly: true
@EndUserText.label: 'Subphase'
_MaintOrderTP._EAMProcessSubPhase._EAMProcessSubPhaseText[1:Language = $session.system_language].EAMProcessSubPhaseCodeDesc as EAMProcessSubPhaseCodeDesc,
@ObjectModel.text.association: '_WorkCenterText'
@ObjectModel.readOnly: true
_WorkCenter.WorkCenter,
// @ObjectModel.readOnly: true
// _TechnicalObjectQuickVw.AssetManufacturerName,
// @ObjectModel.readOnly: true
// _TechnicalObjectQuickVw.TechnicalObjectDescription,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_MALFUNC_TECHOBJDET_EXIT'
cast( '' as herst ) as AssetManufacturerName,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_MALFUNC_TECHOBJDET_EXIT'
cast( '' as eams_tec_obj_des ) as TechnicalObjectDescription,
@EndUserText.label: 'Created By'
@ObjectModel.foreignKey.association: '_PMContactCardUser'
// case when _PMContactCardUser.FullName is not null and _PMContactCardUser.FullName != '' then _PMContactCardUser.FullName
// when _PMContactCardUser.UserID is not null and _PMContactCardUser.UserID != '' then _PMContactCardUser.UserID
// else _MaintOrderTP.CreatedByUser end as CreatedByUser,
_MaintOrderTP.CreatedByUser,
@ObjectModel.readOnly: true
_PMContactCardUser.FullName,
@EndUserText.label: 'Created On'
_MaintOrderTP.CreationDate,
/* Associations */
_PlanningPlantDefaults,
_MaintOrderTP._Equipment,
_MaintOrderTP._LocationAccountAssignment,
_MaintOrderTP._MaintenanceNotification,
_MaintOrderTP._MaintenanceOrderPhase,
_MaintOrderTP._MaintenancePlan,
_MaintOrderTP._MaintenancePriority,
_MaintOrderTP._MaintenancePriorityType,
@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
_MaintOrderOperationTP,
_MaintOrderTP._Order,
_MaintOrderTP._OperationSystemCondition,
@ObjectModel.filter.transformedBy: 'CL_EAM_TECHOBJ_FILTER_EXIT'
_MaintOrderTP._TechnicalObject,
_MaintOrderTP._TechObjIsEquipOrFuncnlLoc,
_MaintOrderTP._MaintenanceActivityType,
_MaintOrderTP._Assembly,
_MaintOrderTP._MaintenanceOrderCategory,
_MaintOrderTP._MaintenanceOrderType,
_MaintOrderTP._MaintenancePlannerGroup,
_MaintOrderTP._MaintenancePlanningPlant,
_MaintOrderTP._MaintenanceRevision,
_MaintOrderTP._StatusObject,
_MaintOrderTP._StatusObjectStatus,
_MaintOrderTP._MaintOrdPersonResponsible,
_MaintOrderTP.WorkCenterInternalID,
_MaintOrderTP.WorkCenterTypeCode,
_WorkCenter,
_WorkCenterText,
_PriorityText,
_PMContactCardUser,
_OrderTypeText,
// _WorkCenterText,
// _MaintOrderTP.EAMProcessPhaseCodeDesc,
_MaintOrderTP._EAMProcessPhase,
_MaintOrderTP._EAMProcessSubPhase,
_MaintenanceJobWorkItem
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EAMPROCESSPHASE",
"I_EAMPROCESSPHASETEXT",
"I_EAMPROCESSSUBPHASE",
"I_EAMPROCESSSUBPHASETEXT",
"I_MAINTORDERTP",
"I_PMCONTACTCARDUSER",
"I_WORKCENTER"
],
"ASSOCIATED":
[
"C_MAINTENANCEJOBWORKITEM",
"C_MAINTORDEROPERATIONTP",
"I_EAMPROCESSPHASE",
"I_EAMPROCESSSUBPHASE",
"I_EQUIPMENT",
"I_GENERICPRIORITYTEXT",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_LOGISTICSORDER",
"I_MAINTENANCEACTIVITYTYPE",
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCEORDERPHASE",
"I_MAINTENANCEPLANBASIC",
"I_MAINTENANCEPLANNERGROUP",
"I_MAINTENANCEREVISION",
"I_MAINTOPERATIONSYSTCONDITION",
"I_MAINTORDERPLANTDEFAULTS",
"I_MATERIAL",
"I_ORDERCATEGORY",
"I_ORDERTYPE",
"I_ORDERTYPETEXT",
"I_PERSONWORKAGREEMENT_1",
"I_PLANT",
"I_PMCONTACTCARDUSER",
"I_PMNOTIFICATIONPRIORITY",
"I_PMNOTIFICATIONPRIORITYTYPE",
"I_STATUSOBJECT",
"I_STATUSOBJECTSTATUS",
"I_TECHNICALOBJECT",
"I_TECHOBJISEQUIPORFUNCNLLOC",
"I_WORKCENTER",
"I_WORKCENTERTEXT"
],
"BASE":
[
"I_MAINTORDERTP"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/