P_MPEProdnOrderPover

DDL: P_MPEPRODNORDERPOVER Type: view_entity CONSUMPTION Package: ODATA_MPE_MFGORDER

Production Order Popover

P_MPEProdnOrderPover is a Consumption CDS View that provides data about "Production Order Popover" in SAP S/4HANA. It reads from 1 data source (I_ManufacturingOrder) and exposes 72 fields with key field ManufacturingOrder. It has 5 associations to related views. Part of development package ODATA_MPE_MFGORDER.

Data Sources (1)

SourceAliasJoin Type
I_ManufacturingOrder mfgorder from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_SalesDocumentItem _SalesDocumentItem _SalesDocumentItem.ReferenceSDDocument = $projection.ReferenceSDDocument and _SalesDocumentItem.ReferenceSDDocumentItem = $projection.ReferenceSDDocumentItem and _SalesDocumentItem.ReferenceSDDocumentCategory = 'B'
[0..1] P_MPEProdnOrdItmDvtnDurn _OrdData $projection.ManufacturingOrder = _OrdData.ManufacturingOrder
[0..1] I_StatusCodeText _StatusText _StatusText.StatusCode = $projection.orderstatus and _StatusText.StatusProfile = '' and _StatusText.Language = $session.system_language
[0..1] I_ManufacturingOrder _LeadingMfgOrder $projection.LeadingOrder = _LeadingMfgOrder.ManufacturingOrder
[0..1] I_WBSElement _WBSElement2 $projection.WBSElementInternalID = _WBSElement2.WBSElementInternalID

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY ManufacturingOrder I_ManufacturingOrder ManufacturingOrder Order
OrderInternalBillOfOperations I_ManufacturingOrder MfgOrderInternalID
ManufacturingOrderCategory I_ManufacturingOrder ManufacturingOrderCategory Order Category
ProductionPlant I_ManufacturingOrder ProductionPlant Prod plnt
Material I_ManufacturingOrder Material Vehicle Model
MaterialName
OrderStatus _OrdData OrderStatus
ManufacturingOrderImportance I_ManufacturingOrder ManufacturingOrderImportance
ManufacturingOrderType I_ManufacturingOrder ManufacturingOrderType Order Type
ManufacturingOrderTypeName
MfgOrderScheduledReleaseDate I_ManufacturingOrder MfgOrderScheduledReleaseDate
MfgOrderPlannedStartDate I_ManufacturingOrder MfgOrderPlannedStartDate
MfgOrderPlannedStartTime I_ManufacturingOrder MfgOrderPlannedStartTime
MfgOrderPlannedEndDate I_ManufacturingOrder MfgOrderPlannedEndDate
MfgOrderPlannedEndTime I_ManufacturingOrder MfgOrderPlannedEndTime
MfgOrderScheduledStartDate I_ManufacturingOrder MfgOrderScheduledStartDate
MfgOrderActualStartDate I_ManufacturingOrder MfgOrderActualStartDate
MfgOrderActualStartTime I_ManufacturingOrder MfgOrderActualStartTime
MfgOrderActualEndDate I_ManufacturingOrder MfgOrderActualEndDate
MaterialGoodsReceiptDuration _OrdData MaterialGoodsReceiptDuration GR proc. time
ProductionUnit I_ManufacturingOrder ProductionUnit
MfgOrderPlannedTotalQty I_ManufacturingOrder MfgOrderPlannedTotalQty
MfgOrderPlannedScrapQty I_ManufacturingOrder MfgOrderPlannedScrapQty
ActualDeliveredQuantity I_ManufacturingOrder ActualDeliveredQuantity Delivered Quantity
ExpectedDeviationQuantity
quan173asOpenQuantity
IsCompletelyDelivered I_ManufacturingOrder IsCompletelyDelivered Is completely delivered
ProductionVersion I_ManufacturingOrder ProductionVersion Version ID
ProductionVersionText
Plant
ProductionLine
WorkCenterText
MRPPlant I_ManufacturingOrder PlanningPlant Plant
MRPController I_ManufacturingOrder MRPController MRP Controller
MRPControllerName
ProductionSupervisor I_ManufacturingOrder ProductionSupervisor Prodn Supervisor
ProductionSupervisorName
LeadingMfgOrderMaterial _LeadingMfgOrder Material Vehicle Model
LeadingMfgOrderMaterialName
LeadingOrder I_ManufacturingOrder LeadingOrder Last order
SlsDoc _SalesDocumentItem SalesDocument SD Document
SlsDocItm _SalesDocumentItem SalesDocumentItem Sales Document Item
SlsDocCat _SalesDocumentItem SDDocumentCategory Document Cat.
SlsDocCatName
SDDocument
SDDocumentItem
SDDocumentCategory
ReferenceSDDocument I_ManufacturingOrder SalesOrder SD Document
ReferenceSDDocumentItem I_ManufacturingOrder SalesOrderItem Sales Order Item
SoldToParty
CustomerName
AuthorizationGroup
WBSElement _WBSElement WBSElement WBS Internal ID
WBSDescription _WBSElement WBSDescription WBS Element Name
Project
ProjectDescription
InspectionLot I_ManufacturingOrder InspectionLot Inspection Lot
clientNULLasLastChangeDateTime
Product I_ManufacturingOrder Product Product Sold
_OrdInternalBillOfOperations I_ManufacturingOrder _OrderInternalID
_MfgOrderCategory _MfgOrderCategory
_Material _Material
_StatusText _StatusText
_MfgOrderType _MfgOrderType
_ProductionVersion _ProductionVersion
_Plant _ProductionPlant
_MRPPlant I_ManufacturingOrder _PlanningPlant
_MRPController _MRPController
_ProductionSupervisor _ProductionSupervisor
_WBSElement _WBSElement
WBSElementInternalID I_ManufacturingOrder WBSElementInternalID WBS Internal ID
_SoldToParty

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 P_MPEProdnOrderPover.
-- 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.

CREATE VIEW P_MPEProdnOrderPover AS
SELECT
  mfgorder.ManufacturingOrder AS ManufacturingOrder,
  mfgorder.MfgOrderInternalID AS OrderInternalBillOfOperations,
  mfgorder.ManufacturingOrderCategory AS ManufacturingOrderCategory,
  mfgorder.ProductionPlant AS ProductionPlant,
  mfgorder.Material AS Material,
  mfgorder._Material._Text[1: Language = $session.system_language].MaterialName AS MaterialName,
  _OrdData.OrderStatus AS OrderStatus,
  mfgorder.ManufacturingOrderImportance AS ManufacturingOrderImportance,
  mfgorder.ManufacturingOrderType AS ManufacturingOrderType,
  mfgorder._MfgOrderType._Text[1: Language = $session.system_language].ManufacturingOrderTypeName AS ManufacturingOrderTypeName,
  mfgorder.MfgOrderScheduledReleaseDate AS MfgOrderScheduledReleaseDate,
  mfgorder.MfgOrderPlannedStartDate AS MfgOrderPlannedStartDate,
  mfgorder.MfgOrderPlannedStartTime AS MfgOrderPlannedStartTime,
  mfgorder.MfgOrderPlannedEndDate AS MfgOrderPlannedEndDate,
  mfgorder.MfgOrderPlannedEndTime AS MfgOrderPlannedEndTime,
  mfgorder.MfgOrderScheduledStartDate AS MfgOrderScheduledStartDate,
  mfgorder.MfgOrderActualStartDate AS MfgOrderActualStartDate,
  mfgorder.MfgOrderActualStartTime AS MfgOrderActualStartTime,
  mfgorder.MfgOrderActualEndDate AS MfgOrderActualEndDate,
  _OrdData.MaterialGoodsReceiptDuration AS MaterialGoodsReceiptDuration,
  mfgorder.ProductionUnit AS ProductionUnit,
  mfgorder.MfgOrderPlannedTotalQty AS MfgOrderPlannedTotalQty,
  mfgorder.MfgOrderPlannedScrapQty AS MfgOrderPlannedScrapQty,
  mfgorder.ActualDeliveredQuantity AS ActualDeliveredQuantity,
  mfgorder.ExpectedDeviationQuantity * (-1) AS ExpectedDeviationQuantity,
  cast( case when IsCompletelyDelivered = 'X' then 0 when MfgOrderPlannedTotalQty - MfgOrderPlannedScrapQty - ActualDeliveredQuantity - ExpectedDeviationQuantity < 0 then 0 else MfgOrderPlannedTotalQty - MfgOrderPlannedScrapQty - ActualDeliveredQuantity - ExpectedDeviationQuantity end as abap.quan(17,3) ) as OpenQuantity AS quan173asOpenQuantity,
  mfgorder.IsCompletelyDelivered AS IsCompletelyDelivered,
  mfgorder.ProductionVersion AS ProductionVersion,
  mfgorder._ProductionVersion.ProductionVersionText AS ProductionVersionText,
  mfgorder._ProductionVersion.Plant AS Plant,
  mfgorder._ProductionVersion.ProductionLine AS ProductionLine,
  mfgorder._ProductionVersion._ProductionLine._WorkCenterTextBySemanticKey[ 1: Language = $session.system_language ].WorkCenterText AS WorkCenterText,
  mfgorder.PlanningPlant AS MRPPlant,
  mfgorder.MRPController AS MRPController,
  mfgorder._MRPController.MRPControllerName AS MRPControllerName,
  mfgorder.ProductionSupervisor AS ProductionSupervisor,
  mfgorder._ProductionSupervisor.ProductionSupervisorName AS ProductionSupervisorName,
  _LeadingMfgOrder.Material AS LeadingMfgOrderMaterial,
  _LeadingMfgOrder._Material._Text[1: Language = $session.system_language].MaterialName AS LeadingMfgOrderMaterialName,
  mfgorder.LeadingOrder AS LeadingOrder,
  _SalesDocumentItem.SalesDocument AS SlsDoc,
  _SalesDocumentItem.SalesDocumentItem AS SlsDocItm,
  _SalesDocumentItem.SDDocumentCategory AS SlsDocCat,
  _SalesDocumentItem._SDDocumentCategory._Text[1: Language = $session.system_language].SDDocumentCategoryName AS SlsDocCatName,
  coalesce( _SalesDocumentItem.SalesDocument, mfgorder.SalesOrder ) AS SDDocument,
  coalesce( _SalesDocumentItem.SalesDocumentItem, mfgorder.SalesOrderItem ) AS SDDocumentItem,
  coalesce( _SalesDocumentItem.SDDocumentCategory, mfgorder._SalesDocumentItem.SDDocumentCategory ) AS SDDocumentCategory,
  mfgorder.SalesOrder AS ReferenceSDDocument,
  mfgorder.SalesOrderItem AS ReferenceSDDocumentItem,
  mfgorder._SalesDocument.SoldToParty AS SoldToParty,
  mfgorder._SalesDocument._SoldToParty.CustomerName AS CustomerName,
  mfgorder._SalesDocument._SoldToParty.AuthorizationGroup AS AuthorizationGroup,
  _WBSElement.WBSElement AS WBSElement,
  _WBSElement.WBSDescription AS WBSDescription,
  _WBSElement._Project.Project AS Project,
  _WBSElement._Project.ProjectDescription AS ProjectDescription,
  mfgorder.InspectionLot AS InspectionLot,
  dats_tims_to_tstmp( mfgorder.LastChangeDate, mfgorder.LastChangeTime, abap_system_timezone( $session.client,'NULL' ), $session.client,'NULL' ) as LastChangeDateTime AS clientNULLasLastChangeDateTime,
  mfgorder.Product AS Product,
  mfgorder._OrderInternalID AS _OrdInternalBillOfOperations,
  mfgorder._PlanningPlant AS _MRPPlant,
  mfgorder.WBSElementInternalID AS WBSElementInternalID,
  mfgorder._SalesDocument._SoldToParty AS _SoldToParty
FROM I_ManufacturingOrder AS mfgorder
LEFT OUTER JOIN I_SalesDocumentItem AS _SalesDocumentItem ON _SalesDocumentItem.ReferenceSDDocument = ReferenceSDDocument AND _SalesDocumentItem.ReferenceSDDocumentItem = ReferenceSDDocumentItem AND _SalesDocumentItem.ReferenceSDDocumentCategory = 'B'  -- association [0..1]
LEFT OUTER JOIN P_MPEProdnOrdItmDvtnDurn AS _OrdData ON ManufacturingOrder = _OrdData.ManufacturingOrder  -- association [0..1]
LEFT OUTER JOIN I_StatusCodeText AS _StatusText ON _StatusText.StatusCode = orderstatus AND _StatusText.StatusProfile = '' AND _StatusText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ManufacturingOrder AS _LeadingMfgOrder ON LeadingOrder = _LeadingMfgOrder.ManufacturingOrder  -- association [0..1]
LEFT OUTER JOIN I_WBSElement AS _WBSElement2 ON WBSElementInternalID = _WBSElement2.WBSElementInternalID  -- association [0..1]
;