@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin
@AbapCatalog.sqlViewName: 'CTOMAINTITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Items for Technical Object'
@VDM.viewType: #CONSUMPTION
@ObjectModel: {
usageType.serviceQuality: #D,
usageType.sizeCategory: #XL,
usageType.dataClass: #MIXED
}
define view C_TechObjMaintenanceItem
as select from I_MaintenanceItem
association [0..1] to I_TechObjIsEquipOrFuncnlLocT as _TechObjIsEquipOrFuncnlLocT on _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = 'EAMS_EQUI'
and _TechObjIsEquipOrFuncnlLocT.Language = $session.system_language
{
@UI: { lineItem: { importance: #HIGH, position: 10 } }
@Consumption.semanticObject: 'MaintenanceItem'
key MaintenanceItem,
@UI: { lineItem: { importance: #HIGH, position: 20 } }
@Semantics.text: true
@EndUserText.label: 'Maintenance Item Text'
MaintenanceItemDescription,
@Consumption.semanticObject: 'MaintenancePlan'
@UI: { lineItem: { importance: #HIGH, position: 30 } }
MaintenancePlan,
@UI: { lineItem: { importance: #HIGH, position: 40 } }
@Semantics.text: true
@EndUserText.label: 'Maintenance Plan Text'
_MaintenancePlan.MaintenancePlanDesc,
@UI: { lineItem: { importance: #HIGH, position: 60 } }
@ObjectModel.text.element: [ 'MaintPriorityDesc' ]
@UI.textArrangement: #TEXT_FIRST
_PMNotificationPriority._Text[1:Language=$session.system_language].MaintPriority,
@Semantics.text: true
_PMNotificationPriority._Text[1:Language=$session.system_language].MaintPriorityDesc,
@ObjectModel.text.element: 'TechnicalObjectDescription'
@UI.textArrangement: #TEXT_FIRST
cast( Equipment as eams_tech_obj_conv ) as TechnicalObjectLabel,
@EndUserText.label: 'Technical Object Description'
cast( _Equipment._EquipmentText[ 1: Language = $session.system_language ].EquipmentName as eams_tec_obj_des ) as TechnicalObjectDescription,
@ObjectModel.text.element: 'TechObjIsEquipOrFuncnlLocDesc'
@EndUserText.label: 'Technical Object Type'
@UI.textArrangement: #TEXT_ONLY
@UI.hidden
@Environment.sql.passValue: true
cast ( 'EAMS_EQUI' as eams_tec_obj_type_value) as TechObjIsEquipOrFuncnlLoc,
@Semantics.text: true
@EndUserText.label: 'Technical Object Type Description'
_TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLocDesc,
@EndUserText.label: 'Maintenance Item Category'
MaintenancePlanCategory,
@Semantics.text: true
@EndUserText.label: 'Maintenance Item Category Text'
_MaintenancePlanCatParam._Text[1:Language=$session.system_language].MaintenancePlanCategoryDesc,
MaintenanceStrategy,
@Semantics.text: true
@EndUserText.label: 'Maintenance Strategy Text'
_MaintenanceStrategy._MaintenanceStrategyText[1:Language=$session.system_language].MaintenanceStrategyDesc,
NotificationType,
MaintenancePlanningPlant,
@EndUserText.label: 'Planner Group'
MaintenancePlannerGroup,
@UI.hidden: true
_Equipment.AuthorizationGroup,
@UI.hidden: true
_LocationAccountAssignment.CostCenter,
@UI.hidden: true
_LocationAccountAssignment.ControllingArea,
@UI.hidden: true
_LocationAccountAssignment._WorkCenter.Plant as MaintenancePlant,
//Association key for DCL
@UI.hidden: true
MaintObjectLocAcctAssgmtNmbr,
@UI.hidden: true
_MaintenanceOrder.MaintenanceOrderType,
@UI.hidden: true
cast( Equipment as eams_tec_obj ) as TechnicalObject,
_LocationAccountAssignment
}
where
MaintenancePlanCallObject <> '5' and
Equipment <> ''
union all
select from I_MaintenanceItem
association [0..1] to I_TechObjIsEquipOrFuncnlLocT as _TechObjIsEquipOrFuncnlLocT on _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = 'EAMS_FL'
and _TechObjIsEquipOrFuncnlLocT.Language = $session.system_language
{
key MaintenanceItem,
MaintenanceItemDescription,
MaintenancePlan,
_MaintenancePlan.MaintenancePlanDesc,
_PMNotificationPriority._Text[1:Language=$session.system_language].MaintPriority,
_PMNotificationPriority._Text[1:Language=$session.system_language].MaintPriorityDesc,
cast( _FunctionalLocation._FunctionalLocationLabel.FunctionalLocationLabelName as eams_tech_obj_conv ) as TechnicalObjectLabel,
cast( _FunctionalLocation._FunctionalLocationText[ 1: Language = $session.system_language ].FunctionalLocationName as eams_tec_obj_des ) as TechnicalObjectDescription,
cast ( 'EAMS_FL' as eams_tec_obj_type_value) as TechObjIsEquipOrFuncnlLoc,
_TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLocDesc,
MaintenancePlanCategory,
_MaintenancePlanCatParam._Text[1:Language=$session.system_language].MaintenancePlanCategoryDesc,
MaintenanceStrategy,
_MaintenanceStrategy._MaintenanceStrategyText[1:Language=$session.system_language].MaintenanceStrategyDesc,
NotificationType,
MaintenancePlanningPlant,
MaintenancePlannerGroup,
_LocationAccountAssignment._FunctionalLocation.AuthorizationGroup,
_LocationAccountAssignment.CostCenter,
_LocationAccountAssignment.ControllingArea,
_LocationAccountAssignment._WorkCenter.Plant as MaintenancePlant,
MaintObjectLocAcctAssgmtNmbr,
_MaintenanceOrder.MaintenanceOrderType,
cast( FunctionalLocation as eams_tec_obj ) as TechnicalObject,
_LocationAccountAssignment
}
where
MaintenancePlanCallObject <> '5' and
Equipment = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EQUIPMENT",
"I_EQUIPMENTTEXT",
"I_FUNCTIONALLOCATION",
"I_FUNCTIONALLOCATIONLABEL",
"I_FUNCTIONALLOCATIONTEXT",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_MAINTENANCEITEM",
"I_MAINTENANCEORDER",
"I_MAINTENANCEPLANBASIC",
"I_MAINTENANCEPLANCATPARAM",
"I_MAINTENANCEPLANCATPARAMT",
"I_MAINTENANCESTRATEGY",
"I_MAINTENANCESTRATEGYT",
"I_PMNOTIFICATIONPRIORITY",
"I_PMNOTIFICATIONPRIORITYTEXT",
"I_TECHOBJISEQUIPORFUNCNLLOCT",
"I_WORKCENTER"
],
"ASSOCIATED":
[
"I_LOCATIONACCOUNTASSIGNMENT",
"I_TECHOBJISEQUIPORFUNCNLLOCT"
],
"BASE":
[
"I_MAINTENANCEITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/