C_MaintOrdCompPurOrderQ
Purchase Orders for Maintenance Orders
C_MaintOrdCompPurOrderQ is a Consumption CDS View that provides data about "Purchase Orders for Maintenance Orders" in SAP S/4HANA. It reads from 1 data source (I_MaintOrdCompPurOrderC) and exposes 46 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintOrdCompPurOrderC | I_MaintOrdCompPurOrderC | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_MaintenanceOrderOperation | _MaintenanceOrderOperation | _MaintenanceOrderOperation.MaintenanceOrder = $projection.MaintenanceOrder and _MaintenanceOrderOperation.MaintenanceOrderOperation = $projection.MaintenanceOrderOperation |
| [0..*] | I_MaterialText | _MaterialText | _MaterialText.Material = $projection.Material |
| [0..*] | I_PMNotificationPriorityText | _PriorityText | _PriorityText.MaintPriority = $projection.MaintPriority and _PriorityText.MaintPriorityType = $projection.MaintPriorityType |
| [0..1] | I_PMNotificationPriority | _Priority | _Priority.MaintPriority = $projection.MaintPriority and _Priority.MaintPriorityType = $projection.MaintPriorityType |
| [0..1] | I_MaintenanceOrder | _MaintenanceOrder | _MaintenanceOrder.MaintenanceOrder = $projection.MaintenanceOrder |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Purchase Orders for Maintenance Orders | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AbapCatalog.sqlViewName | CMTORDCOMPPURORD | view | |
| ClientHandling.type | #CLIENT_DEPENDENT | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.allowExtensions | true | view |
Fields (46)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | Purchasing Document | |
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| MaintenanceOrder | MaintenanceOrder | Order | ||
| MaintOrderRoutingNumber | MaintOrderRoutingNumber | Plan No.f.Oper. | ||
| MaintOrderOperationCounter | MaintOrderOperationCounter | Counter | ||
| Reservation | Reservation | Reservation | ||
| ReservationItem | ReservationItem | Reservation Item | ||
| MaintenanceOrderOperation | MaintenanceOrderOperation | Suboperation | ||
| MaintenanceOrderSubOperation | ||||
| OperationDescription | OperationDescription | Op. Short Text | ||
| ReferenceDate | ReferenceDate | Reference Date | ||
| MaintOrdBasicStartDate | MaintOrdBasicStartDate | Bas. Start Date | ||
| OpErlstSchedldExecStrtDte | OpErlstSchedldExecStrtDte | Earl.start date | ||
| RequirementDate | RequirementDate | Requirement Date | ||
| MaintPriorityDesc | MaintPriorityDesc | Priority | ||
| MaintPriorityColorCode | MaintPriorityColorCode | |||
| MaintenanceOrderDesc | MaintenanceOrderDesc | Description | ||
| MaintPriorityType | MaintPriorityType | PriorityType | ||
| MaintPriority | MaintPriority | Priority | ||
| MaintenanceOrderType | MaintenanceOrderType | Order Type | ||
| MaintenanceRevision | MaintenanceRevision | Revision | ||
| MaintenancePlannerGroup | MaintenancePlannerGroup | Planner Group | ||
| MaintenancePlanningPlant | MaintenancePlanningPlant | Planning Plant | ||
| MaintenancePlant | MaintenancePlant | Plant | ||
| MainWorkCenter | MainWorkCenter | Work Center | ||
| MainWorkCenterPlant | MainWorkCenterPlant | Plnt WorkCenter | ||
| Material | Material | Vehicle Model | ||
| MaterialName | _PurchaseOrderItem | PurchaseOrderItemText | Short Text | |
| MaterialThumbnailURL | ||||
| OrderQuantity | OrderQuantity | Quantity | ||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| MaintOrdComponentIsMissing | ||||
| ReceivedQuantity | ReceivedQuantity | Quantity Received | ||
| PurchasingProcessingStatus | PurchasingProcessingStatus | Proc. State | ||
| Supplier | Supplier | Supplier | ||
| SupplierName | _Supplier | SupplierName | Supplier Name | |
| ProductType | ProductType | Product Type Group | ||
| notshownanywhere1asItemCounter | ||||
| _MaintenanceOrder | _MaintenanceOrder | |||
| _MaintenanceOrderComponent | _MaintenanceOrderComponent | |||
| _MaintOrderOperPlanningValues | _MaintOrderOperPlanningValues | |||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _Supplier | _Supplier | |||
| _MaintenanceOrderOperation | _MaintenanceOrderOperation | |||
| _MaterialText | _MaterialText | |||
| _PriorityText | _PriorityText |
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 C_MaintOrdCompPurOrderQ.
-- 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: CMTORDCOMPPURORD
CREATE VIEW C_MaintOrdCompPurOrderQ AS
SELECT
PurchaseOrder,
PurchaseOrderItem,
MaintenanceOrder,
MaintOrderRoutingNumber,
MaintOrderOperationCounter,
Reservation,
ReservationItem,
MaintenanceOrderOperation,
cast( '0000' as uvorn ) AS MaintenanceOrderSubOperation,
OperationDescription,
ReferenceDate,
MaintOrdBasicStartDate,
OpErlstSchedldExecStrtDte,
RequirementDate,
MaintPriorityDesc,
MaintPriorityColorCode,
MaintenanceOrderDesc,
MaintPriorityType,
MaintPriority,
MaintenanceOrderType,
MaintenanceRevision,
MaintenancePlannerGroup,
MaintenancePlanningPlant,
MaintenancePlant,
MainWorkCenter,
MainWorkCenterPlant,
Material,
_PurchaseOrderItem.PurchaseOrderItemText AS MaterialName,
concat( '/sap/opu/odata/sap/EAM_ORDER_MONITOR/' , concat( concat( 'MaterialThumbnail(''', Material ), ''')/$value') ) AS MaterialThumbnailURL,
OrderQuantity,
PurchaseOrderQuantityUnit,
cast( MaintOrdComponentIsMissing as xfeld preserving type ) AS MaintOrdComponentIsMissing,
ReceivedQuantity,
PurchasingProcessingStatus,
Supplier,
_Supplier.SupplierName AS SupplierName,
ProductType,
not shown anywhere 1 as ItemCounter AS notshownanywhere1asItemCounter
FROM I_MaintOrdCompPurOrderC
LEFT OUTER JOIN I_MaintenanceOrderOperation AS _MaintenanceOrderOperation ON _MaintenanceOrderOperation.MaintenanceOrder = MaintenanceOrder AND _MaintenanceOrderOperation.MaintenanceOrderOperation = MaintenanceOrderOperation -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON _MaterialText.Material = Material -- association [0..*]
LEFT OUTER JOIN I_PMNotificationPriorityText AS _PriorityText ON _PriorityText.MaintPriority = MaintPriority AND _PriorityText.MaintPriorityType = MaintPriorityType -- association [0..*]
LEFT OUTER JOIN I_PMNotificationPriority AS _Priority ON _Priority.MaintPriority = MaintPriority AND _Priority.MaintPriorityType = MaintPriorityType -- association [0..1]
LEFT OUTER JOIN I_MaintenanceOrder AS _MaintenanceOrder ON _MaintenanceOrder.MaintenanceOrder = MaintenanceOrder -- 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