I_MaintenanceOrderPhaseControl
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_MaintOrdTypePhaseControl) and exposes 28 fields with key fields MaintenanceOrder, MaintenancePhaseControl. It has 5 associations to related views.
SAP Help Documentation
| Category | CDS Views for Maintenance Management |
|---|---|
| Status | Object 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
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
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintenanceOrder | MaintenanceOrder | from |
| I_MaintOrdTypePhaseControl | MaintObjectPhaseControl | inner |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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 |
| [0..1] | I_MaintOrdTypePhaseControlName | _MaintOrdTypePhseCtrlName | _MaintOrdTypePhseCtrlName.MaintenanceOrderType = MaintenanceOrder.MaintenanceOrderType and _MaintOrdTypePhseCtrlName.EAMBlockerCodeEntityType = 'ORI' and _MaintOrdTypePhseCtrlName.MaintenancePhaseControl = $projection.MaintenancePhaseControl |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaintenanceOrder | I_MaintenanceOrder | MaintenanceOrder | Order |
| KEY | MaintenancePhaseControl | I_MaintOrdTypePhaseControl | MaintenancePhaseControl | Phase Control |
| MaintenancePhaseControlName | I_MaintOrdTypePhaseControl | MaintenancePhaseControlName | Phase Control | |
| StatusObject | StatusObjectStatus | StatusObject | Status Object | |
| MaintUserStatusProfileCode | I_MaintOrdTypePhaseControl | MaintUserStatusProfileCode | Status Profile | |
| MaintenanceUserStatusCode | I_MaintOrdTypePhaseControl | MaintenanceUserStatusCode | User status | |
| MaintenancePhaseControlText | I_MaintOrdTypePhaseControl | MaintenancePhaseControlText | Description | |
| MaintPhseCtrlIsSetAutomly | I_MaintOrdTypePhaseControl | MaintPhseCtrlIsSetAutomly | Set Automatically | |
| EAMOverallStatusProfile | I_MaintOrdTypePhaseControl | EAMOverallStatusProfile | Ovrl Sts Profile | |
| MaintPhaseControlAuthorityCode | I_MaintOrdTypePhaseControl | 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_MaintOrdTypePhaseControl | 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 | ||
| _StatusProfile | I_MaintOrdTypePhaseControl | _StatusProfile | ||
| _MaintPhseCtrlActivationCode | _MaintPhseCtrlActivationCode | |||
| _MaintOrdTypePhseCtrlName | _MaintOrdTypePhseCtrlName |
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.MaintenancePhaseControl 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._StatusProfile AS _StatusProfile
FROM I_MaintenanceOrder AS MaintenanceOrder
INNER JOIN I_MaintOrdTypePhaseControl 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]
LEFT OUTER JOIN I_MaintOrdTypePhaseControlName AS _MaintOrdTypePhseCtrlName ON _MaintOrdTypePhseCtrlName.MaintenanceOrderType = MaintenanceOrder.MaintenanceOrderType AND _MaintOrdTypePhseCtrlName.EAMBlockerCodeEntityType = 'ORI' AND _MaintOrdTypePhseCtrlName.MaintenancePhaseControl = MaintenancePhaseControl -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA