Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_MaintObjBreakdownCube.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PMNTOBJBDC
CREATE VIEW P_MaintObjBreakdownCube AS
SELECT
LeadingMaintNotification,
MaintenanceNotification,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.MaintenancePlant AS MaintenancePlant,
TechnicalObject,
TechObjIsEquipOrFuncnlLoc,
_EquipmentTimeSeg._LocationAccountAssignment.FunctionalLocation AS TechObjInstallationLocation,
_GroupedNotification.Equipment AS Equipment,
TechnicalObjectLabel,
TechnicalObjectType,
_GroupedNotification._PMNotifMaintenanceData._MaintenanceNotification.CatalogProfile AS CatalogProfile,
_GroupedNotification._PMNotifMaintenanceData.Assembly AS Assembly,
AssetManufacturerName,
ManufacturerPartTypeName,
ConstructionMaterial,
cast( ConstructionYear as eam_techobj_construction_year ) AS ConstructionYear,
cast( ConstructionMonth as eam_techobj_construction_month ) AS ConstructionMonth,
ManufacturerCountry,
AuthorizationGroup,
_GroupedNotification.MaintPriority AS MaintPriority,
_GroupedNotification.MaintPriorityType AS MaintPriorityType,
_GroupedNotification._PMNotifMaintenanceData._MaintenanceNotification.NotificationType AS NotificationType,
_GroupedNotification.NotifProcessingPhase AS NotifProcessingPhase,
_GroupedNotification.MaintenanceObjectIsDown AS MaintenanceObjectIsDown,
_GroupedNotification.MaintenanceWorkCenterPlant AS MaintenanceWorkCenterPlant,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.AssetLocation AS AssetLocation,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.AssetRoom AS AssetRoom,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.PlantSection AS PlantSection,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._WorkCenter.WorkCenter AS WorkCenter,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._WorkCenter.Plant AS Plant,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.ABCIndicator AS ABCIndicator,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.MaintObjectFreeDefinedAttrib AS MaintObjectFreeDefinedAttrib,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.CostCenter AS CostCenter,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.ControllingArea AS ControllingArea,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment.CompanyCode AS CompanyCode,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._WBSElementBasicData.WBSElement AS WBSElement,
_GroupedNotification._PMNotifMaintenanceData.MaintenancePlannerGroup AS MaintenancePlannerGroup,
_GroupedNotification._PMNotifMaintenanceData.MaintenancePlanningPlant AS MaintenancePlanningPlant,
cast( _GroupedNotification._MainWorkCenter.WorkCenter as gewrk ) AS MainWorkCenter,
_GroupedNotification._MainWorkCenter.Plant AS MainWorkCenterPlant,
_GroupedNotification.MaintenanceOrder AS MaintenanceOrder,
cast( _Date.CalendarYear as eam_breakdownyear ) AS BreakdownYear,
cast( _Date.CalendarQuarter as eam_breakdownquarter ) AS BreakdownQuarter,
cast( _Date.CalendarMonth as eam_breakdownmonth ) AS BreakdownMonth,
cast( _Date.CalendarWeek as eam_breakdownweek ) AS BreakdownWeek,
cast( _Date.CalendarDay as eam_breakdownday ) AS BreakdownDay,
MalfunctionStartDate AS EffectiveMalfunctionStartDate,
MalfunctionEndDate AS EffectiveMalfunctionEndDate,
MalfunctionStartTime AS EffectiveMalfunctionStartTime,
MalfunctionEndTime AS EffectiveMalfunctionEndTime,
S1MalfunctionStartDateTime AS MalfunctionStartDateTime,
S1MalfunctionEndDateTime AS MalfunctionEndDateTime,
EffctvMalfunctionStartDateTime,
EffctvMalfunctionEndDateTime,
NumberOfReportedBreakdowns,
TotalRepairTimeInHours,
TimeBetweenRepairInHours,
_GroupedNotification._Equipment AS _Equipment,
_GroupedNotification._MaintenanceOrder AS _MaintenanceOrder,
_GroupedNotification._PMNotificationPriority AS _PMNotificationPriority,
_GroupedNotification._PMNotificationPriorityType AS _PMNotificationPriorityType,
_GroupedNotification._PMNotificationPhase AS _PMNotificationPhase,
_GroupedNotification._MaintenanceWorkCenterPlant AS _MaintenanceWorkCenterPlant,
_GroupedNotification._MainWorkCenter._Plant AS _MainWorkCenterPlant,
_GroupedNotification._PMNotifMaintenanceData._Assembly AS _Assembly,
_GroupedNotification._PMNotifMaintenanceData._MaintenancePlanningPlant AS _MaintenancePlanningPlant,
_GroupedNotification._PMNotifMaintenanceData._MaintenancePlanPlant AS _MaintenancePlanPlant,
_GroupedNotification._PMNotifMaintenanceData._MaintenancePlannerGroup AS _MaintenancePlannerGroup,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._ABCIndicator AS _ABCIndicator,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._CompanyCode AS _CompanyCode,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._CostCenter AS _CostCenter,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._Location AS _Location,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._MaintenancePlant AS _MaintenancePlant,
_GroupedNotification._PMNotifMaintenanceData._LocationAccountAssignment._PlantSection AS _PlantSection,
_GroupedNotification._PMNotifMaintenanceData._MaintenanceNotification._TechnicalObjectCodeCatalog AS _TechnicalObjectCodeCatalog,
_EquipmentTimeSeg._LocationAccountAssignment._FunctionalLocation AS _InstallationLocation
FROM P_MaintTechObjBreakdown
LEFT OUTER JOIN I_TechnicalObject AS _TechnicalObject ON TechnicalObject = _TechnicalObject.TechnicalObject AND TechObjIsEquipOrFuncnlLoc = _TechnicalObject.TechObjIsEquipOrFuncnlLoc -- association [0..1]
LEFT OUTER JOIN P_ReportedBreakdown AS _GroupedNotification ON TechnicalObject = _GroupedNotification.TechnicalObject AND MaintenanceNotification = _GroupedNotification.MaintenanceNotification AND TechObjIsEquipOrFuncnlLoc = _GroupedNotification.TechObjIsEquipOrFuncnlLoc -- association [0..1]
LEFT OUTER JOIN I_TechObjIsEquipOrFuncnlLoc AS _TechObjIsEquipOrFuncnlLoc ON TechObjIsEquipOrFuncnlLoc = _TechObjIsEquipOrFuncnlLoc.TechObjIsEquipOrFuncnlLoc -- association [0..1]
LEFT OUTER JOIN I_TechnicalObjectLabelVH AS _TechnicalObjectLabelVH ON TechnicalObjectLabel = _TechnicalObjectLabelVH.TechnicalObjectLabel AND TechObjIsEquipOrFuncnlLoc = _TechnicalObjectLabelVH.TechObjIsEquipOrFuncnlLoc AND TechnicalObject = _TechnicalObjectLabelVH.TechnicalObject -- association [0..1]
LEFT OUTER JOIN I_UsedConstructionTypeVH AS _UsedConstructionTypeVH ON ConstructionMaterial = _UsedConstructionTypeVH.ConstructionMaterial -- association [0..1]
LEFT OUTER JOIN I_MaintenanceActivityType AS _MaintenanceActivityType ON MaintenanceActivityType = _MaintenanceActivityType.MaintenanceActivityType -- association [0..1]
;