C_MRPMaintenanceOrderComponent
MRP Maintenance Order Component
C_MRPMaintenanceOrderComponent is a Consumption CDS View that provides data about "MRP Maintenance Order Component" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 87 fields with key fields Reservation, ReservationItem. It has 6 associations to related views. Part of development package ODATA_PP_MRP.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaintenanceOrderComponent_2 | I_MaintenanceOrderComponent_2 | from |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_ProductPlant | _ProductPlant | $projection.Material = _ProductPlant.Product and $projection.MRPPlant = _ProductPlant.Plant |
| [0..1] | I_ProductSupplyPlanning | _ProductSupplyPlanning | $projection.Material = _ProductSupplyPlanning.Product and $projection.MRPPlant = _ProductSupplyPlanning.Plant |
| [0..1] | I_StatusCodeText | _StatusTextRel | _StatusTextRel.StatusCode = 'I0002' and _StatusTextRel.Language = $session.system_language and _StatusTextRel.StatusProfile = '' |
| [0..1] | I_StatusCodeText | _StatusTextCrea | _StatusTextCrea.StatusCode = 'I0001' and _StatusTextCrea.Language = $session.system_language and _StatusTextCrea.StatusProfile = '' |
| [0..1] | I_StatusCodeText | _StatusTextFin | _StatusTextFin.StatusCode = 'I1712' and _StatusTextFin.Language = $session.system_language and _StatusTextFin.StatusProfile = '' |
| [0..1] | I_StatusCodeText | _StatusTextProg | _StatusTextProg.StatusCode = 'IDGL2' and _StatusTextProg.Language = $session.system_language and _StatusTextProg.StatusProfile = '' |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMRPMAINTORDCOMP | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | MRP Maintenance Order Component | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #CONSUMPTION | view |
Fields (87)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Reservation | Reservation | ||
| KEY | ReservationItem | ReservationItem | ||
| RecordType | ReservationType | |||
| RequirementType | ||||
| Material | Material | |||
| MaterialName | ||||
| MRPPlant | Plant | |||
| RequirementDate | RequirementDate | |||
| BaseUnit | BaseUnit | |||
| PurchasingGroup | _MaintenanceOrderOperation | PurchasingGroup | ||
| MaterialProcurementCategory | _ProductPlant | ProcurementType | ||
| MaterialProcurementType | _ProductPlant | SpecialProcurementType | ||
| ManufacturingOrder | MaintenanceOrder | |||
| OrderCategory | _MaintenanceOrder | MaintenanceOrderCategory | ||
| OrderType | _MaintenanceOrder | MaintenanceOrderType | ||
| OrderTypeName | ||||
| PriorityCode | _MaintenanceOrder | MaintPriority | ||
| OrderedQuantity | RequirementQuantityInBaseUnit | |||
| WithdrawnQuantity | QuantityWithdrawnInBaseUnit | |||
| OpenQuantity | ||||
| CommittedQuantity | 0 | |||
| OrderPlannedTotalQty | ||||
| OrderPlannedScrapQty | 0 | |||
| ExpectedDeviationQuantity | 0 | |||
| GoodsReceiptQty | 0 | |||
| PlannedStartDate | _MaintenanceOrder | MaintOrdBasicStartDate | ||
| OrderPlannedEndDate | _MaintenanceOrder | MaintOrdBasicEndDate | ||
| MaintOrdBasicStartDate | _MaintenanceOrder | MaintOrdBasicStartDate | ||
| MaintOrdBasicEndDate | _MaintenanceOrder | MaintOrdBasicEndDate | ||
| ActualStartDate | ||||
| ActualEndDate | ||||
| ActualReleasedDate | ||||
| ScheduledBasicStartDate | ||||
| ScheduledBasicEndDate | ||||
| ScheduledReleaseDate | ||||
| TopLevelOrder | ||||
| TopLevelOrderMaterial | ||||
| MaterialGoodsReceiptDuration | 0 | |||
| MaterialPlannedDeliveryDurn | 0 | |||
| MaterialPlannedProductionDurn | 0 | |||
| MaterialReplenishmentLeadDurn | 0 | |||
| SalesOrder | ||||
| SalesOrderItem | ||||
| SalesOrderType | ||||
| SalesOrderItemMaterial | ||||
| Customer | ||||
| WBSElementInternalID | ||||
| WBSElement | ||||
| WBSDescription | ||||
| ResponsiblePerson | ||||
| ResponsiblePersonName | ||||
| ProjectInternalID | ||||
| ProjectDescription | ||||
| Project | ||||
| TotalReplenishmentLeadDuration | _ProductSupplyPlanning | TotalReplenishmentLeadTime | ||
| FixedLotSizeQuantity | _ProductSupplyPlanning | FixedLotSizeQuantity | ||
| MinimumLotSizeQuantity | _ProductSupplyPlanning | MinimumLotSizeQuantity | ||
| MaximumLotSizeQuantity | _ProductSupplyPlanning | MaximumLotSizeQuantity | ||
| LotSizeRoundingQuantity | _ProductSupplyPlanning | LotSizeRoundingQuantity | ||
| RoundingProfile | _ProductSupplyPlanning | RoundingProfile | ||
| MaintPriorityType | _MaintenanceOrder | MaintPriority | ||
| MaintenancePlanningPlant | _MaintenanceOrder | MaintenancePlanningPlant | ||
| MaintenancePlanningPlantName | ||||
| MaintenancePlannerGroup | _MaintenanceOrder | MaintenancePlannerGroup | ||
| MaintenanceRevision | _MaintenanceOrder | MaintenanceRevision | ||
| MaintenancePlan | _MaintenanceOrder | MaintenancePlan | ||
| MaintenanceNotification | _MaintenanceOrder | MaintenanceNotification | ||
| MaintenanceWorkCenter | ||||
| MaintenanceWorkCenterText | ||||
| MaintenanceWorkCenterPlant | ||||
| ActivityType | _MaintenanceOrder | MaintenanceActivityType | ||
| MaintenanceActivityTypeName | ||||
| MaintenancePlannerGroupName | ||||
| StatusNameendendendasOrderStatusText | ||||
| MaintenanceOrder | MaintenanceOrder | |||
| MaintenanceOrderOperation | MaintenanceOrderOperation | |||
| MaintenanceOrderComponent | MaintenanceOrderComponent | |||
| ComponentDescription | ComponentDescription | |||
| StorageLocation | StorageLocation | |||
| MaintOrderRoutingNumber | MaintOrderRoutingNumber | |||
| MaintOrderOperationCounter | MaintOrderOperationCounter | |||
| MaintOrderComponentInternalID | MaintOrderComponentInternalID | |||
| MaintComponentItemCategory | MaintComponentItemCategory | |||
| MaterialGroup | MaterialGroup | |||
| IsDeleted | IsDeleted | |||
| PurchaseRequisition | PurchaseRequisition | |||
| PurchaseRequisitionItem | PurchaseRequisitionItem |
@AbapCatalog.sqlViewName: 'CMRPMAINTORDCOMP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'MRP Maintenance Order Component'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #CONSUMPTION
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view C_MRPMaintenanceOrderComponent
as select from I_MaintenanceOrderComponent_2
association [0..1] to I_ProductPlant as _ProductPlant on $projection.Material = _ProductPlant.Product
and $projection.MRPPlant = _ProductPlant.Plant
association [0..1] to I_ProductSupplyPlanning as _ProductSupplyPlanning on $projection.Material = _ProductSupplyPlanning.Product
and $projection.MRPPlant = _ProductSupplyPlanning.Plant
association [0..1] to I_StatusCodeText as _StatusTextRel on _StatusTextRel.StatusCode = 'I0002'
and _StatusTextRel.Language = $session.system_language
and _StatusTextRel.StatusProfile = ''
association [0..1] to I_StatusCodeText as _StatusTextCrea on _StatusTextCrea.StatusCode = 'I0001'
and _StatusTextCrea.Language = $session.system_language
and _StatusTextCrea.StatusProfile = ''
association [0..1] to I_StatusCodeText as _StatusTextFin on _StatusTextFin.StatusCode = 'I1712'
and _StatusTextFin.Language = $session.system_language
and _StatusTextFin.StatusProfile = ''
association [0..1] to I_StatusCodeText as _StatusTextProg on _StatusTextProg.StatusCode = 'IDGL2'
and _StatusTextProg.Language = $session.system_language
and _StatusTextProg.StatusProfile = ''
{
key Reservation,
key ReservationItem,
ReservationType as RecordType,
'AR' as RequirementType,
Material,
_Material._Text[1: Language = $session.system_language ].MaterialName,
Plant as MRPPlant,
RequirementDate,
BaseUnit,
_MaintenanceOrderOperation.PurchasingGroup,
_ProductPlant.ProcurementType as MaterialProcurementCategory,
_ProductPlant.SpecialProcurementType as MaterialProcurementType,
MaintenanceOrder as ManufacturingOrder,
_MaintenanceOrder.MaintenanceOrderCategory as OrderCategory,
_MaintenanceOrder.MaintenanceOrderType as OrderType,
_MaintenanceOrder._MaintenanceOrderType._Text[1: Language = $session.system_language ].OrderTypeName,
_MaintenanceOrder.MaintPriority as PriorityCode,
RequirementQuantityInBaseUnit as OrderedQuantity,
QuantityWithdrawnInBaseUnit as WithdrawnQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
RequirementQuantityInBaseUnit - QuantityWithdrawnInBaseUnit as OpenQuantity,
0 as CommittedQuantity,
_MaintenanceOrderOperation._OperationPlanningValues.ConfirmationTotalQuantity as OrderPlannedTotalQty, // to check
0 as OrderPlannedScrapQty,
0 as ExpectedDeviationQuantity,
0 as GoodsReceiptQty,
_MaintenanceOrder.MaintOrdBasicStartDate as PlannedStartDate,
_MaintenanceOrder.MaintOrdBasicEndDate as OrderPlannedEndDate,
_MaintenanceOrder.MaintOrdBasicStartDate,
_MaintenanceOrder.MaintOrdBasicEndDate,
_MaintenanceOrderOperation._OperationPlanningValues.OpActualExecutionStartDate as ActualStartDate,
_MaintenanceOrderOperation._OperationPlanningValues.OpActualExecutionEndDate as ActualEndDate,
'00000000' as ActualReleasedDate,
_MaintenanceOrderOperation._OperationPlanningValues.OpErlstSchedldExecStrtDte as ScheduledBasicStartDate,
_MaintenanceOrderOperation._OperationPlanningValues.OpErlstSchedldExecEndDte as ScheduledBasicEndDate,
'00000000' as ScheduledReleaseDate,
'' as TopLevelOrder,
'' as TopLevelOrderMaterial,
0 as MaterialGoodsReceiptDuration,
0 as MaterialPlannedDeliveryDurn,
0 as MaterialPlannedProductionDurn,
0 as MaterialReplenishmentLeadDurn,
'' as SalesOrder,
'000000' as SalesOrderItem,
'' as SalesOrderType,
'' as SalesOrderItemMaterial,
'' as Customer,
'00000000' as WBSElementInternalID,
'' as WBSElement,
'' as WBSDescription,
'00000000' as ResponsiblePerson,
'' as ResponsiblePersonName,
'00000000' as ProjectInternalID,
'' as ProjectDescription,
'' as Project,
_ProductSupplyPlanning.TotalReplenishmentLeadTime as TotalReplenishmentLeadDuration,
_ProductSupplyPlanning.FixedLotSizeQuantity, // MaterialFixedLotSizeQuantity
_ProductSupplyPlanning.MinimumLotSizeQuantity, //MaterialMinLotSizeQuantity,
_ProductSupplyPlanning.MaximumLotSizeQuantity, //MaterialMaxLotSizeQuantity,
_ProductSupplyPlanning.LotSizeRoundingQuantity, //MaterialRoundingQuantity,
_ProductSupplyPlanning.RoundingProfile, //MaterialRoundingProfile,
_MaintenanceOrder.MaintPriority as MaintPriorityType,
_MaintenanceOrder.MaintenancePlanningPlant,
_MaintenanceOrder._MaintenancePlanningPlant.PlantName as MaintenancePlanningPlantName,
_MaintenanceOrder.MaintenancePlannerGroup,
_MaintenanceOrder.MaintenanceRevision,
_MaintenanceOrder.MaintenancePlan,
_MaintenanceOrder.MaintenanceNotification,
_MaintenanceOrder._MainWorkCenter.WorkCenter as MaintenanceWorkCenter,
_MaintenanceOrder._MainWorkCenter._Text[1: Language = $session.system_language ].WorkCenterText as MaintenanceWorkCenterText,
_MaintenanceOrder._MainWorkCenter.Plant as MaintenanceWorkCenterPlant,
_MaintenanceOrder.MaintenanceActivityType as ActivityType,
_MaintenanceOrder._MaintenanceActivityType._Text[1: Language = $session.system_language ].MaintenanceActivityTypeName,
_MaintenanceOrder._MaintenancePlannerGroup.MaintenancePlannerGroupName,
//Same (old QV) logic was taken over from CL_PP_QUICKVIEW_HANDLER->GET_MFGORD_COMP_QUICKVIEW_DATA (lines 182-194) [StatusText is taken from system table TJ02]
case
when _MaintenanceOrder._Order.ActualEndDate <> '00000000' then _StatusTextFin.StatusName //Order Status -> Finished
else
case
when _MaintenanceOrder._Order.ActualStartDate <> '00000000' then _StatusTextProg.StatusName //Order Status -> In Progress
else
case
when _MaintenanceOrder._Order.ActualReleasedDate <> '00000000' then _StatusTextRel.StatusName //Order Status -> Released
else
_StatusTextCrea.StatusName //Order Status -> Created
end
end
end as OrderStatusText,
MaintenanceOrder,
MaintenanceOrderOperation,
MaintenanceOrderComponent,
ComponentDescription,
StorageLocation,
MaintOrderRoutingNumber,
MaintOrderOperationCounter,
MaintOrderComponentInternalID,
MaintComponentItemCategory,
MaterialGroup,
IsDeleted,
PurchaseRequisition,
PurchaseRequisitionItem
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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