P_MPEProcOrderPover
Process Orders
P_MPEProcOrderPover is a Consumption CDS View that provides data about "Process Orders" in SAP S/4HANA. It reads from 1 data source (I_MfgOrder) and exposes 71 fields with key field ManufacturingOrder. It has 4 associations to related views. Part of development package ODATA_MPE_MFGORDER.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MfgOrder | mfgorder | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_WBSElement | _WBSElement2 | $projection.WBSElementInternalID = _WBSElement2.WBSElementInternalID |
| [0..1] | P_MPEProdnOrdItmDvtnDurn | _OrdData | $projection.ManufacturingOrder = _OrdData.ManufacturingOrder |
| [0..1] | I_StatusCodeText | _StatusText | $projection.orderstatus = _StatusText.StatusCode and _StatusText.StatusProfile = '' and _StatusText.Language = $session.system_language |
| [0..1] | I_MfgOrder | _SuperiorMfgOrder | $projection.MfgOrderSuperiorMfgOrder = _SuperiorMfgOrder.ManufacturingOrder |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| EndUserText.label | Process Orders | view | |
| VDM.private | true | view | |
| Search.searchable | false | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Metadata.allowExtensions | false | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (71)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ManufacturingOrder | I_MfgOrder | ManufacturingOrder | |
| OrderInternalBillOfOperations | I_MfgOrder | OrderInternalBillOfOperations | ||
| ManufacturingOrderCategory | I_MfgOrder | ManufacturingOrderCategory | ||
| ProductionPlant | I_MfgOrder | ProductionPlant | ||
| Material | I_MfgOrder | Material | ||
| MaterialName | ||||
| OrderStatus | _OrdData | OrderStatus | ||
| ManufacturingOrderImportance | I_MfgOrder | ManufacturingOrderImportance | ||
| ManufacturingOrderType | I_MfgOrder | ManufacturingOrderType | ||
| ManufacturingOrderTypeName | ||||
| MfgOrderScheduledReleaseDate | I_MfgOrder | MfgOrderScheduledReleaseDate | ||
| MfgOrderPlannedStartDate | I_MfgOrder | MfgOrderPlannedStartDate | ||
| MfgOrderPlannedStartTime | I_MfgOrder | MfgOrderPlannedStartTime | ||
| MfgOrderPlannedEndDate | I_MfgOrder | MfgOrderPlannedEndDate | ||
| MfgOrderPlannedEndTime | I_MfgOrder | MfgOrderPlannedEndTime | ||
| MfgOrderActualStartDate | I_MfgOrder | MfgOrderActualStartDate | ||
| MfgOrderActualStartTime | I_MfgOrder | MfgOrderActualStartTime | ||
| MfgOrderActualEndDate | I_MfgOrder | MfgOrderActualEndDate | ||
| MaterialGoodsReceiptDuration | _OrdData | MaterialGoodsReceiptDuration | ||
| ProductionUnit | I_MfgOrder | ProductionUnit | ||
| MfgOrderPlannedTotalQty | I_MfgOrder | MfgOrderPlannedTotalQty | ||
| MfgOrderPlannedScrapQty | I_MfgOrder | MfgOrderPlannedScrapQty | ||
| ActualDeliveredQuantity | I_MfgOrder | ActualDeliveredQuantity | ||
| ExpectedDeviationQuantity | ||||
| IsCompletelyDelivered | I_MfgOrder | IsCompletelyDelivered | ||
| ProductionVersion | I_MfgOrder | ProductionVersion | ||
| ProductionVersionText | ||||
| Plant | ||||
| ProductionLine | ||||
| WorkCenterText | ||||
| MRPPlant | I_MfgOrder | MRPPlant | ||
| MRPController | I_MfgOrder | MRPController | ||
| MRPControllerName | ||||
| ProductionSupervisor | I_MfgOrder | ProductionSupervisor | ||
| ProductionSupervisorName | ||||
| MfgOrderSuperiorMfgOrder | I_MfgOrder | MfgOrderSuperiorMfgOrder | ||
| SuperiorMfgOrderMaterial | _SuperiorMfgOrder | Material | ||
| SuperiorMfgOrderMaterialName | ||||
| LeadingOrder | I_MfgOrder | LeadingOrder | ||
| SlsDoc | I_MfgOrder | SalesDocument | ||
| SlsDocItm | I_MfgOrder | SalesDocumentItem | ||
| SlsDocCat | _SalesDocumentItem | SDDocumentCategory | ||
| SlsDocCatName | ||||
| SDDocument | ||||
| SDDocumentItem | ||||
| SDDocumentCategory | ||||
| SDDocumentCategoryName | ||||
| ReferenceSDDocument | I_MfgOrder | SalesOrder | ||
| ReferenceSDDocumentItem | I_MfgOrder | SalesOrderItem | ||
| SoldToParty | ||||
| CustomerName | ||||
| AuthorizationGroup | ||||
| WBSElement | _WBSElement | WBSElement | ||
| WBSDescription | _WBSElement | WBSDescription | ||
| Project | ||||
| ProjectDescription | ||||
| InspectionLot | I_MfgOrder | InspectionLot | ||
| clientNULLasLastChangeDateTime | ||||
| _OrdInternalBillOfOperations | _OrdInternalBillOfOperations | |||
| _MfgOrderCategory | _MfgOrderCategory | |||
| _Material | _Material | |||
| _StatusText | _StatusText | |||
| _MfgOrderType | _MfgOrderType | |||
| _ProductionVersion | _ProductionVersion | |||
| _Plant | _Plant | |||
| _MRPPlant | _MRPPlant | |||
| _MRPController | _MRPController | |||
| _WBSElement2 | _WBSElement2 | |||
| _ProductionSupervisor | _ProductionSupervisor | |||
| WBSElementInternalID | I_MfgOrder | WBSElementInternalID | ||
| _SoldToParty |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'Process Orders'
@VDM.private:true
@Search.searchable: false
@ObjectModel: {
usageType : { serviceQuality: #C, sizeCategory: #XXL, dataClass: #MIXED }
}
@VDM.viewType: #CONSUMPTION
@Metadata.allowExtensions: false
@Metadata.ignorePropagatedAnnotations: true
define view entity P_MPEProcOrderPover
as select from I_MfgOrder as mfgorder
association [0..1] to I_WBSElement as _WBSElement2 on $projection.WBSElementInternalID = _WBSElement2.WBSElementInternalID
association [0..1] to P_MPEProdnOrdItmDvtnDurn as _OrdData on $projection.ManufacturingOrder = _OrdData.ManufacturingOrder
association [0..1] to I_StatusCodeText as _StatusText on $projection.orderstatus = _StatusText.StatusCode
and _StatusText.StatusProfile = ''
and _StatusText.Language = $session.system_language
association [0..1] to I_MfgOrder as _SuperiorMfgOrder on $projection.MfgOrderSuperiorMfgOrder = _SuperiorMfgOrder.ManufacturingOrder
{
@Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8}
key mfgorder.ManufacturingOrder,
//Bill of Operations
@UI.hidden: true
mfgorder.OrderInternalBillOfOperations,
//Manufactoring Order Category
@UI.hidden: true
mfgorder.ManufacturingOrderCategory,
//Production Plant
@UI.hidden: true
mfgorder.ProductionPlant,
//Material
mfgorder.Material,
//Material Description
@Semantics.text
mfgorder._Material._Text[1: Language = $session.system_language].MaterialName,
//Order Status
_OrdData.OrderStatus,
//Milestone Status
case
when _OrdData.OrderStatus = 'I0013' then '' // => DELETED
when _OrdData.OrderStatus = 'I0076' then '' // => MARKED FOR DELETION
when _OrdData.OrderStatus = 'I0045' then '' // => TECHNICALLY COMPLETED
when _OrdData.OrderStatus = 'I0046' then '' // => CLOSED
// => DELIVERED
when _OrdData.OrderStatus = 'I0012' and _OrdData.PlannedActualDlvDvtnDurn <= 0 then 'DELV' // 'Delivered'
when _OrdData.OrderStatus = 'I0012' and _OrdData.PlannedActualDlvDvtnDurn > 0 then 'DELD' // 'Delivered - Delayed'
when _OrdData.OrderStatus = 'I0012' and _OrdData.PlannedActualDlvDvtnDurn is null then 'DELD' // 'Delivered - Delayed'
when _OrdData.PlannedCurrentAvailDvtnDurn > 0 then 'DELO' // 'part. Delivered - Overdue/ Delivered - Overdue'
// => partially DELIVERED
when _OrdData.OrderStatus = 'I0074' and _OrdData.PlannedCurrentAvailDvtnDurn <= 0 and _OrdData.OrderIsConfirmed = '' then 'INPR' // 'partially Delivery - in Progress'
when _OrdData.OrderStatus = 'I0074' and _OrdData.PlannedCurrentAvailDvtnDurn <= 0 and _OrdData.OrderIsConfirmed = 'X' then 'CMPL' // 'Confirmed-Completed' => partially delivery has not started until now
when _OrdData.OrderStatus = 'I0074' and _OrdData.PlannedCurrentAvailDvtnDurn <= 0 then 'NULL' // 'Teststatus'
// => CONFIRMED
when _OrdData.OrderStatus = 'I0009' and _OrdData.PlannedActualEndDvtnDurn <= 0 then 'CMPL' // 'Confirmed-Completed'
when _OrdData.OrderStatus = 'I0009' and _OrdData.PlannedActualEndDvtnDurn > 0 then 'CMPD' // 'Confirmed-Completed Delayed'
when _OrdData.OrderStatus = 'I0009' and _OrdData.PlannedActualEndDvtnDurn is null then 'CMPD' // 'Confirmed-Completed Delayed'
when _OrdData.PlannedCurrentEndDvtnDurn > 0 then 'ENDO' // 'Confirmed-End Overdue'
// => PARTIALLY CONFIRMED
when _OrdData.OrderStatus = 'I0010' and _OrdData.PlannedActualStartDateDvtnDurn <= 0 then 'INPR' // 'Partially Confirmed - In Progress'
when _OrdData.OrderStatus = 'I0010' and _OrdData.PlannedActualStartDateDvtnDurn > 0 then 'INPD' // 'Partially Confirmed - In Progress Delayed'
when _OrdData.OrderStatus = 'I0010' and _OrdData.PlannedActualStartDateDvtnDurn is null then 'INPD' // 'Partially Confirmed - In Progress Delayed'
when _OrdData.PlannedCurrentStrtDateDvtnDurn > 0 then 'STOV' // 'Partially Confirmed - Start Overdue'
// => RELEASED
when _OrdData.OrderStatus = 'I0002' and _OrdData.PlannedActlReleaseDateDvtnDurn <= 0 then 'RELE' // 'Released'
when _OrdData.OrderStatus = 'I0002' and _OrdData.PlannedActlReleaseDateDvtnDurn > 0 then 'RELD' // 'Released - Delayed'
when _OrdData.OrderStatus = 'I0002' and _OrdData.PlannedActlReleaseDateDvtnDurn is null then 'RELD' // 'Released - Delayed'
// => PARTIALLY RELEASED
when _OrdData.OrderStatus = 'I0042' and _OrdData.PlannedActlReleaseDateDvtnDurn <= 0 then 'RELE' // 'Partially Released'
when _OrdData.OrderStatus = 'I0042' and _OrdData.PlannedActlReleaseDateDvtnDurn > 0 then 'RELD' // 'Partially Released - Delayed'
when _OrdData.OrderStatus = 'I0042' and _OrdData.PlannedActlReleaseDateDvtnDurn is null then 'RELD' // 'Partially Released - Delayed'
when _OrdData.PlannedCurrReleaseDateDvtnDurn > 0 then 'RELO' // 'Partially Released - Overdue'
when _OrdData.OrderStatus = 'I0001' then 'CREA' // => CREATED
// when _OrdData.OrderStatus = 'I0074' then 'CMPL' // 'Confirmed-Completed' => JUST IN TIME,
else ''
end as ProductionMilestoneStatus,
//Order Priority
mfgorder.ManufacturingOrderImportance,
//Order Type
mfgorder.ManufacturingOrderType,
//Order Type Description
@Semantics.text
mfgorder._MfgOrderType._Text[1: Language = $session.system_language].ManufacturingOrderTypeName,
//Scheduled Release Date
mfgorder.MfgOrderScheduledReleaseDate,
//Scheduled Release Time => NOT AVAILABLE IN PRODUCTION ORDER <=
//Basic Start Date
mfgorder.MfgOrderPlannedStartDate,
//Basic Start Time
mfgorder.MfgOrderPlannedStartTime,
//Basic End Date
mfgorder.MfgOrderPlannedEndDate,
//Basic End Time
mfgorder.MfgOrderPlannedEndTime,
//Actual Starte Date
mfgorder.MfgOrderActualStartDate,
//Actual Start Time
mfgorder.MfgOrderActualStartTime,
//Actual End Date
mfgorder.MfgOrderActualEndDate,
//Actual End Time => NOT AVAILABLE IN PRODUCTION ORDER <=
//Goods receipt processing time in days
_OrdData.MaterialGoodsReceiptDuration,
//Unit of Measure on Header Level
//@Semantics.unitOfMeasure: true
mfgorder.ProductionUnit,
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
//Order Quantity
mfgorder.MfgOrderPlannedTotalQty,
//Scrap Quantity
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
mfgorder.MfgOrderPlannedScrapQty,
//Goods Receipt Quantity
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
mfgorder.ActualDeliveredQuantity,
//Expected Deviation Quantity
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
mfgorder.ExpectedDeviationQuantity * (-1) as ExpectedDeviationQuantity,
@Semantics.quantity.unitOfMeasure: 'ProductionUnit'
case
when IsCompletelyDelivered = 'X'
then MfgOrderPlannedTotalQty * 0
else MfgOrderPlannedTotalQty - MfgOrderPlannedScrapQty - ActualDeliveredQuantity - ExpectedDeviationQuantity
end as OpenQuantity,
//Delivery Completed Indicator
mfgorder.IsCompletelyDelivered,
//Product Version
mfgorder.ProductionVersion,
//Product Version Description
@Semantics.text
mfgorder._ProductionVersion.ProductionVersionText,
//Production Version Plant
@UI.hidden: true
mfgorder._ProductionVersion.Plant,
//Production Line
mfgorder._ProductionVersion.ProductionLine,
//Production Line Description
@Semantics.text
mfgorder._ProductionVersion._ProductionLine._WorkCenterTextBySemanticKey[ 1: Language = $session.system_language ].WorkCenterText,
//Order Start is late
case
when _OrdData.OrderIsPartiallyConfirmed= 'X' and _OrdData.ConfirmedStartDelayInSeconds > 0 then 'X'
when (_OrdData.OrderIsReleased= 'X' and _OrdData.OrderIsConfirmed= '') and _OrdData.CurrentStartDelayInSeconds > 0 then 'X'
else ''
end as OrderExecutionStartIsLate,
//Order End is late
case
when _OrdData.OrderIsConfirmed= 'X' and _OrdData.ConfirmedEndDelayInSeconds > 0 then 'X'
when (_OrdData.OrderIsPartiallyConfirmed= 'X' and _OrdData.OrderIsConfirmed = '') and _OrdData.CurrentEndDelayInSeconds > 0 then 'X'
else ''
end as OrderExecutionEndIsLate,
//MRP Plant
@UI.hidden: true
mfgorder.MRPPlant,
//MRP Controller
mfgorder.MRPController,
//MRP Controller Description
@Semantics.text
mfgorder._MRPController.MRPControllerName,
//Production Supervisor
mfgorder.ProductionSupervisor,
//Production Supervisor Description
@Semantics.text
mfgorder._ProductionSupervisor.ProductionSupervisorName,
//Superior Order
mfgorder.MfgOrderSuperiorMfgOrder,
//Superior Order Material
_SuperiorMfgOrder.Material as SuperiorMfgOrderMaterial,
//Superior Order Material Name
_SuperiorMfgOrder._Material._Text[1: Language = $session.system_language].MaterialName as SuperiorMfgOrderMaterialName,
//Leading Order
mfgorder.LeadingOrder,
//Sales Document (follow-up Document should be a SD Order, if available)
mfgorder.SalesDocument as SlsDoc,
//Sales Document (further data to find the follow-up document)
mfgorder.SalesDocumentItem as SlsDocItm,
//Sales Document Category (further data to find the follow-up document)
_SalesDocumentItem.SDDocumentCategory as SlsDocCat,
//Sales Document Category Description
@Semantics.text
_SalesDocumentItem._SDDocumentCategory._Text[1: Language = $session.system_language].SDDocumentCategoryName as SlsDocCatName,
//If follow-up document is not available take the actual document
coalesce( _SalesDocumentItem.SalesDocument, mfgorder.SalesOrder ) as SDDocument,
//If follow-up document is not available take the actual document
coalesce( _SalesDocumentItem.SalesDocumentItem, mfgorder.SalesOrderItem ) as SDDocumentItem,
//If follow-up document is not available take the actual document
coalesce( _SalesDocumentItem.SDDocumentCategory, mfgorder._SalesDocumentItem.SDDocumentCategory ) as SDDocumentCategory,
//If follow-up document is not available take the actual document
@Semantics.text
coalesce( _SalesDocumentItem._SDDocumentCategory._Text[1: Language = $session.system_language].SDDocumentCategoryName, mfgorder._SalesDocumentItem._SDDocumentCategory._Text[1: Language = $session.system_language].SDDocumentCategoryName ) as SDDocumentCategoryName,
//Reference Document which is needed to find the follow-up document (Quotation)
mfgorder.SalesOrder as ReferenceSDDocument,
//Reference Document which is needed to find the follow-up document (Quotation Item)
mfgorder.SalesOrderItem as ReferenceSDDocumentItem,
//Customer (Sold-to Party)
mfgorder._SalesDocument.SoldToParty,
//Customer (Sold-to Party) Name
@Semantics.text
mfgorder._SalesDocument._SoldToParty.CustomerName,
//Authority Check for Customer (Sold-to Party)
mfgorder._SalesDocument._SoldToParty.AuthorizationGroup,
//WBS Element
_WBSElement.WBSElement,
//Element Description
@Semantics.text
_WBSElement.WBSDescription,
cast( case
when _WBSElement.ResponsiblePerson = '00000000' or _WBSElement.ResponsiblePerson is null
then _WBSElement2._EntProjectResponsiblePerson.PersonWorkAgreement
else
_WBSElement.ResponsiblePerson
end as ps_s4_vernr preserving type ) as ProjectResponsiblePerson,
cast( case
when _WBSElement.ResponsiblePerson = '00000000' or _WBSElement.ResponsiblePerson is null
then _WBSElement2._EntProjectResponsiblePerson._WorkforcePerson.PersonFullName
else
_WBSElement.ResponsiblePersonName
end as ad_namtext preserving type ) as ProjectResponsiblePersonName,
//Project
_WBSElement._Project.Project,
//Project Description
@Semantics.text
//To use the language key leads to errors in this case
_WBSElement._Project.ProjectDescription,
//Inspection Lot
mfgorder.InspectionLot,
dats_tims_to_tstmp( mfgorder.LastChangeDate, mfgorder.LastChangeTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL' ) as LastChangeDateTime,
//Associations
_OrdInternalBillOfOperations,
_MfgOrderCategory,
_Material,
_StatusText,
_MfgOrderType,
_ProductionVersion,
_Plant,
_MRPPlant,
_MRPController,
_WBSElement2,
_ProductionSupervisor,
mfgorder.WBSElementInternalID,
mfgorder._SalesDocument._SoldToParty
}
where
mfgorder.ManufacturingOrderCategory = '40'; //Process Orders
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