@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@AbapCatalog.sqlViewName: 'CMFREPWKITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Malfunction Report Work Items'
@Search.searchable: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.semanticKey: [ 'MaintenanceNotification', 'MaintenanceOrderOperation' ]
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@UI: {
headerInfo: {
description: {
value: 'OperationDescription',
type: #STANDARD
},
title: {
value: 'MaintenanceOrderOperation',
type: #STANDARD
},
typeName: 'Maintenance Job',
typeNamePlural: 'Maintenance Jobs'
}
}
@AccessControl.privilegedAssociations: [ '_OperationOverallStatus' ]
define view C_MalfunctionReportWorkItem
as select from I_MaintenanceOrderOperation as _Operation
association [0..1] to I_StatusObjectStatusBasic as _IsDeletedStatus on _IsDeletedStatus.StatusCode = 'I0013'
and _IsDeletedStatus.StatusObject = _Operation.MaintOrderOperationInternalID
and _IsDeletedStatus.StatusIsInactive = ''
association [1..1] to I_MaintOrderTechObj as _Order on _Order.MaintenanceOrder = _Operation.MaintenanceOrder
association [1..1] to C_Malfunctionreport as _MalfunctionReport on _MalfunctionReport.MaintenanceNotification = $projection.maintenancenotification
association [0..1] to I_PMContactCardEmployee as _OperationPersonResponsible on $projection.OperationPersonResponsible = _OperationPersonResponsible.PersonnelNumber
association [0..1] to I_MaintenanceJobSelection as _MaintenanceJobSelection on _MaintenanceJobSelection.MaintenanceJobSelection = $projection.MaintenanceJobSelection
association [0..*] to I_WorkCenterText as _WorkCenterText on _WorkCenterText.WorkCenterInternalID = $projection.OperationWorkCenterInternalID
and _WorkCenterText.WorkCenterTypeCode = 'A'
association [0..1] to C_PMWorkCenterVH as _WorkCenterVH on $projection.OperationWorkCenter = _WorkCenterVH.WorkCenter
and $projection.Plant = _WorkCenterVH.Plant
association [0..1] to I_EAMObjectOverallStatus as _OperationOverallStatus on $projection.MaintOrderOperationInternalID = _OperationOverallStatus.StatusObject
and _OperationOverallStatus.EAMOverallObjectStatusProfile = 'MAINTJOB'
association [0..1] to C_JobListStatusVH as _JobListStatusVH on $projection.eamoverallobjectstatus = _JobListStatusVH.EAMOverallStatus
and $projection.eamoverallobjectstatusprofile = _JobListStatusVH.EAMOverallStatusProfile
association [0..1] to I_PMNotificationPriority as _JobListPriority on $projection.maintpriority = _JobListPriority.MaintPriority
and $projection.maintprioritytype = _JobListPriority.MaintPriorityType
association [0..1] to C_TechnicalObjectForEditVH as _TechnicalObjectVH on _TechnicalObjectVH.TechnicalObject = $projection.TechnicalObject
and _TechnicalObjectVH.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
and _TechnicalObjectVH.TechnicalObjectLabel = $projection.TechnicalObjectLabel
association [0..1] to I_FunctionalLocationLabel as _FunctionalLocationLabel on _FunctionalLocationLabel.FunctionalLocation = $projection.functionallocation
-- Extensions, do not expose as association:
association [0..1] to E_MaintenanceOrder as _MaintenanceOrderExtension on $projection.MaintenanceOrder = _MaintenanceOrderExtension.MaintenanceOrder
{
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaintenanceOrderStdVH',
element: 'MaintenanceOrder' }
}]
// ]--GENERATED
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
@ObjectModel.text.element: ['MaintenanceOrderDesc']
key _Operation.MaintenanceOrder,
@UI: {
lineItem: {position: 20, importance: #HIGH}
}
@EndUserText.label: 'Work Item'
@ObjectModel.text.element: [ 'OperationDescription' ]
key _Operation.MaintenanceOrderOperation,
--_Operation.MaintenanceOrderSubOperation,
@UI.hidden: true
_Order.MaintenanceOrderInternalID,
@UI.hidden: true
_Order.MaintenanceOrderDesc,
@UI: { lineItem: {position: 10, importance: #HIGH } }
@Consumption.semanticObject: 'MaintenanceNotification'
@ObjectModel.text.element: [ 'NotificationText' ]
@EndUserText.label: 'Issue'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
_Order.MaintenanceNotification,
@UI.hidden: true
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
_Order._MaintenanceNotification.NotificationText,
@UI.hidden: true
_Operation.OperationDescription,
//--[ GENERATED:012:GFBfhxvv7jY4hYOuhNduX0
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PersWrkAgrmtSrchHelp',
element: 'PersonWorkAgreement' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_OperationPersonResponsible'
@UI: { textArrangement: #TEXT_ONLY,
selectionField: { exclude: false, position: 20 },
lineItem: { position: 40, importance: #HIGH }
}
@EndUserText.label: 'Assigned To'
_Operation.OperationPersonResponsible,
@ObjectModel.text.association: '_WorkCenterText'
@Consumption.valueHelp: '_WorkCenterVH'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
_Operation._WorkCenter.WorkCenter as OperationWorkCenter,
@UI.hidden: true
_Operation.OperationWorkCenterInternalID,
@UI.hidden: true
_Operation.OperationWorkCenterTypeCode,
@UI.lineItem: [ { position: 50, importance: #LOW } ]
@Semantics.quantity.unitOfMeasure: 'OperationPlannedWorkUnit'
@EndUserText.label: 'Planned Effort'
@Consumption.filter.hidden: true
_Operation._OperationPlanningValues.OperationPlannedWork,
@ObjectModel.foreignKey.association: '_PlannedWorkUnitOfMeasure'
@Consumption.valueHelp: '_PlannedWorkUnitOfMeasure'
@Consumption.filter.hidden: true
_Operation._OperationPlanningValues.OperationPlannedWorkUnit,
_Operation.Plant,
@UI.hidden: true
@ObjectModel.foreignKey.association: '_OverallStatusProfile'
_OperationOverallStatus.EAMOverallObjectStatusProfile,
@UI: {
textArrangement: #TEXT_ONLY,
selectionField: { exclude: false, position: 30 },
lineItem: { position: 60 }
}
@ObjectModel.foreignKey.association: '_OverallStatus'
@Consumption.valueHelp: '_JobListStatusVH'
_OperationOverallStatus.EAMOverallObjectStatus,
@UI.hidden: true
cast( case when _Order._StatusObjectStatus[ StatusCode = 'I3350' and StatusIsInactive = '' ].StatusObject is not null then 'F2023' else '' end as pm_source_appl) as MaintOrderSourceApplication,
@ObjectModel.readOnly: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_EAM_MTJOBWKITEM_FILTER_EXIT'
@ObjectModel.foreignKey.association: '_MaintenanceJobSelection'
@UI: {
textArrangement: #TEXT_ONLY,
selectionField: { exclude: false, position: 10 },
lineItem: { exclude: true }
}
cast( '' as eams_ui_myself_myteam )
as MaintenanceJobSelection,
@UI.hidden: true
_Order._MaintenanceNotification._PMNotificationPriority.MaintPriorityColorCode,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
@ObjectModel.foreignKey.association: '_JobListPriority'
@UI.textArrangement: #TEXT_ONLY
@UI: {
lineItem: { position: 90, importance: #HIGH, criticality: 'MaintPriorityColorCode', criticalityRepresentation: #WITHOUT_ICON }
}
_Order._MaintenanceNotification._PMNotificationPriority.MaintPriority,
@UI.hidden: true
_Order._MaintenanceNotification.MaintPriorityType,
@UI.hidden: true
_Operation.MaintOrderOperationInternalID,
@UI: {
lineItem: { position: 80 } ,
selectionField: { exclude: false, position: 50 }
}
@ObjectModel.foreignKey.association: '_TechnicalObjectVH'
@Consumption.valueHelp: '_TechnicalObjectVH'
@Consumption.semanticObject: 'MaintenanceObject'
case
when _Operation.Equipment != ''
then cast(_Operation.Equipment as eams_tech_obj_conv )
when _Operation.FunctionalLocation != ''
then cast(_Operation._FunctionalLocation._FunctionalLocationLabel.FunctionalLocationLabelName as eams_tech_obj_conv )
when _Order.Equipment = ''
then cast( _Order._FunctionalLocation._FunctionalLocationLabel.FunctionalLocationLabelName as eams_tech_obj_conv )
else cast( _Order.Equipment as eams_tech_obj_conv ) end as TechnicalObjectLabel,
@UI.hidden: true
case
when _Operation.Equipment != ''
then cast( _Operation.Equipment as eams_tec_obj )
when _Operation.FunctionalLocation != ''
then cast( _Operation.FunctionalLocation as eams_tec_obj )
else _Order.TechnicalObject end as TechnicalObject,
@UI.hidden: true
cast(case
when _Operation.Equipment != ''
then 'EAMS_EQUI'
when _Operation.FunctionalLocation != ''
then 'EAMS_FL'
else _Order.TechObjIsEquipOrFuncnlLoc
end as eams_tec_obj_type_value ) as TechObjIsEquipOrFuncnlLoc,
@UI: { selectionField: { exclude: true, position: 60 } }
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_EquipmentStdVH', element: 'Equipment' } }]
@ObjectModel.text.element: ['EquipmentName']
case
when _Operation.Equipment != ''
then _Operation.Equipment
else
_Order.Equipment end as Equipment,
@Semantics.text: true
@UI.hidden: true
case
when _Operation.Equipment != ''
then _Operation._Equipment._EquipmentText[1:Language=$session.system_language].EquipmentName
else
_Order._Equipment._EquipmentText[1:Language=$session.system_language].EquipmentName end as EquipmentName,
@Consumption.hidden
_Order.FunctionalLocation,
@EndUserText.label: 'Operation Functional Location'
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_FunctionalLocationStdVH', element: 'FunctionalLocation' } }]
@ObjectModel.text.element: ['FunctionalLocationName']
_Operation._FunctionalLocation._FunctionalLocationLabel._FuncLocationLabelSearch.FunctionalLocationLabelName as FunctionalLocationLabelName,
@Semantics.text: true
@UI.hidden: true
_Operation._FunctionalLocation._FunctionalLocationText[1:Language = $session.system_language].FunctionalLocationName as FunctionalLocationName,
@EndUserText.label: 'Order Functional Location'
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_FunctionalLocationStdVH', element: 'FunctionalLocation' } }]
@ObjectModel.text.element: ['OperationFunctionalLocation']
_Order._FunctionalLocation._FunctionalLocationLabel._FuncLocationLabelSearch.FunctionalLocationLabelName as OpFunctionalLocationLabelName,
@Semantics.text: true
@UI.hidden: true
_Order._FunctionalLocation._FunctionalLocationText[1:Language = $session.system_language].FunctionalLocationName as OperationFunctionalLocation,
_Order._StatusObjectStatus,
_Order,
_MaintenanceJobSelection,
_OperationPlanningValues._PlannedWorkUnitOfMeasure,
_OperationPersonResponsible,
_Operation._MaintenanceOrder,
_Operation._WorkCenter,
@Consumption.filter.hidden: true
_WorkCenterText,
_WorkCenterVH,
_OperationOverallStatus,
_OperationOverallStatus._OverallStatus,
_OperationOverallStatus._OverallStatusProfile,
_JobListStatusVH,
_JobListPriority,
_MalfunctionReport,
_TechnicalObjectVH
}
where
_Order._MaintenanceNotification.NotifProcessingPhase <> '4'
and _Order._MaintenanceNotification.NotifProcessingPhase <> '5'
and _IsDeletedStatus.StatusObject is null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EAMOBJECTOVERALLSTATUS",
"I_EQUIPMENT",
"I_EQUIPMENTTEXT",
"I_FUNCLOCATIONLABELSEARCH",
"I_FUNCTIONALLOCATION",
"I_FUNCTIONALLOCATIONLABEL",
"I_FUNCTIONALLOCATIONTEXT",
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCEORDEROPERATION",
"I_MAINTORDEROPERPLANNINGVALUES",
"I_MAINTORDERTECHOBJ",
"I_PMNOTIFICATIONPRIORITY",
"I_STATUSOBJECTSTATUS",
"I_STATUSOBJECTSTATUSBASIC",
"I_WORKCENTER"
],
"ASSOCIATED":
[
"C_JOBLISTSTATUSVH",
"C_MALFUNCTIONREPORT",
"C_PMWORKCENTERVH",
"C_TECHNICALOBJECTFOREDITVH",
"E_MAINTENANCEORDER",
"I_EAMOBJECTOVERALLSTATUS",
"I_EAMOVERALLSTATUS",
"I_EAMOVERALLSTATUSPROFILE",
"I_FUNCTIONALLOCATIONLABEL",
"I_MAINTENANCEJOBSELECTION",
"I_MAINTENANCEORDER",
"I_MAINTORDERTECHOBJ",
"I_PMCONTACTCARDEMPLOYEE",
"I_PMNOTIFICATIONPRIORITY",
"I_STATUSOBJECTSTATUS",
"I_STATUSOBJECTSTATUSBASIC",
"I_UNITOFMEASURE",
"I_WORKCENTER",
"I_WORKCENTERTEXT"
],
"BASE":
[
"I_EAMOBJECTOVERALLSTATUS",
"I_MAINTENANCEORDEROPERATION",
"I_MAINTORDEROPERPLANNINGVALUES",
"I_MAINTORDERTECHOBJ"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/