@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'CTECHOBJQW'
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: ' Quick view for Technical Objects'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@UI.headerInfo : {
typeName: 'Technical Object',
typeNamePlural: 'Technical Objects',
typeImageUrl: 'sap-icon://technical-object',
imageUrl: 'TechnicalObjectThumbnailURL',
title.value: 'TechnicalObjectDescription',
description.value: 'TechnicalObjectLabel'
}
@AccessControl.privilegedAssociations: ['_TechObjIsEquipOrFuncnlLocT', '_TechnicalObjectCategoryT', '_TechnicalObjectTypeText']
--DB hint not usable with SADL:
--@AbapCatalog.dbHints: [{ dbSystem: #HDB, hint: 'COLUMN_VIEW_ESTIMATION(RECORD COUNT)' }]
@Consumption.dbHintsCalculatedBy: 'ABAP:CL_EAM_QUICKVIEW_DBHINT'
define view C_TechObjQuickVw
as select from I_TechnicalObject
association[0..*] to I_TechObjIsEquipOrFuncnlLocT as _TechObjIsEquipOrFuncnlLocT on _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
association[0..*] to I_TechnicalObjectCategoryT as _TechnicalObjectCategoryT on _TechnicalObjectCategoryT.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
and _TechnicalObjectCategoryT.TechnicalObjectCategory = $projection.TechnicalObjectCategory
association[0..*] to I_TechnicalObjectTypeText as _TechnicalObjectTypeText on _TechnicalObjectTypeText.TechnicalObjectType = $projection.TechnicalObjectType
association [0..1] to I_FunctionalLocation as _SuperiorFunctionalLocation on _SuperiorFunctionalLocation.FunctionalLocation = $projection.SuperiorFunctionalLocation
{
@UI.facet: [{
purpose: #QUICK_VIEW,
type: #FIELDGROUP_REFERENCE,
targetQualifier: 'TechObjQuickView'
}]
key TechnicalObject,
--@ObjectModel.text.element: [ 'TechObjIsEquipOrFuncnlLocDesc' ]
@ObjectModel.text.association: '_TechObjIsEquipOrFuncnlLocT'
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 10}]
}
@EndUserText.label: 'Technical Object Type'
@Environment.sql.passValue: true
key TechObjIsEquipOrFuncnlLoc,
TechnicalObjectLabel,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 20}]
}
@EndUserText.label: 'Long Text'
@Semantics.text: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_TECHOBJ_LTXT_EXIT'
cast (' ' as eams_ltext ) as TechnicalObjectLongText,
cast( case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then _Equipment._EquipmentText[1: Language = $session.system_language ].EquipmentName
else _FunctionalLocation._FunctionalLocationText[1: Language = $session.system_language ].FunctionalLocationName
end as eams_tec_obj_des preserving type ) as TechnicalObjectDescription,
MaintObjectInternalID,
@UI.hidden: true
SuperiorFunctionalLocation,
@UI.hidden: true
_SuperiorFunctionalLocation._FunctionalLocationLabel.FuncnlLocPrimaryLabelName as SuperiorFuncnlLocLabelName,
--@EndUserText.label: 'Technical Object Type Text'
--_TechObjIsEquipOrFuncnlLoc._Text[1:Language = $session.system_language].TechObjIsEquipOrFuncnlLocDesc,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 30}]
}
--@ObjectModel.text.element: [ 'TechnicalObjectCategoryDesc' ]
@ObjectModel.text.association: '_TechnicalObjectCategoryT'
@EndUserText.label: 'Category'
@UI.textArrangement: #TEXT_FIRST
TechnicalObjectCategory,
--@EndUserText.label: 'Technical Object Category Text'
--_TechnicalObjectCategory._Text[1:Language = $session.system_language].TechnicalObjectCategoryDesc,
@UI.hidden: true
SuperiorObjIsEquipOrFuncnlLoc,
@Semantics.imageUrl: true
@EndUserText.label: 'Image'
@Consumption.filter.hidden: true
case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then 'sap-icon://technical-object'
else 'sap-icon://functional-location'
end as TechnicalObjectThumbnailURL,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 40}]
}
@EndUserText.label: 'Superior Technical Object'
//@Consumption.semanticObject: 'MaintenanceObject'
cast(
case SuperiorObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then
SuperiorTechnicalObject
else _SuperFunctionalLocationLabel.FunctionalLocationLabelName
end
as eams_tech_obj_conv ) as SuperiorTechnicalObject,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 50}]
}
--@ObjectModel.text.element: [ 'TechnicalObjectTypeDesc' ]
@ObjectModel.text.association: '_TechnicalObjectTypeText'
@EndUserText.label: 'Object Type'
@UI.textArrangement: #TEXT_FIRST
TechnicalObjectType,
--@EndUserText.label: 'Object Type Text'
--_TechnicalObjectType._Text[1:Language = $session.system_language].TechnicalObjectTypeDesc,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 60}]
}
@EndUserText.label: 'Manufacturer'
cast( case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then AssetManufacturerName
when 'EAMS_FL' then AssetManufacturerName //n3389490
else 'N/A'
end as herst preserving type) as AssetManufacturerName,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 70}]
}
@EndUserText.label: 'Maintenance Plant'
@ObjectModel.text.element: [ 'PlantName' ]
@UI.textArrangement: #TEXT_FIRST
_LocationAccountAssignment.MaintenancePlant as MaintenancePlant,
@EndUserText.label: 'Maintenance Plant Name'
_LocationAccountAssignment._MaintenancePlant.PlantName as PlantName,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 80}]
}
@EndUserText.label: 'Plant Section'
_LocationAccountAssignment.PlantSection,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 90}]
}
@EndUserText.label: 'Location'
@ObjectModel.text.element: [ 'LocationName' ]
@UI.textArrangement: #TEXT_FIRST
_LocationAccountAssignment.AssetLocation,
@EndUserText.label: 'Location Name'
_LocationAccountAssignment._Location.LocationName,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 100}]
}
@EndUserText.label: 'Room'
_LocationAccountAssignment.AssetRoom,
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 110}]
}
@EndUserText.label: 'Model Number'
cast( case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then ManufacturerPartTypeName
when 'EAMS_FL' then ManufacturerPartTypeName //n3389490
else 'N/A'
end as typbz preserving type) as ManufacturerPartTypeName,
case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then coalesce( _FunctionalLocation._FuncLocationStructure.FuncLocStrucIdentifyingLevel, coalesce(_SuperiorFunctionalLocation._FuncLocationStructure.FuncLocStrucIdentifyingLevel,'00'))
else FuncLocStrucIdentifyingLevel
end as FuncLocStrucIdentifyingLevel,
case TechObjIsEquipOrFuncnlLoc
when 'EAMS_EQUI' then coalesce( _FunctionalLocation._FuncLocationStructure.FuncLocStruc2ndIdentifyingLvl, coalesce(_SuperiorFunctionalLocation._FuncLocationStructure.FuncLocStruc2ndIdentifyingLvl,'00'))
else FuncLocStruc2ndIdentifyingLvl
end as FuncLocStruc2ndIdentifyingLvl,
@UI.fieldGroup: [{ qualifier: 'TechObjQuickView', position: 120 }]
@EndUserText.label: 'Identifying Level'
cast( coalesce( _FunctionalLocation._FuncLocationStructure._FuncLocationStructureText[1:Language = $session.system_language].IdentifyingLabel,
coalesce( _SuperiorFunctionalLocation._FuncLocationStructure._FuncLocationStructureText[1:Language = $session.system_language].IdentifyingLabel, 'N/A' ))
as ilom_level_kz_desc) as IdentifyingLabel,
@UI.fieldGroup: [{ qualifier: 'TechObjQuickView', position: 140 }]
@EndUserText.label: 'Second Identifying Level'
cast( coalesce( _FunctionalLocation._FuncLocationStructure._FuncLocationStructureText[1:Language = $session.system_language].SecondIdentifyingLabel,
coalesce( _SuperiorFunctionalLocation._FuncLocationStructure._FuncLocationStructureText[1:Language = $session.system_language].SecondIdentifyingLabel, 'N/A' ) )
as ilom_level_kz2_desc) as SecondIdentifyingLabel,
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EAM_TECHOBJ_STS_EXIT'
}
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 160}]
}
@EndUserText.label: 'System Status'
cast ('' as vdm_j_system_status_concat_t) as ConcatenatedActiveSystStsName,
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_EAM_TECHOBJ_STS_EXIT'
}
@UI: {
fieldGroup: [{ qualifier:'TechObjQuickView', position: 170}]
}
@EndUserText.label: 'User Status'
cast ('' as vdm_j_user_status_concat_t) as ConcatenatedActiveUserStsName,
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_TECHOBJ_LEVEL_CALC_EXIT'
@UI.fieldGroup: [{ qualifier: 'TechObjQuickView', position: 130 }]
@EndUserText.label: 'Identifying Technical Object'
// @Consumption.semanticObject: 'MaintenanceObject'
cast( '' as ilom_strno ) as TechObjStructureIdentifierLvl1,
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_TECHOBJ_LEVEL_CALC_EXIT'
@UI.fieldGroup: [{ qualifier: 'TechObjQuickView', position: 150 }]
@EndUserText.label: 'Second Identifying Technical Object'
// @Consumption.semanticObject: 'MaintenanceObject'
cast( '' as ilom_strno ) as TechObjStructureIdentifierLvl2,
@UI.hidden
cast( case
when TechObjIsEquipOrFuncnlLoc = 'EAMS_EQUI' and _FunctionalLocation._FuncLocationStructure.FuncLocStrucIdentifyingLevel <> '00' then 1
when TechObjIsEquipOrFuncnlLoc = 'EAMS_FL' and FuncLocStrucIdentifyingLevel <> '00' then 1
else 0
end as ux_field_control preserving type) as UxFcTechObjStrucIdentifierLvl1,
@UI.hidden
cast( case
when TechObjIsEquipOrFuncnlLoc = 'EAMS_EQUI' and _FunctionalLocation._FuncLocationStructure.FuncLocStruc2ndIdentifyingLvl <> '00' then 1
when TechObjIsEquipOrFuncnlLoc = 'EAMS_FL' and FuncLocStruc2ndIdentifyingLvl <> '00' then 1
else 0
end as ux_field_control preserving type) as UxFcTechObjStrucIdentifierLvl2,
@UI.hidden: true
cast(TechnicalObject as char40) as TechObjectWithLeadingZeros,
@Consumption.hidden
MaintObjectLocAcctAssgmtNmbr,
@Consumption.hidden
AuthorizationGroup,
MaintenancePlanningPlant,
MaintenancePlannerGroup,
_TechObjIsEquipOrFuncnlLocT,
_TechnicalObjectCategoryT,
_TechnicalObjectTypeText,
_LocationAccountAssignment
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EQUIPMENT",
"I_EQUIPMENTTEXT",
"I_FUNCLOCATIONSTRUCTURE",
"I_FUNCLOCATIONSTRUCTURETEXT",
"I_FUNCTIONALLOCATION",
"I_FUNCTIONALLOCATIONLABEL",
"I_FUNCTIONALLOCATIONTEXT",
"I_LOCATION",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_PLANT",
"I_TECHNICALOBJECT"
],
"ASSOCIATED":
[
"I_FUNCTIONALLOCATION",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_TECHNICALOBJECTCATEGORYT",
"I_TECHNICALOBJECTTYPETEXT",
"I_TECHOBJISEQUIPORFUNCNLLOCT"
],
"BASE":
[
"I_TECHNICALOBJECT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/