P_MaintJobMsrgPtAndDocTechObj is a Consumption CDS View that provides data about "Value Help for Technical Object" in SAP S/4HANA. It reads from 1 data source (I_TechnicalObject) and exposes 16 fields with key fields TechnicalObject, TechObjIsEquipOrFuncnlLoc. It has 1 association to related views.
@AbapCatalog.sqlViewName: 'PMAINTTECHOBJVH'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@VDM.private:true@VDM.viewType: #CONSUMPTION@AccessControl.authorizationCheck:#MANDATORY@EndUserText.label: 'Value Help for Technical Object'
@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.dataClass: #MASTER@ObjectModel.usageType.serviceQuality: #C@ObjectModel.usageType.sizeCategory: #L@Consumption.ranked: true//This viewis created with reference to C_TechnicalObjectVH, for MP section to use MaintenancePlanningPlant field which isnot available for consumption from UI in C_TechnicalObjectVH.
defineview P_MaintJobMsrgPtAndDocTechObj
asselectfrom I_TechnicalObject
association [0..1] to I_Equipment as _EquipmentSearch on $projection.EquipmentWithLeadingZeros = _EquipmentSearch.Equipment
{
@UI.hidden: truekey I_TechnicalObject.TechnicalObject,
@UI.hidden: truekey I_TechnicalObject.TechObjIsEquipOrFuncnlLoc,
@ObjectModel.filter.transformedBy: 'cl_eam_techobjlabel_exit'
@ObjectModel.text.element: 'TechnicalObjectDescription'
cast( casewhen I_TechnicalObject.TechObjIsEquipOrFuncnlLoc = 'EAMS_FL' then// Functional Location
I_TechnicalObject._FunctionalLocationLabel.FunctionalLocationLabelName
else I_TechnicalObject.TechnicalObject endas eams_tech_obj_alpha_conv ) as TechnicalObjectLabel,
@Consumption.hidden: true
I_TechnicalObject.Equipment as EquipmentWithLeadingZeros,
@Consumption.hidden: true
I_TechnicalObject._FunctionalLocationLabel._FuncLocationLabelSearch.FunctionalLocationLabelName,
@Consumption.filter.hidden: true
I_TechnicalObject._TechnicalObjectText[1: Language = $session.system_language ].TechnicalObjectDescription,
@UI.hidden: true@Consumption.hidden: true
_EquipmentSearch.Equipment,
-- DCL:Fields required for DCL
//consumption hidden is set to false to use this field in UI for additionally binding with the plant field InAll measuring point(Measurment Point section)
//to filter technical object on the basis of plant associated with the maintenance order@UI.hidden: true@Consumption.hidden: false
I_TechnicalObject.MaintenancePlanningPlant,
@Consumption.hidden: true
I_TechnicalObject.MaintenancePlannerGroup,
@Consumption.hidden: true
I_TechnicalObject.AuthorizationGroup,
@Consumption.hidden: true
TechnicalObjectCategory,
@Consumption.hidden: true
TechnicalObjectType,
@Consumption.hidden: true
MaintObjectLocAcctAssgmtNmbr,
@Consumption.hidden: true
_LocationAccountAssignment.MaintenancePlant,
@Consumption.hidden: true
_LocationAccountAssignment.CostCenter,
@Consumption.hidden: true
_LocationAccountAssignment.ControllingArea,
@UI.hidden: true@ObjectModel.virtualElement@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EAM_MALFUNC_TECHOBJ_EXIT'
cast ( '' as eam_techobj_installation_loc ) as TechObjInstallationLocation
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EQUIPMENT",
"I_FUNCLOCATIONLABELSEARCH",
"I_FUNCTIONALLOCATIONLABEL",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_TECHNICALOBJECT",
"I_TECHNICALOBJECTTEXT"
],
"ASSOCIATED":
[
"I_EQUIPMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/