I_ProductionOrder

DDL: I_PRODUCTIONORDER Type: view_entity BASIC

Production Order Header

I_ProductionOrder (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Production Order · Manufacturing

I_ProductionOrder is a Basic CDS View (Dimension) that provides data about "Production Order Header" in SAP S/4HANA. It reads from 1 data source (I_LogisticsOrder) and exposes 173 fields with key field ProductionOrder. It has 40 associations to related views.

SAP Help Documentation

CategoryCDS Views for Discrete Manufacturing
Data CategoryDimension
Purpose
This CDS view retrieves production order header data (tables AUFK and AFKO ). This CDS view provides the data to answer the following business questions: Which production orders exist? How many production orders exist for a specific production order type? Who are the responsible MRP controllers and production supervisors for the selected production orders? What is the associated bill of operations (routing) for a production order? What are the planned and confirmed scrap quantities of a production order? Which production orders were created with reference to a sales order or a WBS element? 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: AUTYP (Order Category) AUFART_WERKS (Order Type/Plant) You can use the Display Restriction Types app to find out in which business catalogs these restriction types are included.

Structure
Important Fields Important fields in this view include the following: Field Name Description ProductionOrder Production Order ProductionOrderType Production Order Type CreationDate Order Creation Date CreationTime Order Creation Time CreatedByUser Entered by LastChangeDate Changed on LastChangeTime Changed At LastChangedByUser Last Changed By ProductionPlant Production Plant MRPController MRP Controller ProductionSupervisor Production Supervisor ProductionSchedulingProfile Production Scheduling Profile BillOfOperationsType BOO Type BillOfOperationsGroup BOO Group BillOfOperationsVariant BOO Variant BOOInternalVersionCounter Counter BillOfMaterialInternalID Bill Of Material InspectionLot Inspection Lot SalesOrder Sales Order SalesOrderItem Sales Order Item CapacityRequirement Capacity Requirement BusinessArea Business Area CostCenter Cost Center ControllingArea Controlling Area ActualCostsCostingVariant Act. Costing Variant PlannedCostsCostingVariant Plnd Costing Variant BasicSchedulingType Basic Scheduling Type ForecastSchedulingType Forecast Scheduling Type OrderPlannedStartDate Planned Start Date OrderPlannedStartTime Planned Start Time OrderPlannedEndDate Planned End Date OrderPlannedEndTime Planned End Time OrderPlannedReleaseDate Planned Release Date OrderScheduledStartDate Scheduled Start Date OrderScheduledStartTime Scheduled Start Time OrderActualStartDate Actual Start Date OrderActualStartTime Actual Start Time ProductionUnit Production Unit of Measure OrderPlannedTotalQty Total Quantity OrderPlannedScrapQty Scrap Quantity OrderConfirmedYieldQty Confirmed Yield OrderConfirmedScrapQty Confirmed Scrap

Data Extraction
Data Extraction Type This CDS view is enabled for data extraction in full mode as well as in delta mode. Deltas are determined automatically by change data capture.

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessManufacturing
Application ComponentPP-VDM
CapabilitiesAnalytical Dimension, Association Target for Defining CDS Entities, Data Source for Defining CDS Entities, Data Source for Data Extraction, Data Source in SQL Select, Data Source for Search
PackageManufacturing for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view retrieves production order header data (tables AUFK and AFKO). </p> <p>This CDS view provides the data to answer the following business questions:</p> <ul> <li><p>Which production orders exist?</p></li> <li><p>How many production orders exist for a specific production order type?</p></li> <li><p>Who are the responsible MRP controllers and production supervisors for the selected production orders?</p></li> <li><p>What is the associated bill of operations (routing) for a production order?</p></li> <li><p>What are the planned and confirmed scrap quantities of a production order?</p></li> <li><p>Which production orders were created with reference to a sales order or a WBS element?</p></li> </ul> <p>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.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_LogisticsOrder head from

Associations (40)

CardinalityTargetAliasCondition
[1..1] I_ProductionOrderType _ProductionOrderType $projection.ProductionOrderType = _ProductionOrderType.ProductionOrderType
[1..1] I_ProductionOrderInternalID _ProductionOrderInternal $projection.ProductionOrderInternalID = _ProductionOrderInternal.ProductionOrderInternalID
[0..1] I_Language _LongTextLanguage $projection.LongTextLanguage = _LongTextLanguage.Language
[1..1] I_UnitOfMeasure _ProductionUnit $projection.ProductionUnit = _ProductionUnit.UnitOfMeasure
[1..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[1..1] I_Plant _ProductionPlant $projection.ProductionPlant = _ProductionPlant.Plant
[0..1] I_ChangeMaster _ChangeNumber $projection.ChangeNumber = _ChangeNumber.ChangeNumber
[0..1] I_ChangeMstrObjTypeRevisionLvl _MaterialRevisionLevel $projection.MaterialRevisionLevel = _MaterialRevisionLevel.RevisionLevel and _MaterialRevisionLevel.ChangeNumberObjectType = '41'
[1..1] I_StatusObject _StatusObject $projection.ObjectInternalID = _StatusObject.StatusObject
[0..1] I_GLAccount _GLAccount $projection.GLAccount = _GLAccount.GLAccount and $projection.CompanyCode = _GLAccount.CompanyCode
[0..1] I_CostElement _CostElement $projection.ControllingArea = _CostElement.ControllingArea and $projection.CostElement = _CostElement.CostElement
[0..1] I_CostingVariant _ActualCostsCostingVariant $projection.ActualCostsCostingVariant = _ActualCostsCostingVariant.CostingVariant
[0..1] I_CostingVariant _PlannedCostsCostingVariant $projection.PlannedCostsCostingVariant = _PlannedCostsCostingVariant.CostingVariant
[0..1] I_MRPController _MRPController $projection.ProductionPlant = _MRPController.Plant and $projection.MRPController = _MRPController.MRPController
[0..1] I_ProductionSupervisor _ProductionSupervisor $projection.ProductionPlant = _ProductionSupervisor.Plant and $projection.ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor
[0..1] I_ProductionSchedulingProfile _ProductionSchedulingProfile $projection.ProductionPlant = _ProductionSchedulingProfile.Plant and $projection.ProductionSchedulingProfile = _ProductionSchedulingProfile.ProductionSchedulingProfile
[0..1] I_ResponsiblePlannerGroup _ResponsiblePlannerGroup $projection.ProductionPlant = _ResponsiblePlannerGroup.Plant and $projection.ResponsiblePlannerGroup = _ResponsiblePlannerGroup.ResponsiblePlannerGroup --
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
[0..1] I_Product _BillOfOperationsMaterial $projection.BillOfOperationsMaterial = _BillOfOperationsMaterial.Product
[0..1] I_BillOfOperationsGroup _BillOfOperationsGroup $projection.BillOfOperationsType = _BillOfOperationsGroup.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsGroup.BillOfOperationsGroup
[0..1] I_MfgBillOfOperations _BillOfOperations $projection.BillOfOperationsType = _BillOfOperations.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperations.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _BillOfOperations.BillOfOperationsVariant
[0..1] I_MfgBillOfOperationsChgSt _BillOfOperationsChangeState $projection.BillOfOperationsType = _BillOfOperationsChangeState.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsChangeState.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _BillOfOperationsChangeState.BillOfOperationsVariant and $projection.BOOInternalVersionCounter = _BillOfOperationsChangeState.BOOInternalVersionCounter -- to extension
[1..1] E_LogisticsOrder _Extension $projection.ProductionOrder = _Extension.OrderID -- SOT relations to children
[1..1] I_Plant _ProductionPlantText $projection.ProductionPlant = _ProductionPlantText.Plant
[0..1] I_ProductionOrder _ReferenceOrderText $projection.ReferenceOrder = _ReferenceOrderText.ProductionOrder
[0..1] I_ProductionOrder _LeadingOrderText $projection.LeadingOrder = _LeadingOrderText.ProductionOrder
[0..1] I_ProductionOrder _SuperiorOrderText $projection.SuperiorOrder = _SuperiorOrderText.ProductionOrder
[0..1] I_InspectionLot _InspectionLotText $projection.InspectionLot = _InspectionLotText.InspectionLot
[0..*] I_ProductText _BillOfOperationsMaterialText $projection.BillOfOperationsMaterial = _BillOfOperationsMaterialText.Product
[1..1] I_StatusObject _StatusObjectText $projection.ObjectInternalID = _StatusObjectText.StatusObject
[0..*] I_BusinessAreaText _BusinessAreaText $projection.BusinessArea = _BusinessAreaText.BusinessArea
[0..1] I_CompanyCode _CompanyCodeText $projection.CompanyCode = _CompanyCodeText.CompanyCode
[0..1] I_ControllingArea _ControllingAreaText $projection.ControllingArea = _ControllingAreaText.ControllingArea
[0..*] I_FunctionalAreaText _FunctionalAreaText $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
[0..1] I_ProductCostCtrlgOrder _ProductCostCollectorText $projection.ProductCostCollector = _ProductCostCollectorText.OrderID -- end new associations for full coverage of text relations
[1..*] I_ProductionOrderItem _ProductionOrderItem
[1..*] I_ProductionOrderSequence _ProductionOrderSequence
[0..*] I_ProductionOrderDocumentLink _ProductionOrderDocumentLink
[0..*] I_ProductionOrderLongText _ProductionOrderLongText

Annotations (20)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #DIMENSION view
Analytics.dataExtraction.enabled true view
Analytics.internalName #LOCAL view
Analytics.technicalName IPRODNORDER view
Consumption.ranked true view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.compositionRoot true view
ObjectModel.modelingPattern #ANALYTICAL_DIMENSION view
ObjectModel.representativeKey ProductionOrder view
ObjectModel.sapObjectNodeType.name ProductionOrder view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Search.searchable true view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.viewType #BASIC view
EndUserText.label Production Order Header view

Fields (173)

KeyFieldSource TableSource FieldDescription
KEY ProductionOrder Production Order
ProductionOrderText Short Text of a Production Order
ProductionOrderHasLongText I_LogisticsOrder OrderHasLongText Order Has Long Text
LongTextLanguage I_LogisticsOrder LongTextLanguage Long Text Language
OrderCategory OrderCategory Order Category
ProductionOrderType Production Order Type
OrderImportance Order Importance Code
IsMarkedForDeletion I_LogisticsOrder IsMarkedForDeletion Purch.org. data
OrderHasMultipleItems I_LogisticsOrder MfgOrderHasMultipleItems Order Has Multiple Items
OrderIsPartOfCollectiveOrder I_LogisticsOrder MfgOrderIsPartOfCollvOrder Order is Part of Collective Order
OrderHierarchyLevelValue I_LogisticsOrder OrderHierarchyLevelValue Level (in multi-level BOM explosions)
OrderHierarchyPathValue I_LogisticsOrder OrderHierarchyPathValue Path (for multi-level BOM explosions)
OrderIsNotCostedAutomatically I_LogisticsOrder OrderIsNotCostedAutomatically Indicator: Do Not Cost Automatically
OrdIsNotSchedldAutomatically I_LogisticsOrder OrdIsNotSchedldAutomatically Indicator: Do Not Schedule Automatically
ProdnProcgIsFlexible I_LogisticsOrder ProdnProcgIsFlexible Flexible Processing
MfgOrderIsProductReworkOrder I_LogisticsOrder MfgOrderIsProductReworkOrder Order Is for Product Rework
CreationDate Order Creation Date
CreationTime Order Creation Time
CreatedByUser I_LogisticsOrder CreatedByUser Entered By
LastChangeDate I_LogisticsOrder LastChangeDate Change Date for Order Master
LastChangeTime I_LogisticsOrder LastChangeTime Time changed
LastChangedByUser I_LogisticsOrder LastChangedByUser Last Changed By
ProductionOrderInternalID Order Internal ID
ReferenceOrder I_LogisticsOrder ReferenceOrder Reference Order Number
LeadingOrder I_LogisticsOrder LeadingOrder Leading Order in Current Processing
MfgOrderSuperiorMfgOrderasSuperiorOrder
Currency I_LogisticsOrder Currency Valuation Crcy
ProductionPlant Production Plant
MRPController MRP Controller
ProductionSupervisor Production Supervisor
ProductionSchedulingProfile Production Scheduling Profile
ResponsiblePlannerGroup I_LogisticsOrder ResponsiblePlannerGroup Responsible Planner Group or Department
SalesOrder I_LogisticsOrder SalesOrder Sales Order Number
SalesOrderItem I_LogisticsOrder SalesOrderItem Item Number in Sales Order
Reservation I_LogisticsOrder Reservation Number of reservation/dependent requirements
SettlementReservation Settlement Reservation
OrderConfirmationGroup I_LogisticsOrder MfgOrderConfirmation Completion confirmation number for the operation
NumberOfOrderConfirmations Number Of Confirmations
CapacityRequirement I_LogisticsOrder CapacityRequirement ID of the Capacity Requirements Record
InspectionLot I_LogisticsOrder InspectionLot Inspection Lot Number
ChangeNumber I_LogisticsOrder ChangeNumber Change Number
MaterialRevisionLevel I_LogisticsOrder MaterialRevisionLevel_2 Revision Level
BasicSchedulingType Basic Scheduling Type
SchedulingIsAllowingForBreaks I_LogisticsOrder SchedulingIsAllowingForBreaks Indicator: Scheduling allowing for breaks
ObjectInternalID Object Internal ID
ConditionApplication I_LogisticsOrder ConditionApplication Application
CapacityActiveVersion I_LogisticsOrder CapacityActiveVersion Version of Available Capacity
CapacityRqmtHasNotToBeCreated I_LogisticsOrder CapacityRqmtHasNotToBeCreated Indicator: Do not Create Capacity Requirements
OrderSequenceNumber I_LogisticsOrder OrderSequenceNumber Sequence Number Order
BillOfOperationsMaterial I_LogisticsOrder Material Bill of Operations Material
BillOfOperationsType I_LogisticsOrder BillOfOperationsType Bill of Operations Type
BillOfOperationsGroup I_LogisticsOrder BillOfOperationsGroup Bill of Operations Group
BillOfOperationsVariant I_LogisticsOrder BillOfOperationsVariant Bill of Operations Variant
BOOInternalVersionCounter Internal counter
BillOfOperationsApplication I_LogisticsOrder BillOfOperationsApplication Bill of Operations Application
BillOfOperationsUsage I_LogisticsOrder BillOfOperationsUsage Bill of Operations Usage
BillOfOperationsVersion I_LogisticsOrder BillOfOperationsVersion Routing Version
BOOExplosionDate I_LogisticsOrder BOOExplosionDate Date for Routing Explosion
BOOValidityStartDate I_LogisticsOrder BOOValidityStartDate Valid-From Date
BillOfMaterialCategory I_LogisticsOrder BillOfMaterialCategory Bill of Material Category Code
BillOfMaterialInternalID I_LogisticsOrder BillOfMaterialInternalID Bill Of Material
BillOfMaterialVariant I_LogisticsOrder BillOfMaterialVariant Alternative BOM
BillOfMaterialVariantUsage I_LogisticsOrder BillOfMaterialVariantUsage BOM Usage
BillOfMaterialVersion
BOMExplosionDate I_LogisticsOrder BOMExplosionDate Date of BOM Explosion/Routing Transfer
BOMValidityStartDate I_LogisticsOrder BOMValidityStartDate Valid-From Date
BusinessArea I_LogisticsOrder BusinessArea Business Area
CompanyCode I_LogisticsOrder CompanyCode Receiver Company Code
ControllingArea I_LogisticsOrder ControllingArea Controlling Area
ProfitCenter I_LogisticsOrder ProfitCenter Profit Center
CostCenter I_LogisticsOrder CostCenter Cost Center for Basic Settlement
ResponsibleCostCenter I_LogisticsOrder ResponsibleCostCenter Responsible Cost Center
CostElement I_LogisticsOrder CostElement Settlement Cost Element
CostingSheet I_LogisticsOrder CostingSheet Costing Sheet
GLAccount I_LogisticsOrder GLAccount G/L Account for Basic Settlement
ProductCostCollector Cost Collector for Production Process
ActualCostsCostingVariant I_LogisticsOrder ActualCostsCostingVariant Costing Variant For Actual Costs
PlannedCostsCostingVariant I_LogisticsOrder PlannedCostsCostingVariant Costing Variant for Planned Costs
ControllingObjectClass Controlling Object Class
FunctionalArea I_LogisticsOrder FunctionalArea Sendr Fctl Area
OverheadCode I_LogisticsOrder OverheadCode Overhead Key
ResultAnalysisInternalID I_LogisticsOrder ResultAnalysisInternalID Results Analysis Key
VarianceKey I_LogisticsOrder VarianceKey Variance Key
EventBasedPostingMethod I_LogisticsOrder EventBasedPostingMethod Event-Based Posting
EventBasedProcessingKey I_LogisticsOrder EventBasedProcessingKey Event-Based Processing Key
SchedulingFloatProfile I_LogisticsOrder SchedulingFloatProfile Scheduling Profile for Floats
FloatBeforeProductionInWrkDays I_LogisticsOrder FloatBeforeProductionInWrkDays Float Before Production in Workdays
FloatAfterProductionInWorkDays I_LogisticsOrder FloatAfterProductionInWorkDays Float After Production in Workdays
ReleasePeriodInWorkDays I_LogisticsOrder ReleasePeriodInWorkDays Release period (in days)
ChangeToScheduledDatesIsMade I_LogisticsOrder ChangeToScheduledDatesIsMade Indicator: Change to Scheduled Dates
OrderPlannedStartTime Manufacturing Order Planned Start Time
OrderPlannedEndDate Manufacturing Order Planned End Date
OrderPlannedEndTime Manufacturing Order Planned End Time
OrderPlannedReleaseDate Manufacturing Order Planned Release Date
OrderScheduledStartTime Manufacturing Order Scheduled Start Time
OrderScheduledEndDate Manufacturing Order Scheduled End Date
OrderScheduledEndTime Manufacturing Order Scheduled End Time
OrderScheduledReleaseDate Manufacturing Order Scheduled Release Date
OrderActualStartTime Manufacturing Order Actual Start Time
OrderConfirmedEndDate Manufacturing Order Confirmed End Date
OrderConfirmedEndTime Manufacturing Order Confirmed End Time
OrderActualEndDate Manufacturing Order Actual End Date
OrderActualReleaseDate Manufacturing Order Actual Release Date
ProductionUnit Production Unit of Measure
OrderPlannedTotalQty Manufacturing Order Planned Total Quantity
OrderPlannedScrapQty Manufacturing Order Planned Scrap Quantity
OrderConfirmedYieldQty Confirmed Yield Quantity From Order Confirmation
OrderConfirmedScrapQty Confirmed Scrap Quantity From Order Confirmation
OrderConfirmedReworkQty I_LogisticsOrder MfgOrderConfirmedReworkQty Total Confirmed Rework Quantity
_ProductionOrderType _ProductionOrderType
_ProductionOrderInternal _ProductionOrderInternal
_OrderTypeDetails I_LogisticsOrder _OrderTypeDetails
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_LongTextLanguage _LongTextLanguage
_ProductionUnit _ProductionUnit
_Currency I_LogisticsOrder _Currency
_ReferenceOrder _ReferenceOrder
_LeadingOrder _LeadingOrder
_BillOfOperationsType I_LogisticsOrder _BillOfOperationsType
_BillOfOperationsGroup _BillOfOperationsGroup
_BillOfOperations _BillOfOperations
_BillOfOperationsChangeState _BillOfOperationsChangeState
_BillOfOperationsMaterial _BillOfOperationsMaterial
_BillOfOperationsApplication I_LogisticsOrder _BillOfOperationsApplication
_BillOfOperationsUsage I_LogisticsOrder _BillOfOperationsUsage
_ConfirmationGroup I_LogisticsOrder _ConfirmationGroup
_Reservation I_LogisticsOrder _Reservation
_SettlementReservation I_LogisticsOrder _SettlementReservation
_ProductionPlant _ProductionPlant
_MRPController _MRPController
_ProductionSupervisor _ProductionSupervisor
_ProductionSchedulingProfile _ProductionSchedulingProfile
_ResponsiblePlannerGroup _ResponsiblePlannerGroup
_SalesOrder I_LogisticsOrder _SalesOrder
_SalesOrderItem I_LogisticsOrder _SalesOrderItem
_WBSElementBasicData
_CapacityRequirement I_LogisticsOrder _CapacityRequirement
_ChangeNumber _ChangeNumber
_StatusObject _StatusObject
_MaterialRevisionLevel _MaterialRevisionLevel
_InspectionLot I_LogisticsOrder _InspectionLot
_BasicSchedulingType I_LogisticsOrder _BasicSchedulingType
_SchedulingFloatProfile I_LogisticsOrder _SchedulingFloatProfile
_BusinessArea I_LogisticsOrder _BusinessArea
_ProfitCenter I_LogisticsOrder _ProfitCenter
_CostCenter I_LogisticsOrder _CostCenter
_ResponsibleCostCenter I_LogisticsOrder _ResponsibleCostCenter
_CompanyCode I_LogisticsOrder _CompanyCode
_ControllingArea I_LogisticsOrder _ControllingArea
_ControllingObjectClass I_LogisticsOrder _ControllingObjectClass
_CostElement _CostElement
_ActualCostsCostingVariant _ActualCostsCostingVariant
_PlannedCostsCostingVariant _PlannedCostsCostingVariant
_FunctionalArea I_LogisticsOrder _FunctionalArea
_GLAccount _GLAccount
_ProductCostCollector I_LogisticsOrder _ProductCostCollector
SOTrelations_ProductionOrderItem
_ProductionOrderSequence _ProductionOrderSequence
_ProductionOrderDocumentLink _ProductionOrderDocumentLink
_ProductionOrderLongText _ProductionOrderLongText
Newtextrelations_ProductionPlantText
_ReferenceOrderText _ReferenceOrderText
_LeadingOrderText _LeadingOrderText
_SuperiorOrderText _SuperiorOrderText
_InspectionLotText _InspectionLotText
_BillOfOperationsMaterialText _BillOfOperationsMaterialText
_StatusObjectText _StatusObjectText
_BusinessAreaText _BusinessAreaText
_CompanyCodeText _CompanyCodeText
_ControllingAreaText _ControllingAreaText
_FunctionalAreaText _FunctionalAreaText
_ProductCostCollectorText _ProductCostCollectorText

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_ProductionOrder.
-- 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 I_ProductionOrder AS
SELECT
  cast(head.OrderID as vdm_manufacturingorder preserving type) AS ProductionOrder,
  cast(head.OrderDescription as vdm_prodnordertext preserving type) AS ProductionOrderText,
  head.OrderHasLongText AS ProductionOrderHasLongText,
  head.LongTextLanguage AS LongTextLanguage,
  OrderCategory,
  cast(head.OrderType as vdm_prodnordertype preserving type) AS ProductionOrderType,
  cast(head.PriorityCode as orderimportancecode preserving type) AS OrderImportance,
  head.IsMarkedForDeletion AS IsMarkedForDeletion,
  head.MfgOrderHasMultipleItems AS OrderHasMultipleItems,
  head.MfgOrderIsPartOfCollvOrder AS OrderIsPartOfCollectiveOrder,
  head.OrderHierarchyLevelValue AS OrderHierarchyLevelValue,
  head.OrderHierarchyPathValue AS OrderHierarchyPathValue,
  head.OrderIsNotCostedAutomatically AS OrderIsNotCostedAutomatically,
  head.OrdIsNotSchedldAutomatically AS OrdIsNotSchedldAutomatically,
  head.ProdnProcgIsFlexible AS ProdnProcgIsFlexible,
  head.MfgOrderIsProductReworkOrder AS MfgOrderIsProductReworkOrder,
  cast(head.CreationDate as ordercreationdate preserving type) AS CreationDate,
  cast(head.CreationTime as ordercreationtime preserving type) AS CreationTime,
  head.CreatedByUser AS CreatedByUser,
  head.LastChangeDate AS LastChangeDate,
  head.LastChangeTime AS LastChangeTime,
  head.LastChangedByUser AS LastChangedByUser,
  cast(head.OrderInternalBillOfOperations as pph_aufpl preserving type) AS ProductionOrderInternalID,
  head.ReferenceOrder AS ReferenceOrder,
  head.LeadingOrder AS LeadingOrder,
  head.Currency AS Currency,
  cast(head.Plant as pwwrk preserving type) AS ProductionPlant,
  cast(head.MRPController as pph_dispo preserving type) AS MRPController,
  cast(head.ProductionSupervisor as pph_fevor preserving type) AS ProductionSupervisor,
  cast(head.ProductionSchedulingProfile as pph_prodprf preserving type) AS ProductionSchedulingProfile,
  head.ResponsiblePlannerGroup AS ResponsiblePlannerGroup,
  head.SalesOrder AS SalesOrder,
  head.SalesOrderItem AS SalesOrderItem,
  head.Reservation AS Reservation,
  cast(head.SettlementReservation as settlmntres preserving type) AS SettlementReservation,
  head.MfgOrderConfirmation AS OrderConfirmationGroup,
  cast(head.MfgOrderConfirmationCount as pph_noofconf preserving type) AS NumberOfOrderConfirmations,
  head.CapacityRequirement AS CapacityRequirement,
  head.InspectionLot AS InspectionLot,
  head.ChangeNumber AS ChangeNumber,
  head.MaterialRevisionLevel_2 AS MaterialRevisionLevel,
  cast(head.BasicSchedulingType as basicschedtype preserving type) AS BasicSchedulingType,
  head.SchedulingIsAllowingForBreaks AS SchedulingIsAllowingForBreaks,
  cast(head.ObjectInternalID as pph_objnr preserving type) AS ObjectInternalID,
  head.ConditionApplication AS ConditionApplication,
  head.CapacityActiveVersion AS CapacityActiveVersion,
  head.CapacityRqmtHasNotToBeCreated AS CapacityRqmtHasNotToBeCreated,
  head.OrderSequenceNumber AS OrderSequenceNumber,
  head.Material AS BillOfOperationsMaterial,
  head.BillOfOperationsType AS BillOfOperationsType,
  head.BillOfOperationsGroup AS BillOfOperationsGroup,
  head.BillOfOperationsVariant AS BillOfOperationsVariant,
  head.BillOfOperationsApplication AS BillOfOperationsApplication,
  head.BillOfOperationsUsage AS BillOfOperationsUsage,
  head.BillOfOperationsVersion AS BillOfOperationsVersion,
  head.BOOExplosionDate AS BOOExplosionDate,
  head.BOOValidityStartDate AS BOOValidityStartDate,
  head.BillOfMaterialCategory AS BillOfMaterialCategory,
  head.BillOfMaterialInternalID AS BillOfMaterialInternalID,
  head.BillOfMaterialVariant AS BillOfMaterialVariant,
  head.BillOfMaterialVariantUsage AS BillOfMaterialVariantUsage,
  head.BOMExplosionDate AS BOMExplosionDate,
  head.BOMValidityStartDate AS BOMValidityStartDate,
  head.BusinessArea AS BusinessArea,
  head.CompanyCode AS CompanyCode,
  head.ControllingArea AS ControllingArea,
  head.ProfitCenter AS ProfitCenter,
  head.CostCenter AS CostCenter,
  head.ResponsibleCostCenter AS ResponsibleCostCenter,
  head.CostElement AS CostElement,
  head.CostingSheet AS CostingSheet,
  head.GLAccount AS GLAccount,
  head.ActualCostsCostingVariant AS ActualCostsCostingVariant,
  head.PlannedCostsCostingVariant AS PlannedCostsCostingVariant,
  cast(head.ControllingObjectClass as pph_scope preserving type) AS ControllingObjectClass,
  head.FunctionalArea AS FunctionalArea,
  head.OverheadCode AS OverheadCode,
  head.ResultAnalysisInternalID AS ResultAnalysisInternalID,
  head.VarianceKey AS VarianceKey,
  head.EventBasedPostingMethod AS EventBasedPostingMethod,
  head.EventBasedProcessingKey AS EventBasedProcessingKey,
  head.SchedulingFloatProfile AS SchedulingFloatProfile,
  head.FloatBeforeProductionInWrkDays AS FloatBeforeProductionInWrkDays,
  head.FloatAfterProductionInWorkDays AS FloatAfterProductionInWorkDays,
  head.ReleasePeriodInWorkDays AS ReleasePeriodInWorkDays,
  head.ChangeToScheduledDatesIsMade AS ChangeToScheduledDatesIsMade,
  cast(head.PlannedStartTime as mfgorderplannedstarttime preserving type) AS OrderPlannedStartTime,
  cast(head.PlannedEndDate as mfgorderplannedenddate preserving type) AS OrderPlannedEndDate,
  cast(head.PlannedEndTime as mfgorderplannedendtime preserving type) AS OrderPlannedEndTime,
  cast(head.PlannedReleaseDate as mfgorderplannedreleasedate preserving type) AS OrderPlannedReleaseDate,
  cast(head.ScheduledBasicStartTime as mfgorderscheduledstarttime preserving type) AS OrderScheduledStartTime,
  cast(head.ScheduledBasicEndDate as mfgorderscheduledenddate preserving type) AS OrderScheduledEndDate,
  cast(head.ScheduledBasicEndTime as mfgorderscheduledendtime preserving type) AS OrderScheduledEndTime,
  cast(head.ScheduledReleaseDate as mfgorderscheduledreleasedate preserving type) AS OrderScheduledReleaseDate,
  cast(head.ActualStartTime as mfgorderactualstarttime preserving type) AS OrderActualStartTime,
  cast(head.ConfirmedEndDate as mfgorderconfirmedenddate preserving type) AS OrderConfirmedEndDate,
  cast(head.ConfirmedEndTime as mfgorderconfirmedendtime preserving type) AS OrderConfirmedEndTime,
  cast(head.ActualEndDate as mfgorderactualenddate preserving type) AS OrderActualEndDate,
  cast(head.ActualReleasedDate as mfgorderactualreleasedate preserving type) AS OrderActualReleaseDate,
  cast(head.BaseUnit as productionunit preserving type) AS ProductionUnit,
  cast(head.OrderPlannedTotalQty as mfgorderplannedtotalqty preserving type) AS OrderPlannedTotalQty,
  cast(head.OrderPlannedScrapQty as mfgorderplannedscrapqty preserving type) AS OrderPlannedScrapQty,
  cast(head.OrderConfirmedYieldQty as co_igmng preserving type) AS OrderConfirmedYieldQty,
  cast(head.OrderConfirmedScrapQty as co_iasmg preserving type) AS OrderConfirmedScrapQty,
  head.MfgOrderConfirmedReworkQty AS OrderConfirmedReworkQty,
  head._OrderTypeDetails AS _OrderTypeDetails,
  head._Currency AS _Currency,
  head._BillOfOperationsType AS _BillOfOperationsType,
  head._BillOfOperationsApplication AS _BillOfOperationsApplication,
  head._BillOfOperationsUsage AS _BillOfOperationsUsage,
  head._ConfirmationGroup AS _ConfirmationGroup,
  head._Reservation AS _Reservation,
  head._SettlementReservation AS _SettlementReservation,
  head._SalesOrder AS _SalesOrder,
  head._SalesOrderItem AS _SalesOrderItem,
  head._CapacityRequirement AS _CapacityRequirement,
  head._InspectionLot AS _InspectionLot,
  head._BasicSchedulingType AS _BasicSchedulingType,
  head._SchedulingFloatProfile AS _SchedulingFloatProfile,
  head._BusinessArea AS _BusinessArea,
  head._ProfitCenter AS _ProfitCenter,
  head._CostCenter AS _CostCenter,
  head._ResponsibleCostCenter AS _ResponsibleCostCenter,
  head._CompanyCode AS _CompanyCode,
  head._ControllingArea AS _ControllingArea,
  head._ControllingObjectClass AS _ControllingObjectClass,
  head._FunctionalArea AS _FunctionalArea,
  head._ProductCostCollector AS _ProductCostCollector
FROM I_LogisticsOrder AS head
LEFT OUTER JOIN I_ProductionOrderType AS _ProductionOrderType ON ProductionOrderType = _ProductionOrderType.ProductionOrderType  -- association [1..1]
LEFT OUTER JOIN I_ProductionOrderInternalID AS _ProductionOrderInternal ON ProductionOrderInternalID = _ProductionOrderInternal.ProductionOrderInternalID  -- association [1..1]
LEFT OUTER JOIN I_Language AS _LongTextLanguage ON LongTextLanguage = _LongTextLanguage.Language  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _ProductionUnit ON ProductionUnit = _ProductionUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [1..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _ProductionPlant ON ProductionPlant = _ProductionPlant.Plant  -- association [1..1]
LEFT OUTER JOIN I_ChangeMaster AS _ChangeNumber ON ChangeNumber = _ChangeNumber.ChangeNumber  -- association [0..1]
LEFT OUTER JOIN I_ChangeMstrObjTypeRevisionLvl AS _MaterialRevisionLevel ON MaterialRevisionLevel = _MaterialRevisionLevel.RevisionLevel AND _MaterialRevisionLevel.ChangeNumberObjectType = '41'  -- association [0..1]
LEFT OUTER JOIN I_StatusObject AS _StatusObject ON ObjectInternalID = _StatusObject.StatusObject  -- association [1..1]
LEFT OUTER JOIN I_GLAccount AS _GLAccount ON GLAccount = _GLAccount.GLAccount AND CompanyCode = _GLAccount.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CostElement AS _CostElement ON ControllingArea = _CostElement.ControllingArea AND CostElement = _CostElement.CostElement  -- association [0..1]
LEFT OUTER JOIN I_CostingVariant AS _ActualCostsCostingVariant ON ActualCostsCostingVariant = _ActualCostsCostingVariant.CostingVariant  -- association [0..1]
LEFT OUTER JOIN I_CostingVariant AS _PlannedCostsCostingVariant ON PlannedCostsCostingVariant = _PlannedCostsCostingVariant.CostingVariant  -- association [0..1]
LEFT OUTER JOIN I_MRPController AS _MRPController ON ProductionPlant = _MRPController.Plant AND MRPController = _MRPController.MRPController  -- association [0..1]
LEFT OUTER JOIN I_ProductionSupervisor AS _ProductionSupervisor ON ProductionPlant = _ProductionSupervisor.Plant AND ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor  -- association [0..1]
LEFT OUTER JOIN I_ProductionSchedulingProfile AS _ProductionSchedulingProfile ON ProductionPlant = _ProductionSchedulingProfile.Plant AND ProductionSchedulingProfile = _ProductionSchedulingProfile.ProductionSchedulingProfile  -- association [0..1]
LEFT OUTER JOIN I_ResponsiblePlannerGroup AS _ResponsiblePlannerGroup ON ProductionPlant = _ResponsiblePlannerGroup.Plant AND ResponsiblePlannerGroup = _ResponsiblePlannerGroup.ResponsiblePlannerGroup  -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementBasicData ON WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_Product AS _BillOfOperationsMaterial ON BillOfOperationsMaterial = _BillOfOperationsMaterial.Product  -- association [0..1]
LEFT OUTER JOIN I_BillOfOperationsGroup AS _BillOfOperationsGroup ON BillOfOperationsType = _BillOfOperationsGroup.BillOfOperationsType AND BillOfOperationsGroup = _BillOfOperationsGroup.BillOfOperationsGroup  -- association [0..1]
LEFT OUTER JOIN I_MfgBillOfOperations AS _BillOfOperations ON BillOfOperationsType = _BillOfOperations.BillOfOperationsType AND BillOfOperationsGroup = _BillOfOperations.BillOfOperationsGroup AND BillOfOperationsVariant = _BillOfOperations.BillOfOperationsVariant  -- association [0..1]
LEFT OUTER JOIN I_MfgBillOfOperationsChgSt AS _BillOfOperationsChangeState ON BillOfOperationsType = _BillOfOperationsChangeState.BillOfOperationsType AND BillOfOperationsGroup = _BillOfOperationsChangeState.BillOfOperationsGroup AND BillOfOperationsVariant = _BillOfOperationsChangeState.BillOfOperationsVariant AND BOOInternalVersionCounter = _BillOfOperationsChangeState.BOOInternalVersionCounter  -- association [0..1]
LEFT OUTER JOIN E_LogisticsOrder AS _Extension ON ProductionOrder = _Extension.OrderID  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _ProductionPlantText ON ProductionPlant = _ProductionPlantText.Plant  -- association [1..1]
LEFT OUTER JOIN I_ProductionOrder AS _ReferenceOrderText ON ReferenceOrder = _ReferenceOrderText.ProductionOrder  -- association [0..1]
LEFT OUTER JOIN I_ProductionOrder AS _LeadingOrderText ON LeadingOrder = _LeadingOrderText.ProductionOrder  -- association [0..1]
LEFT OUTER JOIN I_ProductionOrder AS _SuperiorOrderText ON SuperiorOrder = _SuperiorOrderText.ProductionOrder  -- association [0..1]
LEFT OUTER JOIN I_InspectionLot AS _InspectionLotText ON InspectionLot = _InspectionLotText.InspectionLot  -- association [0..1]
LEFT OUTER JOIN I_ProductText AS _BillOfOperationsMaterialText ON BillOfOperationsMaterial = _BillOfOperationsMaterialText.Product  -- association [0..*]
LEFT OUTER JOIN I_StatusObject AS _StatusObjectText ON ObjectInternalID = _StatusObjectText.StatusObject  -- association [1..1]
LEFT OUTER JOIN I_BusinessAreaText AS _BusinessAreaText ON BusinessArea = _BusinessAreaText.BusinessArea  -- association [0..*]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCodeText ON CompanyCode = _CompanyCodeText.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingAreaText ON ControllingArea = _ControllingAreaText.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_FunctionalAreaText AS _FunctionalAreaText ON FunctionalArea = _FunctionalAreaText.FunctionalArea  -- association [0..*]
LEFT OUTER JOIN I_ProductCostCtrlgOrder AS _ProductCostCollectorText ON ProductCostCollector = _ProductCostCollectorText.OrderID  -- association [0..1]
LEFT OUTER JOIN I_ProductionOrderItem AS _ProductionOrderItem ON /* condition not available in parsed metadata */  -- association [1..*]
LEFT OUTER JOIN I_ProductionOrderSequence AS _ProductionOrderSequence ON /* condition not available in parsed metadata */  -- association [1..*]
LEFT OUTER JOIN I_ProductionOrderDocumentLink AS _ProductionOrderDocumentLink ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN I_ProductionOrderLongText AS _ProductionOrderLongText ON /* condition not available in parsed metadata */  -- association [0..*]
;