I_MaintenanceOrderPhaseControl

DDL: I_MAINTENANCEORDERPHASECONTROL SQL: IMAINTORDPHSECTR Type: view COMPOSITE

Maintenance Order Phase Controls

I_MaintenanceOrderPhaseControl is a Composite CDS View that provides data about "Maintenance Order Phase Controls" in SAP S/4HANA. It reads from 2 data sources (I_MaintenanceOrder, I_MaintPhaseControlCode) and exposes 28 fields with key fields MaintenanceOrder, MaintenancePhaseControl. It has 4 associations to related views.

SAP Help Documentation

CategoryCDS Views for Maintenance Management
StatusObject Number
Purpose
This CDS view is designed to provide a comprehensive overview of maintenance order phase controls within an organization. It integrates data from various sources related to maintenance orders, phase control codes, status objects, and activation procedures to offer insights into the current status and control mechanisms of maintenance orders. This CDS view provides the data to answer the following business questions: What are the current phase controls associated with each maintenance order? How do user status codes impact the maintenance phase control settings? What is the activation status of maintenance phase controls for specific maintenance orders? Which maintenance orders are currently in a blocked or end-phase status? How do changes in status codes affect the maintenance order phase control history? What are the overall status profiles and authority codes linked to maintenance phase controls? How do maintenance order types and planning plants influence phase control settings? What are the process phase and sub-phase codes associated with maintenance orders and their controls? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have a role with the following restriction types set to read access: KOSTL (Cost Center) IWERK (Maintenance Planning Plant) SWERK (Maintenance Plant) AUFART_IWERK (Order Category/Maintenance Planning Plant) BEGRP (Technical Object Authorization Group) These restriction types are edited in the Maintain Business Roles app.

Structure
Important Fields Important fields in this view include the following: Field Name Description MAINTENANCEPLANNINGPLANT Maintenance Planning Plant MAINTENANCEORDERTYPE Order Type MAINTENANCEPHASECONTROLNAME Phase Control Code MAINTORDPROCESSSUBPHASECODE Process Sub-phase MAINTENANCEPHASECONTROL Phase Control Code MAINTOBJPHSECTRLSTATUSISACTIVE Status Is Active MAINTOBJPHASECONTROLSTATECODE Phase Control Code Current State in Business Object MAINTENANCEPHASECONTROLTEXT Description of the Phase Control Code MAINTPHSECTRLISSETAUTOMLY Phase Control Code: Set Automatically EAMPROCESSPHASECODE Process Phase MAINTORDPROCESSPHASECODE Process Phase EAMBLOCKERCODEENTITYTYPE Entity MAINTPROCGPHSECTRLACTVTNCODE Phase Control Key MAINTENANCEORDER Order Number EAMPROCESSSUBPHASECODE Process Sub-phase EAMOVERALLSTATUSPROFILE Profile for Overall Status MAINTENANCEUSERSTATUSCODE User Status MAINTUSERSTATUSPROFILECODE Status Profile MAINTPHASECONTROLAUTHORITYCODE Authorization Key for Phase Control Code STATUSOBJECT Object Number

View on SAP Help Portal →

Data Sources (2)

SourceAliasJoin Type
I_MaintenanceOrder MaintenanceOrder from
I_MaintPhaseControlCode MaintObjectPhaseControl inner

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_MaintOrderPhseCtrlChgHist _MaintObjPhseCtrlCodeChgSet $projection.MaintenanceOrder = _MaintObjPhseCtrlCodeChgSet.MaintenanceOrder and $projection.MaintenanceUserStatusCode = _MaintObjPhseCtrlCodeChgSet.StatusCode and _MaintObjPhseCtrlCodeChgSet.StatusIsInactive = ''
[0..1] I_MaintOrderPhseCtrlChgHist _MaintObjPhseCtrlCodeChgReset $projection.MaintenanceOrder = _MaintObjPhseCtrlCodeChgReset.MaintenanceOrder and $projection.MaintenanceUserStatusCode = _MaintObjPhseCtrlCodeChgReset.StatusCode and _MaintObjPhseCtrlCodeChgReset.StatusIsInactive = 'X'
[1..1] I_MaintenanceOrder _MaintenanceOrder $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
[0..1] I_MaintPhseCtrlActivationCode _MaintPhseCtrlActivationCode _MaintPhseCtrlActivationCode.MaintProcgPhseCtrlActvtnCode = $projection.MaintProcgPhseCtrlActvtnCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IMAINTORDPHSECTR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Maintenance Order Phase Controls view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder I_MaintenanceOrder MaintenanceOrder Order
KEY MaintenancePhaseControl I_MaintPhaseControlCode MaintenancePhaseControlName Phase Control
MaintenancePhaseControlName I_MaintPhaseControlCode MaintenancePhaseControlName Phase Control
StatusObject StatusObjectStatus StatusObject Status Object
MaintUserStatusProfileCode I_MaintPhaseControlCode MaintUserStatusProfileCode Status Profile
MaintenanceUserStatusCode I_MaintPhaseControlCode MaintenanceUserStatusCode User status
MaintenancePhaseControlText I_MaintPhaseControlCode MaintenancePhaseControlText Description
MaintPhseCtrlIsSetAutomly I_MaintPhaseControlCode MaintPhseCtrlIsSetAutomly Set Automatically
EAMOverallStatusProfile I_MaintPhaseControlCode EAMOverallStatusProfile Ovrl Sts Profile
MaintPhaseControlAuthorityCode I_MaintPhaseControlCode MaintPhaseControlAuthorityCode Authorization Key
MaintProcgPhseCtrlActvtnCode MaintPhseCtrlActvtnProcValue MaintProcgPhseCtrlActvtnCode Phase Control Key
EAMProcessPhaseCode MaintPhseCtrlActvtnProcValue EAMProcessPhaseCode Process Phase
EAMProcessSubPhaseCode MaintPhseCtrlActvtnProcValue EAMProcessSubPhaseCode Process Subphase
MaintObjPhseCtrlStatusIsActive
MaintenanceOrderType I_MaintenanceOrder MaintenanceOrderType Order Type
MaintenancePlanningPlant I_MaintenanceOrder MaintenancePlanningPlant Planning Plant
EAMBlockerCodeEntityType I_MaintPhaseControlCode EAMBlockerCodeEntityType Entity
MaintOrdProcessPhaseCode _MaintenanceOrder MaintOrdProcessPhaseCode Process Phase
MaintOrdProcessSubPhaseCode _MaintenanceOrder MaintOrdProcessSubPhaseCode Process Subphase
_MaintenanceOrder _MaintenanceOrder
_MaintObjPhseCtrlCodeChgSet _MaintObjPhseCtrlCodeChgSet
_MaintObjPhseCtrlCodeChgReset _MaintObjPhseCtrlCodeChgReset
_ProcessingPhase MaintPhseCtrlActvtnProcValue _ProcessingPhase
_ProcessingSubPhase MaintPhseCtrlActvtnProcValue _ProcessingSubPhase
_StatusObject StatusObjectStatus _StatusObject
_StatusCode I_MaintPhaseControlCode _StatusCode
_StatusProfile I_MaintPhaseControlCode _StatusProfile
_MaintPhseCtrlActivationCode _MaintPhseCtrlActivationCode

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 I_MaintenanceOrderPhaseControl.
-- 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: IMAINTORDPHSECTR

CREATE VIEW I_MaintenanceOrderPhaseControl AS
SELECT
  MaintenanceOrder.MaintenanceOrder AS MaintenanceOrder,
  MaintObjectPhaseControl.MaintenancePhaseControlName AS MaintenancePhaseControl,
  MaintObjectPhaseControl.MaintenancePhaseControlName AS MaintenancePhaseControlName,
  StatusObjectStatus.StatusObject AS StatusObject,
  MaintObjectPhaseControl.MaintUserStatusProfileCode AS MaintUserStatusProfileCode,
  MaintObjectPhaseControl.MaintenanceUserStatusCode AS MaintenanceUserStatusCode,
  MaintObjectPhaseControl.MaintenancePhaseControlText AS MaintenancePhaseControlText,
  MaintObjectPhaseControl.MaintPhseCtrlIsSetAutomly AS MaintPhseCtrlIsSetAutomly,
  MaintObjectPhaseControl.EAMOverallStatusProfile AS EAMOverallStatusProfile,
  MaintObjectPhaseControl.MaintPhaseControlAuthorityCode AS MaintPhaseControlAuthorityCode,
  MaintPhseCtrlActvtnProcValue.MaintProcgPhseCtrlActvtnCode AS MaintProcgPhseCtrlActvtnCode,
  MaintPhseCtrlActvtnProcValue.EAMProcessPhaseCode AS EAMProcessPhaseCode,
  MaintPhseCtrlActvtnProcValue.EAMProcessSubPhaseCode AS EAMProcessSubPhaseCode,
  cast ( StatusObjectStatus.StatusIsActive as vdm_j_statusisactive preserving type ) AS MaintObjPhseCtrlStatusIsActive,
  MaintenanceOrder.MaintenanceOrderType AS MaintenanceOrderType,
  MaintenanceOrder.MaintenancePlanningPlant AS MaintenancePlanningPlant,
  MaintObjectPhaseControl.EAMBlockerCodeEntityType AS EAMBlockerCodeEntityType,
  _MaintenanceOrder.MaintOrdProcessPhaseCode AS MaintOrdProcessPhaseCode,
  _MaintenanceOrder.MaintOrdProcessSubPhaseCode AS MaintOrdProcessSubPhaseCode,
  MaintPhseCtrlActvtnProcValue._ProcessingPhase AS _ProcessingPhase,
  MaintPhseCtrlActvtnProcValue._ProcessingSubPhase AS _ProcessingSubPhase,
  StatusObjectStatus._StatusObject AS _StatusObject,
  MaintObjectPhaseControl._StatusCode AS _StatusCode,
  MaintObjectPhaseControl._StatusProfile AS _StatusProfile
FROM I_MaintenanceOrder AS MaintenanceOrder
INNER JOIN I_MaintPhaseControlCode AS MaintObjectPhaseControl ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MaintOrderPhseCtrlChgHist AS _MaintObjPhseCtrlCodeChgSet ON MaintenanceOrder = _MaintObjPhseCtrlCodeChgSet.MaintenanceOrder AND MaintenanceUserStatusCode = _MaintObjPhseCtrlCodeChgSet.StatusCode AND _MaintObjPhseCtrlCodeChgSet.StatusIsInactive = ''  -- association [0..1]
LEFT OUTER JOIN I_MaintOrderPhseCtrlChgHist AS _MaintObjPhseCtrlCodeChgReset ON MaintenanceOrder = _MaintObjPhseCtrlCodeChgReset.MaintenanceOrder AND MaintenanceUserStatusCode = _MaintObjPhseCtrlCodeChgReset.StatusCode AND _MaintObjPhseCtrlCodeChgReset.StatusIsInactive = 'X'  -- association [0..1]
LEFT OUTER JOIN I_MaintenanceOrder AS _MaintenanceOrder ON MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder  -- association [1..1]
LEFT OUTER JOIN I_MaintPhseCtrlActivationCode AS _MaintPhseCtrlActivationCode ON _MaintPhseCtrlActivationCode.MaintProcgPhseCtrlActvtnCode = MaintProcgPhseCtrlActvtnCode  -- association [0..1]
;