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_MaintPlanSchedulingOverview.
-- 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: PMPSCHEDGOVW
CREATE VIEW P_MaintPlanSchedulingOverview AS
SELECT
I_MaintPlanCallObject.MaintenancePlan AS MaintenancePlan,
I_MaintPlanCallObject.MaintenancePlanCallNumber AS MaintenancePlanCallNumber,
I_MaintPlanCallObject.MaintenanceItem AS MaintenanceItem,
I_MaintPlanCallObject.MaintenanceOrder AS MaintenanceOrder,
I_MaintPlanCallObject.MaintenanceNotification AS MaintenanceNotification,
I_MaintPlanCallObject.MaintCallHorizonIsNotReached AS MaintCallHorizonIsNotReached,
case when I_MaintPlanCallObject._MaintenanceOrder.MaintOrdBasicStartDate <> '00000000' then I_MaintPlanCallObject._MaintenanceOrder.MaintOrdBasicStartDate when I_MaintPlanCallObject._MaintenanceNotification.RequiredStartDate <> '00000000' then I_MaintPlanCallObject._MaintenanceNotification.RequiredStartDate else I_MaintPlanCallObject.PlannedStartDate end as PlannedStartDate AS PlannedStartDateendasPlannedStartDate,
I_MaintPlanCallObject.ReleasedByUserName AS ReleasedByUserName,
I_MaintPlanCallObject.ServiceOrder AS ServiceOrder,
I_MaintPlanCallObject.CompletionDate AS CompletionDate,
I_MaintPlanCallObject.CompletionTime AS CompletionTime,
I_MaintPlanCallObject.ServiceEntrySheet AS ServiceEntrySheet,
cast ( I_MaintPlanCallObject.RevisionNumber as j_3rfinv_revno ) AS RevisionNumber,
I_MaintPlanCallObject._MaintenancePlan.MaintenancePlanCategory AS MaintenancePlanCategory,
I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceStrategy AS MaintenanceStrategy,
I_MaintPlanCallObject._MaintPlanCallHistory.MaintenanceCallNextPlannedDate AS MaintenanceCallNextPlannedDate,
I_MaintPlanCallObject._MaintenancePlan.MaintPlanFreeDefinedAttrib AS MaintenancePlanSortField,
I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCycle.MaintenancePlanCycle AS MaintenancePlanCycle,
I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCycle.MeasuringPoint AS MeasuringPoint,
I_MaintPlanCallObject._MaintenanceItem.MaintenanceItemDescription AS MaintenanceItemDescription,
I_MaintPlanCallObject._MaintenanceItem.FunctionalLocation AS FunctionalLocation,
cast ( I_MaintPlanCallObject._MaintenanceItem._FunctionalLocation.TechnicalObjectType as eam_functional_loc_object_type ) AS FunctionalLocationObjectType,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._FunctionalLocation.ConstructionMaterial AS ConstructionMaterial,
I_MaintPlanCallObject._MaintenanceItem.Equipment AS Equipment,
cast ( I_MaintPlanCallObject._MaintenanceItem._Equipment.TechnicalObjectType as eam_equipment_object_type ) AS EquipmentObjectType,
Classification._Class( P_KeyDate:$session.system_date ).Class AS Class,
I_MaintPlanCallObject._MaintenanceItem.Assembly AS Assembly,
I_MaintPlanCallObject._MaintenanceItem.Material AS Material,
I_MaintPlanCallObject._MaintenanceItem.SerialNumber AS SerialNumber,
cast( case I_MaintPlanCallObject._MaintenanceItem.SettlementRuleIsMaintained when '' then '' else 'X' end as eam_mitem_has_objectlist ) AS MaintItemHasObjectList,
I_MaintPlanCallObject._MaintenanceItem.MaintenancePlannerGroup AS MaintenancePlannerGroup,
I_MaintPlanCallObject._MaintenanceItem.MaintenancePlanningPlant AS MaintenancePlanningPlant,
I_MaintPlanCallObject._MaintenanceItem.BusinessArea AS BusinessArea,
I_MaintPlanCallObject._MaintenanceItem.MaintenanceOrderType AS MaintenanceOrderType,
I_MaintPlanCallObject._MaintenanceItem.NotificationType AS NotificationType,
I_MaintPlanCallObject._MaintenanceItem.MaintenanceActivityType AS MaintenanceActivityType,
I_MaintPlanCallObject._MaintenanceItem.MainWorkCenterInternalID AS MainWorkCenterInternalID,
I_MaintPlanCallObject._MaintenanceItem._MainWorkCenter.WorkCenter AS MainWorkCenter,
I_MaintPlanCallObject._MaintenanceItem.TaskListType AS TaskListType,
I_MaintPlanCallObject._MaintenanceItem.TaskListGroup AS TaskListGroup,
I_MaintPlanCallObject._MaintenanceItem.TaskListGroupCounter AS TaskListGroupCounter,
I_MaintPlanCallObject._MaintenanceItem.PurchaseOrder AS PurchaseOrder,
I_MaintPlanCallObject._MaintenanceItem.PurchaseOrderItem AS PurchaseOrderItem,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MaintenancePlant AS MaintenancePlant,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.AssetLocation AS AssetLocation,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.AssetRoom AS AssetRoom,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.PlantSection AS PlantSection,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._WorkCenter.WorkCenter AS WorkCenter,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.ABCIndicator AS ABCIndicator,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MaintObjectFreeDefinedAttrib AS MaintObjectFreeDefinedAttrib,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.CompanyCode AS CompanyCode,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.MasterFixedAsset AS MasterFixedAsset,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.FixedAsset AS FixedAsset,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.ControllingArea AS ControllingArea,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.CostCenter AS CostCenter,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment._WBSElementBasicData.WBSElementExternalID AS WBSElementExternalID,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.StandingOrderNumber AS StandingOrderNumber,
I_MaintPlanCallObject._MaintenanceItem._SalesDocument.SalesDocument AS SalesDocument,
I_MaintPlanCallObject._MaintenanceItem._SalesDocument._Item.SalesDocumentItem AS SalesDocumentItem,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.SalesOrganization AS SalesOrganization,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.DistributionChannel AS DistributionChannel,
I_MaintPlanCallObject._MaintenanceItem._LocationAccountAssignment.OrganizationDivision AS OrganizationDivision,
I_MaintPlanCallObject._MaintenancePlan.AuthorizationGroup AS AuthorizationGroup,
I_MaintPlanCallObject._MaintenancePlan AS _MaintenancePlan,
I_MaintPlanCallObject._MaintenanceItem AS _MaintenanceItem,
I_MaintPlanCallObject._MaintenanceOrder AS _MaintenanceOrder,
I_MaintPlanCallObject._MaintenanceNotification AS _MaintenanceNotification,
I_MaintPlanCallObject._MaintPlanCallHistory AS _MaintPlanCallHistory,
I_MaintPlanCallObject._MaintenanceItem._Equipment AS _Equipment,
I_MaintPlanCallObject._MaintenanceItem._FunctionalLocation AS _FunctionalLocation,
I_MaintPlanCallObject._MaintenanceItem._TaskListGroup_2 AS _TaskListGroup_2,
I_MaintPlanCallObject._MaintenanceItem._TaskListGroupCounter_2 AS _TaskListGroupCounter_2,
I_MaintPlanCallObject._MaintenancePlan._MaintenancePlanCatParam AS _MaintenancePlanCatParam
FROM I_MaintPlanCallObject
LEFT OUTER JOIN I_MaintenancePlanType AS _MaintenancePlanType ON MaintenancePlanType = _MaintenancePlanType.MaintenancePlanType -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanCallStatus AS _MaintenancePlanCallStatus ON MaintenancePlanCallStatus = _MaintenancePlanCallStatus.MaintenancePlanCallStatus -- association [0..1]
LEFT OUTER JOIN I_MaintenancePlanStatus AS _MaintPlanActiveSystemStatus ON MaintenancePlan = _MaintPlanActiveSystemStatus.MaintenancePlan -- association [1..1]
;