I_MANUFACTURINGORDER

CDS View

Manufacturing Order

I_MANUFACTURINGORDER is a CDS View in S/4HANA. Manufacturing Order. It contains 214 fields. 28 CDS views read from this table.

CDS Views using this table (28)

ViewTypeJoinVDMDescription
C_DspDocFlwMfgOrderVH view_entity from CONSUMPTION Manufacturing Order VH for DDF
C_MfgOrderSplitOrderDetail view inner CONSUMPTION Details of an order of a manufacturing order split
C_MfgOrdVariantConfiguration view_entity from CONSUMPTION Manufacturing Order Variant Configuration
C_OpActyWorklistOfCurUsrTP view inner CONSUMPTION
C_OperationActivityWorklistTP view inner CONSUMPTION
I_ChgImpactOrdSpcfcRtg view from COMPOSITE Order Specific Routings for POs
I_MfgOrderDataList view from COMPOSITE Mfg Order Header (Data List)
I_MfgOrderDuration view from COMPOSITE Manufacturing Order Duration
I_MfgOrderForOutput view_entity from COMPOSITE Manufacturing Order For Output
I_MfgOrderOutputControl view from COMPOSITE Output Control of Manufacturing Order
I_MfgOrderPickList view from COMPOSITE Mfg Order Header (Pick List)
I_MfgOrderStdVH view from COMPOSITE Manufacturing Order
I_MfgOrderVH view_entity from COMPOSITE Manufacturing Order
I_MfgOrderWithStatus view from COMPOSITE Manufacturing Order Header with Status
I_ProcessOrder view_entity from BASIC Process Order
I_ProcOrdMgmtInspLot view inner COMPOSITE Inspection Lot of Process Order
I_ProcOrdMgmtOpsOvw view from COMPOSITE Process order current and next ops ovw
I_ProductionOrder view_entity from BASIC Production Order
I_ProjectAssignedOrderVH view union COMPOSITE Maintenance and Production Orders
I_RFM_MfgOrderDuration view from COMPOSITE Manufacturing Order Duration
P_BUSSOLNORDSLSORDFLWLVL91 view inner CONSUMPTION Solution Order MTO flow:Production Order
P_JITMatlRcpntDocuments view union_all COMPOSITE
P_PCLblProdCmbndByBusProc view union_all COMPOSITE Union Products by Business Processes
P_ProjectObject view union COMPOSITE
P_RFM_SlsOrdPrgrsMntrMfgOrd view from COMPOSITE
P_SalesOrderInSupplyMfgIssue2 view from COMPOSITE
R_ProcessOrderTP view_entity from TRANSACTIONAL Process Order Header - TP
R_ProductionOrderTP view_entity from TRANSACTIONAL Production Order Header - TP

Fields (214)

KeyField CDS FieldsUsed in Views
KEY ManufacturingOrder ManufacturingOrder,ProjectObjectInternalID,SubsequentDocument 12
KEY ManufacturingOrderCategory ManufacturingOrderCategory,SubsequentDocumentCategory 10
KEY SalesOrderItem SalesDocumentItem,SalesOrderItem,SubsequentDocumentItem 9
_ActualCostsCostingVariant _ActualCostsCostingVariant 1
_BasicSchedulingType _BasicSchedulingType 1
_Batch _Batch 1
_Batch_2 _Batch_2 1
_BillOfOperations _BillOfOperations 1
_BillOfOperations2 _BillOfOperations2 1
_BillOfOperationsApplication _BillOfOperationsApplication 1
_BillOfOperationsChangeState _BillOfOperationsChangeState 1
_BillOfOperationsChangeState2 _BillOfOperationsChangeState2 1
_BillOfOperationsGroup _BillOfOperationsGroup 1
_BillOfOperationsGroup2 _BillOfOperationsGroup2 1
_BillOfOperationsMaterial _BillOfOperationsMaterial 3
_BillOfOperationsType _BillOfOperationsType 3
_BillOfOperationsUsage _BillOfOperationsUsage 1
_BusinessArea _BusinessArea 1
_CapacityRequirement _CapacityRequirement 3
_ChangeNumber _ChangeNumber 3
_CompanyCode _CompanyCode 1
_ConfirmationGroup _ConfirmationGroup 1
_ControllingArea _ControllingArea 1
_ControllingObjectClass _ControllingObjectClass 1
_CostCenter _CostCenter 1
_CostElement _CostElement 1
_CreatedByUser _CreatedByUser 3
_Currency _Currency 3
_ForecastSchedulingType _ForecastSchedulingType 1
_FunctionalArea _FunctionalArea 1
_GLAccount _GLAccount 1
_InspectionLot _InspectionLot 1
_InventoryUsabilityCode _InventoryUsabilityCode 1
_LastChangedByUser _LastChangedByUser 3
_LeadingOrder _LeadingOrder 1
_LongText _LongText 1
_LongTextLanguage _LongTextLanguage 3
_Material _Material 4
_MaterialRevisionLevel2 _MaterialRevisionLevel2 1
_MfgOrderCategory _MfgOrderCategory 2
_MfgOrderDocInfoRecord _MfgOrderDocInfoRecord 1
_MfgOrderImportance _MfgOrderImportance 1
_MfgOrderItem _MfgOrderItem 1
_MfgOrderLongText _MfgOrderLongText 1
_MfgOrderMaterialDocItem _MfgOrderMaterialDocItem 1
_MfgOrderOperation _MfgOrderOperation 1
_MfgOrderSequence _MfgOrderSequence 1
_MfgOrderType _MfgOrderType 2
_MRPArea _MRPArea 1
_MRPController _MRPController 3
_OrderInternalID _OrderInternalID 3
_OrderTypeDetails _OrderTypeDetails 1
_PlannedCostsCostingVariant _PlannedCostsCostingVariant 1
_PlannedOrder _PlannedOrder 1
_PlanningPlant _MRPPlant,_PlanningPlant 4
_Product _Product 3
_ProductCostCollector _ProductCostCollector 1
_ProductionPlant _Plant,_ProductionPlant 5
_ProductionSchedulingProfile _ProductionSchedulingProfile 3
_ProductionSupervisor _ProductionSupervisor 3
_ProductionUnit _ProductionUnit 3
_ProductPlant _ProductPlant 1
_ProductPlant2 _ProductPlant2 1
_ProductStorageLocation _ProductStorageLocation 1
_ProductStorageLocation2 _ProductStorageLocation2 1
_ProfitCenter _ProfitCenter 1
_ReferenceOrder _ReferenceOrder 1
_Reservation _Reservation 3
_ResponsibleCostCenter _ResponsibleCostCenter 1
_ResponsiblePlannerGroup _ResponsiblePlannerGroup 3
_SalesDocument _SalesDocument 1
_SalesDocumentItem _SalesDocumentItem 1
_SalesOrder _SalesOrder 1
_SalesOrderItem _SalesOrderItem 1
_SchedulingFloatProfile _SchedulingFloatProfile 1
_SettlementReservation _SettlementReservation 3
_StorageLocation _StorageLocation 3
_SuperiorOrder _SuperiorOrder 1
_WBSElementBasicData2 _WBSElementBasicData,_WBSElementBasicData2 3
ActualCostsCostingVariant ActualCostsCostingVariant 4
ActualDeliveredQuantity ActualDeliveredQuantity 5
BasicSchedulingType BasicSchedulingType 4
Batch Batch 7
BillOfMaterial BillOfMaterial 2
BillOfMaterialCategory BillOfMaterialCategory 5
BillOfMaterialInternalID BillOfMaterialInternalID 5
BillOfMaterialVariant BillOfMaterialVariant 5
BillOfMaterialVariantUsage BillOfMaterialVariantUsage 5
BillOfMaterialVersion BillOfMaterialVersion 5
BillOfOperations BillOfOperations 2
BillOfOperationsApplication BillOfOperationsApplication 4
BillOfOperationsGroup BillOfOperationsGroup 5
BillOfOperationsMaterial BillOfOperationsMaterial 5
BillOfOperationsType BillOfOperationsType 5
BillOfOperationsUsage BillOfOperationsUsage 5
BillOfOperationsVariant BillOfOperationsVariant 5
BillOfOperationsVersion BillOfOperationsVersion 5
BOMExplosionDate BOMExplosionDate 5
BOMValidityStartDate BOMValidityStartDate 3
BOOExplosionDate BOOExplosionDate 5
BOOInternalVersionCounter BOOInternalVersionCounter 5
BOOValidityStartDate BOOValidityStartDate 3
BusinessArea BusinessArea 5
CapacityActiveVersion CapacityActiveVersion 3
CapacityRequirement CapacityRequirement 5
CapacityRqmtHasNotToBeCreated CapacityRqmtHasNotToBeCreated 2
ChangeNumber ChangeNumber 5
CompanyCode CompanyCode 4
ConditionApplication ConditionApplication 3
ControllingArea ControllingArea 6
ControllingObjectClass ControllingObjectClass 4
CostCenter CostCenter 6
CostElement CostElement 5
CostingSheet CostingSheet 5
CreatedByUser CreatedByUser 5
CreationDate CreationDate,MfgOrderCreationDate 8
CreationTime CreationTime,MfgOrderCreationTime 5
Currency Currency 4
EffectivityParameterVariant EffectivityParameterVariant 4
EventBasedPostingMethod EventBasedPostingMethod 3
ExpectedDeviationQuantity ExpectedDeviationQuantity 5
ExtdQualityCheckIsRequired ExtdQualityCheckIsRequired 3
FloatAfterProductionInWorkDays FloatAfterProductionInWorkDays 2
FloatBeforeProductionInWrkDays FloatBeforeProductionInWrkDays 2
ForecastSchedulingType ForecastSchedulingType 3
FunctionalArea FunctionalArea 5
GLAccount GLAccount 6
GoodsRecipientName GoodsRecipientName 3
InspectionLot InspectionLot 4
InventoryUsabilityCode InventoryUsabilityCode 3
IsCompletelyDelivered IsCompletelyDelivered 2
IsMarkedForDeletion IsMarkedForDeletion,MfgOrderIsToBeDeleted 3
LastChangeDate LastChangeDate 6
LastChangedByUser LastChangedByUser 5
LastChangeTime LastChangeTime 5
LeadingOrder LeadingOrder 5
LongTextLanguageCode LongTextLanguageCode 6
ManufacturingOrderHasLongText ManufacturingOrderHasLongText,OrderHasLongText 5
ManufacturingOrderImportance ManufacturingOrderImportance 6
ManufacturingOrderText ManufacturingOrderText,ProjectObjectDescription 9
ManufacturingOrderType ManufacturingOrderType,OrderType 10
MasterProductionOrder MasterProductionOrder 2
Material Material 9
MaterialGoodsReceiptDuration MaterialGoodsReceiptDuration 3
MaterialRevisionLevel MaterialRevisionLevel 1
MaterialRevisionLevel_2 MaterialRevisionLevel_2 1
MfgOrderActualCompletionDate MfgOrderActualCompletionDate,TechnicalCompletionDate 4
MfgOrderActualEndDate ActualEndDate,MfgOrderActualEndDate 5
MfgOrderActualReleaseDate ActualReleasedDate,MfgOrderActualReleaseDate 5
MfgOrderActualStartDate ActualStartDate,MfgOrderActualStartDate 5
MfgOrderActualStartTime ActualStartTime,MfgOrderActualStartTime 4
MfgOrderConfirmation MfgOrderConfirmation 2
MfgOrderConfirmedEndDate ConfirmedEndDate,MfgOrderConfirmedEndDate 5
MfgOrderConfirmedEndTime ConfirmedEndTime,MfgOrderConfirmedEndTime 4
MfgOrderConfirmedReworkQty MfgOrderConfirmedReworkQty,OrderConfirmedReworkQty 4
MfgOrderConfirmedScrapQty MfgOrderConfirmedScrapQty,OrderConfirmedScrapQty 5
MfgOrderConfirmedYieldQty MfgOrderConfirmedYieldQty,OrderConfirmedYieldQty 5
MfgOrderHasMultipleItems MfgOrderHasMultipleItems 3
MfgOrderHierarchyLevel MfgOrderHierarchyLevel 2
MfgOrderInternalID MfgOrderInternalID,OrderInternalBillOfOperations 5
MfgOrderIsPartOfCollvOrder MfgOrderIsPartOfCollvOrder 3
MfgOrderItemActualDeliveryDate ActualDeliveryDate,MfgOrderItemActualDeliveryDate 4
MfgOrderPlannedEndDate MfgOrderPlannedEndDate,PlannedEndDate 5
MfgOrderPlannedEndTime MfgOrderPlannedEndTime,PlannedEndTime 4
MfgOrderPlannedReleaseDate MfgOrderPlannedReleaseDate,PlannedReleaseDate 5
MfgOrderPlannedScrapQty MfgOrderPlannedScrapQty,OrderPlannedScrapQty 5
MfgOrderPlannedStartDate MfgOrderPlannedStartDate,PlannedStartDate 5
MfgOrderPlannedStartTime MfgOrderPlannedStartTime,PlannedStartTime 4
MfgOrderPlannedTotalQty MfgOrderPlannedTotalQty,OrderPlannedTotalQty 8
MfgOrderScheduledEndDate MfgOrderScheduledEndDate,ScheduledBasicEndDate 7
MfgOrderScheduledEndTime MfgOrderScheduledEndTime,ScheduledBasicEndTime 4
MfgOrderScheduledReleaseDate MfgOrderScheduledReleaseDate,ScheduledReleaseDate 5
MfgOrderScheduledStartDate MfgOrderScheduledStartDate,ScheduledBasicStartDate 7
MfgOrderScheduledStartTime MfgOrderScheduledStartTime,ScheduledBasicStartTime 4
MfgOrderSplitStatus MfgOrderSplitStatus 3
MfgOrderTotalCommitmentDate MfgOrderTotalCommitmentDate 2
MRPArea MRPArea 3
MRPController MRPController 9
NumberOfMfgOrderConfirmations NumberOfMfgOrderConfirmations 2
ObjectInternalID ManufacturingObject,ObjectInternalID 5
OrderIsEventBasedPosting OrderIsEventBasedPosting 1
OrderSequenceNumber OrderSequenceNumber 3
PlannedCostsCostingVariant PlannedCostsCostingVariant 4
PlannedOrder PlannedOrder 5
PlanningPlant MRPPlant,PlanningPlant 9
ProdnProcgIsFlexible ProdnProcgIsFlexible 2
Product Product 5
ProductCollection ProductCollection 1
ProductConfiguration ProductConfiguration 5
ProductCostCollector ProductCostCollector 4
ProductionPlant ProductionPlant 11
ProductionSchedulingProfile ProductionSchedulingProfile 8
ProductionSupervisor ProductionSupervisor 9
ProductionUnit ProductionUnit 8
ProductionVersion ProductionVersion 6
ProductSeason ProductSeason 1
ProductSeasonYear ProductSeasonYear 1
ProductTheme ProductTheme 1
ProfitCenter ProfitCenter 6
QuantityDistributionKey QuantityDistributionKey 3
ReferenceOrder ReferenceOrder 6
ReleasePeriodInWorkDays ReleasePeriodInWorkDays 2
Reservation Reservation 7
ResponsibleCostCenter ResponsibleCostCenter 2
ResponsiblePlannerGroup ResponsiblePlannerGroup 6
SalesOrder SalesDocument,SalesOrder 8
SchedulingFloatProfile SchedulingFloatProfile 2
SettlementReservation SettlementReservation 3
StockSegment StockSegment 3
StorageLocation StorageLocation 5
SuperiorOrder MfgOrderSuperiorMfgOrder,SuperiorOrder 6
UnloadingPointName UnloadingPointName 3
WBSElementInternalID WBSElementInternalID 2
WBSElementInternalID_2 WBSElementInternalID,WBSElementInternalID_2 5
@AbapCatalog.sqlViewName: 'IMFGORDER'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_MRPController', '_ProductionSupervisor', '_CreatedByUser', '_LastChangedByUser', '_LongText'] 
@Analytics.dataCategory: #DIMENSION
@Analytics.dataExtraction: { enabled: true,
                             delta.changeDataCapture:
                                    { mapping:
                                      [ { role: #MAIN,
                                          table: 'aufk',
                                          tableElement: ['aufnr'],
                                          viewElement:  ['ManufacturingOrder']
                                        },
                                        { role: #LEFT_OUTER_TO_ONE_JOIN,
                                         table: 'afko',
                                          tableElement: ['aufnr'],
                                          viewElement:  ['ManufacturingOrder']
                                        },
                                        { role: #LEFT_OUTER_TO_ONE_JOIN,
                                          table: 'afpo',
                                          tableElement: ['aufnr',              'posnr'],
                                          viewElement:  ['ManufacturingOrder', 'ManufacturingOrderItem']
                                        } ] } }
@Analytics.internalName: #LOCAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@ClientHandling.type: #CLIENT_DEPENDENT
@Consumption.ranked: true
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.compositionRoot: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #SEARCHABLE_ENTITY, #EXTRACTION_DATA_SOURCE]
@ObjectModel.representativeKey: 'ManufacturingOrder'
@ObjectModel.semanticKey: ['ManufacturingOrder']
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@Search.searchable: true
@EndUserText.label: 'Manufacturing Order'

/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view I_ManufacturingOrder
  as select from I_LogisticsOrder as head
    inner join   I_OrderItem      as item on  item.OrderID   = head.OrderID
                                          and item.OrderItem = '0001'

  association [1..1] to I_MfgOrderCategory             as _MfgOrderCategory            on  $projection.ManufacturingOrderCategory = _MfgOrderCategory.ManufacturingOrderCategory
  association [1..1] to I_MfgOrderType                 as _MfgOrderType                on  $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
  association [0..1] to I_ManufacturingOrder           as _ReferenceOrder              on  $projection.ReferenceOrder = _ReferenceOrder.ManufacturingOrder
  association [0..1] to I_ManufacturingOrder           as _LeadingOrder                on  $projection.LeadingOrder   = _LeadingOrder.ManufacturingOrder
  association [0..1] to I_ManufacturingOrder           as _SuperiorOrder               on  $projection.SuperiorOrder  = _SuperiorOrder.ManufacturingOrder
  association [0..1] to I_ManufacturingOrderImportance as _MfgOrderImportance          on  $projection.ManufacturingOrderCategory   = _MfgOrderImportance.ManufacturingOrderCategory
                                                                                       and $projection.ManufacturingOrderImportance = _MfgOrderImportance.ManufacturingOrderImportance 
  association [1..1] to I_OrderInternalID              as _OrderInternalID             on  $projection.MfgOrderInternalID = _OrderInternalID.OrderInternalID
  association [0..1] to I_Language                     as _LongTextLanguage            on  $projection.LongTextLanguageCode = _LongTextLanguage.Language
  association [1..1] to I_UnitOfMeasure                as _ProductionUnit              on  $projection.ProductionUnit = _ProductionUnit.UnitOfMeasure
  association [1..1] to I_User                         as _CreatedByUser               on  $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User                         as _LastChangedByUser           on  $projection.LastChangedByUser = _LastChangedByUser.UserID
  association [1..1] to I_Plant                        as _ProductionPlant             on  $projection.ProductionPlant = _ProductionPlant.Plant
  association [0..1] to I_Plant                        as _PlanningPlant               on  $projection.PlanningPlant   = _PlanningPlant.Plant
  association [0..1] to I_MRPArea                      as _MRPArea                     on  $projection.MRPArea  = _MRPArea.MRPArea
  association [0..1] to I_StorageLocation              as _StorageLocation             on  $projection.ProductionPlant = _StorageLocation.Plant
                                                                                       and $projection.StorageLocation = _StorageLocation.StorageLocation
  association [0..*] to I_Batch                        as _Batch                       on  $projection.Material = _Batch.Material
                                                                                       and $projection.Batch    = _Batch.Batch
  association [0..1] to I_Batch                        as _Batch_2                     on  $projection.ProductionPlant = _Batch_2.Plant
                                                                                       and $projection.Material        = _Batch_2.Material
                                                                                       and $projection.Batch           = _Batch_2.Batch
  association [0..1] to I_Product                      as _Product                     on  $projection.Product = _Product.Product
  association [1..*] to I_ProductUnitsOfMeasure        as _ProductUnitsOfMeasure       on  $projection.Product = _ProductUnitsOfMeasure.Product
  association [0..1] to I_ProductPlant                 as _ProductPlant                on  $projection.ProductionPlant = _ProductPlant.Plant
                                                                                       and $projection.Product         = _ProductPlant.Product
  association [0..1] to I_ProductStorageLocation       as _ProductStorageLocation      on  $projection.Material        = _ProductStorageLocation.Product
                                                                                       and $projection.ProductionPlant = _ProductStorageLocation.Plant
                                                                                       and $projection.StorageLocation = _ProductStorageLocation.StorageLocation
  association [0..1] to I_ProductPlantBasic            as _ProductPlant2               on  $projection.ProductionPlant = _ProductPlant2.Plant
                                                                                       and $projection.Product         = _ProductPlant2.Product
  association [0..1] to I_ProductStorageLocationBasic  as _ProductStorageLocation2     on  $projection.Product         = _ProductStorageLocation2.Product
                                                                                       and $projection.ProductionPlant = _ProductStorageLocation2.Plant
                                                                                       and $projection.StorageLocation = _ProductStorageLocation2.StorageLocation
  association [0..1] to I_ProductPlantMRP              as _ProductPlantMRPArea         on  $projection.Product         = _ProductPlantMRPArea.Product
                                                                                       and $projection.ProductionPlant = _ProductPlantMRPArea.Plant
                                                                                       and $projection.MRPArea         = _ProductPlantMRPArea.MRPArea
  association [0..1] to I_Product                      as _BillOfOperationsMaterial    on  $projection.BillOfOperationsMaterial = _BillOfOperationsMaterial.Product
  association [0..1] to I_SalesOrder                   as _SalesOrder                  on  $projection.SalesOrder = _SalesOrder.SalesOrder
  association [0..1] to I_SalesOrderItem               as _SalesOrderItem              on  $projection.SalesOrder     = _SalesOrderItem.SalesOrder
                                                                                       and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
  association [0..1] to I_SalesDocument                as _SalesDocument               on  $projection.SalesOrder = _SalesDocument.SalesDocument 
  association [0..1] to I_SalesDocumentItem            as _SalesDocumentItem           on  $projection.SalesOrder     = _SalesDocumentItem.SalesDocument
                                                                                       and $projection.SalesOrderItem = _SalesDocumentItem.SalesDocumentItem
  association [0..1] to I_WBSElementByInternalKey      as _WBSElement                  on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
  association [0..1] to I_WBSElementBasicData          as _WBSElementBasicData         on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
  association [0..1] to I_ChangeMaster                 as _ChangeNumber                on  $projection.ChangeNumber = _ChangeNumber.ChangeNumber
  association [0..1] to I_ChangeMstrObjTypeRevisionLvl as _MaterialRevisionLevel       on  $projection.MaterialRevisionLevel = _MaterialRevisionLevel.RevisionLevel
                                                                                       and _MaterialRevisionLevel.ChangeNumberObjectType = '41'
  association [0..1] to I_ChangeMstrObjTypeRevisionLvl as _MaterialRevisionLevel2      on  $projection.MaterialRevisionLevel_2 = _MaterialRevisionLevel2.RevisionLevel
                                                                                       and _MaterialRevisionLevel2.ChangeNumberObjectType = '41' 
  association [0..1] to I_GLAccount                    as _GLAccount                   on  $projection.GLAccount   = _GLAccount.GLAccount
                                                                                       and $projection.CompanyCode = _GLAccount.CompanyCode
  association [0..1] to I_CostElement                  as _CostElement                 on  $projection.ControllingArea = _CostElement.ControllingArea
                                                                                       and $projection.CostElement     = _CostElement.CostElement
  association [0..1] to I_CostingVariant               as _ActualCostsCostingVariant   on  $projection.ActualCostsCostingVariant  = _ActualCostsCostingVariant.CostingVariant                                                                                   
  association [0..1] to I_CostingVariant               as _PlannedCostsCostingVariant  on  $projection.PlannedCostsCostingVariant = _PlannedCostsCostingVariant.CostingVariant
  association [0..1] to I_MRPController                as _MRPController               on  $projection.ProductionPlant = _MRPController.Plant
                                                                                       and $projection.MRPController   = _MRPController.MRPController
  association [0..1] to I_ProductionSupervisor         as _ProductionSupervisor        on  $projection.ProductionPlant      = _ProductionSupervisor.Plant
                                                                                       and $projection.ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor
  association [0..1] to I_ProductionSchedulingProfile  as _ProductionSchedulingProfile on  $projection.ProductionPlant             = _ProductionSchedulingProfile.Plant
                                                                                       and $projection.ProductionSchedulingProfile = _ProductionSchedulingProfile.ProductionSchedulingProfile
  association [0..1] to I_ResponsiblePlannerGroup      as _ResponsiblePlannerGroup     on  $projection.ProductionPlant         = _ResponsiblePlannerGroup.Plant
                                                                                       and $projection.ResponsiblePlannerGroup = _ResponsiblePlannerGroup.ResponsiblePlannerGroup
  association [0..1] to I_MfgBillOfOperations          as _BillOfOperations            on  $projection.BillOfOperationsType    = _BillOfOperations.BillOfOperationsType
                                                                                       and $projection.BillOfOperations        = _BillOfOperations.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant = _BillOfOperations.BillOfOperationsVariant
  association [0..1] to I_MfgBillOfOperationsChgSt     as _BillOfOperationsChangeState on  $projection.BillOfOperationsType      = _BillOfOperationsChangeState.BillOfOperationsType
                                                                                       and $projection.BillOfOperations          = _BillOfOperationsChangeState.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant   = _BillOfOperationsChangeState.BillOfOperationsVariant
                                                                                       and $projection.BOOInternalVersionCounter = _BillOfOperationsChangeState.BOOInternalVersionCounter
  association [0..1] to I_MfgBillOfOperations          as _BillOfOperations2           on  $projection.BillOfOperationsType    = _BillOfOperations2.BillOfOperationsType
                                                                                       and $projection.BillOfOperationsGroup   = _BillOfOperations2.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant = _BillOfOperations2.BillOfOperationsVariant
  association [0..1] to I_MfgBillOfOperationsChgSt     as _BillOfOperationsChangeState2 on $projection.BillOfOperationsType      = _BillOfOperationsChangeState2.BillOfOperationsType
                                                                                       and $projection.BillOfOperationsGroup     = _BillOfOperationsChangeState2.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant   = _BillOfOperationsChangeState2.BillOfOperationsVariant
                                                                                       and $projection.BOOInternalVersionCounter = _BillOfOperationsChangeState2.BOOInternalVersionCounter
  association [0..1] to I_ProductionVersion            as _ProductionVersion           on  $projection.Product           = _ProductionVersion.Material
                                                                                       and $projection.ProductionPlant   = _ProductionVersion.Plant
                                                                                       and $projection.ProductionVersion = _ProductionVersion.ProductionVersion
  association [0..1] to I_ProductionVersion            as _ProductionVersion2          on  $projection.Material          = _ProductionVersion2.Material
                                                                                       and $projection.ProductionPlant   = _ProductionVersion2.Plant
                                                                                       and $projection.ProductionVersion = _ProductionVersion2.ProductionVersion

  -- to child: Items
  association [1..*] to I_ManufacturingOrderItem       as _MfgOrderItem                on  $projection.ManufacturingOrder = _MfgOrderItem.ManufacturingOrder
  association [1..1] to I_ManufacturingOrderItem       as _MfgOrderMainItem            on  $projection.ManufacturingOrder = _MfgOrderMainItem.ManufacturingOrder
                                                                                       and _MfgOrderMainItem.ManufacturingOrderItem = '0001'
  -- to child: Sequences
  association [1..*] to I_MfgOrderSequence             as _MfgOrderSequence            on  $projection.ManufacturingOrder = _MfgOrderSequence.ManufacturingOrder
  -- to child: Operations
  association [1..*] to I_ManufacturingOrderOperation  as _MfgOrderOperation           on  $projection.MfgOrderInternalID = _MfgOrderOperation.MfgOrderInternalID
  -- to child: Material document items
  association [0..*] to I_MfgOrderMaterialDocumentItem as _MfgOrderMaterialDocItem     on  $projection.ManufacturingOrder = _MfgOrderMaterialDocItem.ManufacturingOrder
  -- to child: Documented goods movements
  association [0..*] to I_MfgOrderDocdGoodsMovement    as _MfgOrderDocdGoodsMovement   on  $projection.ManufacturingOrder = _MfgOrderDocdGoodsMovement.ManufacturingOrder  
  -- to child: Document links
  association [0..*] to I_MfgOrderDocumentLink         as _MfgOrderDocumentLink        on  $projection.ManufacturingOrder = _MfgOrderDocumentLink.ManufacturingOrder
  association [0..*] to I_MfgOrderDocInfoRecdObjLink   as _MfgOrderDocInfoRecord       on  $projection.ManufacturingOrder = _MfgOrderDocInfoRecord.ManufacturingOrder
  -- to child: Long text
  association [0..1] to I_ManufacturingOrderLongText   as _MfgOrderLongText            on  $projection.ManufacturingOrder   = _MfgOrderLongText.ManufacturingOrder
                                                                                       and $projection.LongTextLanguageCode = _MfgOrderLongText.LongTextLanguage
  -- to extensionLongtextlanguageCode = _LongTextLanguage.Language
  association [1..1] to E_LogisticsOrder               as _Extension                   on  $projection.ManufacturingOrder = _Extension.OrderID
                               
{
      // Key

      @ObjectModel.text.element: ['ManufacturingOrderText']
      @Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.9}
  key cast(head.OrderID as manufacturingorder preserving type)       as ManufacturingOrder,

      -- for CDC purposes only
      @Consumption.hidden: true
      item.OrderItem     as ManufacturingOrderItem,

      // Category and Type

      @ObjectModel.foreignKey.association: '_MfgOrderCategory'
      head.OrderCategory as ManufacturingOrderCategory,
      @ObjectModel.foreignKey.association: '_MfgOrderType'
      head.OrderType     as ManufacturingOrderType,

      // Text

      @Semantics.text: true
      cast(head.OrderDescription as manufacturingordertext preserving type) as ManufacturingOrderText,
      cast(case 
            when head.OrderHasLongText <> '' then 'X'
            else head.OrderHasLongText
      end as aufltext preserving type)                                as ManufacturingOrderHasLongText,
      @ObjectModel.foreignKey.association: '_LongTextLanguage'
      head.LongTextLanguage                                           as LongTextLanguageCode,

      // Attributes

      @ObjectModel.foreignKey.association: '_MfgOrderImportance'
      cast(head.PriorityCode as orderimportancecode preserving type)  as ManufacturingOrderImportance,
      head.IsMarkedForDeletion,
      item.IsCompletelyDelivered,
      head.MfgOrderHasMultipleItems,
      head.MfgOrderIsPartOfCollvOrder,
      head.MfgOrderHierarchyLevel,
      head.OrderIsNotCostedAutomatically,
      head.OrdIsNotSchedldAutomatically,
      head.ProdnProcgIsFlexible,

      // Admin data

      @Semantics.systemDate.createdAt: true
      cast(head.CreationDate as ordercreationdate preserving type)    as CreationDate,
      @Semantics.systemTime.createdAt: true
      cast(head.CreationTime as ordercreationtime preserving type)    as CreationTime,
      @Semantics.user.createdBy: true
      head.CreatedByUser,
      @Semantics.systemDate.lastChangedAt: true
      head.LastChangeDate,
      @Semantics.systemTime.lastChangedAt: true
      head.LastChangeTime,
      @Semantics.user.lastChangedBy: true
      head.LastChangedByUser,

      // Header Material data

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_Material'
      item.Material                                                         as Material,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_Product'
      cast(item.Material as productnumber preserving type)                  as Product,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      item.StorageLocation,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BatchStdVH', element: 'Batch' } } ]
      item.Batch,
      @Semantics.text: true
      item.GoodsRecipientName,
      @Semantics.text: true
      item.UnloadingPointName,
      @ObjectModel.foreignKey.association: '_InventoryUsabilityCode'
      item.InventoryUsabilityCode,
      item.MaterialGoodsReceiptDuration,
      item.QuantityDistributionKey,
      item.StockSegment,
      item.NumberOfSerialNumbers,

      //Extended Quality Check

      head.ExtdQualityCheckIsRequired                                       as ExtdQualityCheckIsRequired,

      // Assignments

      @ObjectModel.foreignKey.association: '_OrderInternalID'
      cast(head.OrderInternalBillOfOperations as pph_aufpl preserving type) as MfgOrderInternalID,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
      @ObjectModel.foreignKey.association: '_ReferenceOrder'
      head.ReferenceOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
      @ObjectModel.foreignKey.association: '_LeadingOrder'
      head.LeadingOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
      @ObjectModel.foreignKey.association: '_SuperiorOrder'
      head.MfgOrderSuperiorMfgOrder                                         as SuperiorOrder,
      @ObjectModel.foreignKey.association: '_Currency'
      head.Currency,
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      cast(head.Plant as pwwrk preserving type)                             as ProductionPlant,
      @ObjectModel.foreignKey.association: '_PlanningPlant'
      item.MRPPlant                                                         as PlanningPlant,
      @ObjectModel.foreignKey.association: '_MRPArea'
      item.MRPArea,
      @ObjectModel.foreignKey.association: '_MRPController'
      cast(head.MRPController               as pph_dispo   preserving type) as MRPController,
      @ObjectModel.foreignKey.association: '_ProductionSupervisor'
      cast(head.ProductionSupervisor        as pph_fevor   preserving type) as ProductionSupervisor,
      @ObjectModel.foreignKey.association: '_ProductionSchedulingProfile'
      cast(head.ProductionSchedulingProfile as pph_prodprf preserving type) as ProductionSchedulingProfile,
      @ObjectModel.foreignKey.association: '_ResponsiblePlannerGroup'
      head.ResponsiblePlannerGroup,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionVersionStdVH', element: 'ProductionVersion' } } ]
      @ObjectModel.foreignKey.association: '_ProductionVersion2'
      item.ProductionVersion,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderStdVH', element: 'SalesOrder' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrder'
      item.SalesOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderItemStdVH', element: 'SalesOrderItem' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      item.SalesOrderItem,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'WBSElementInternalID_2'
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElmntByIntKeyStdVH', element: 'WBSElementInternalID' } } ]
      @ObjectModel.foreignKey.association: '_WBSElement'
      item.WBSElementInternalID,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElementBasicDataStdVH', element: 'WBSElementInternalID' } } ]
      @ObjectModel.foreignKey.association: '_WBSElementBasicData2'
      item.WBSElementInternalID_2,
      @ObjectModel.foreignKey.association: '_Reservation'
      head.Reservation,
      @ObjectModel.foreignKey.association: '_SettlementReservation'    
      cast(head.SettlementReservation  as settlmntres preserving type)     as SettlementReservation,
      @ObjectModel.foreignKey.association: '_ConfirmationGroup'
      head.MfgOrderConfirmation,
      cast(head.MfgOrderConfirmationCount as pph_noofconf preserving type) as NumberOfMfgOrderConfirmations,
      @ObjectModel.foreignKey.association: '_PlannedOrder'
      item.PlannedOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CapacityRequirementStdVH', element: 'CapacityRequirement' } } ]
      @ObjectModel.foreignKey.association: '_CapacityRequirement'
      head.CapacityRequirement,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_InspectionLotStdVH', element: 'InspectionLot' } } ]
      @ObjectModel.foreignKey.association: '_InspectionLot'
      head.InspectionLot,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ChangeMasterStdVH', element: 'ChangeNumber' } } ]
      @ObjectModel.foreignKey.association: '_ChangeNumber'
      head.ChangeNumber,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'MaterialRevisionLevel_2'
      cast(head.MaterialRevisionLevel  as qrevlv preserving type)                as MaterialRevisionLevel,   // with conv. exit

      head.MaterialRevisionLevel_2                                               as MaterialRevisionLevel_2, // w/o conv. exit

      @ObjectModel.foreignKey.association: '_BasicSchedulingType'
      cast(head.BasicSchedulingType    as basicschedtype preserving type)        as BasicSchedulingType,
      @ObjectModel.foreignKey.association: '_ForecastSchedulingType'
      cast(head.ForecastSchedulingType as forecastschedtype preserving type)     as ForecastSchedulingType,
      cast(head.ObjectInternalID       as pph_objnr preserving type)             as ObjectInternalID,
      cast(item.ProductConfiguration   as product_configuration preserving type) as ProductConfiguration,
      item.EffectivityParameterVariant,
      head.ConditionApplication,
      head.CapacityActiveVersion,
      head.CapacityRqmtHasNotToBeCreated,
      head.OrderSequenceNumber,
      head.MfgOrderSplitStatus,

      // Assignments BOO

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_BillOfOperationsMaterial'
      head.Material as BillOfOperationsMaterial,
      @ObjectModel.foreignKey.association: '_BillOfOperationsType'
      head.BillOfOperationsType,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'BillOfOperationsGroup' // default data element change -> deprecated to avoid RTT2 error in ATC

      @ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
      head.BillOfOperations,
      @ObjectModel.foreignKey.association: '_BillOfOperationsGroup2'
      head.BillOfOperationsGroup,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgBillOfOperationsStdVH', element: 'BillOfOperationsVariant' } } ]
      @ObjectModel.foreignKey.association: '_BillOfOperations'
      head.BillOfOperationsVariant,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgBOOChgStateStdVH', element: 'BOOInternalVersionCounter' } } ]
      @ObjectModel.foreignKey.association: '_BillOfOperationsChangeState'
      head.BOOInternalVersionCounter,
      @ObjectModel.foreignKey.association: '_BillOfOperationsApplication'
      head.BillOfOperationsApplication,
      @ObjectModel.foreignKey.association: '_BillOfOperationsUsage'
      head.BillOfOperationsUsage,
      head.BillOfOperationsVersion,
      head.BOOExplosionDate,
      head.BOOValidityStartDate,

      // Assignments BOM

      head.BillOfMaterialCategory,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'BillOfMaterialInternalID'
      head.BillOfMaterial,            // with conv. exit NUMCV

      head.BillOfMaterialInternalID,  // with conv. exit ALPHA

      head.BillOfMaterialVariant,
      head.BillOfMaterialVariantUsage,
      head.BillOfMaterialVersion,
      head.BOMExplosionDate,
      head.BOMValidityStartDate,

      // Assignments FI/CO

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BusinessAreaStdVH', element: 'BusinessArea' } } ]
      @ObjectModel.foreignKey.association: '_BusinessArea'
      head.BusinessArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
      @ObjectModel.foreignKey.association: '_CompanyCode'
      head.CompanyCode,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      head.ControllingArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProfitCenterStdVH', element: 'ProfitCenter' } } ]
      head.ProfitCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
      head.CostCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
      head.ResponsibleCostCenter,
      @ObjectModel.foreignKey.association: '_CostElement'
      head.CostElement,
      head.CostingSheet,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_GLAccountStdVH', element: 'GLAccount' } } ]
      @ObjectModel.foreignKey.association: '_GLAccount'
      head.GLAccount,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductCostCtrlgOrderStdVH', element: 'OrderID' } } ]  
      @ObjectModel.foreignKey.association: '_ProductCostCollector'
      head.ProductCostCollector,
      @ObjectModel.foreignKey.association: '_ActualCostsCostingVariant'
      head.ActualCostsCostingVariant,
      @ObjectModel.foreignKey.association: '_PlannedCostsCostingVariant'
      head.PlannedCostsCostingVariant,
      @ObjectModel.foreignKey.association: '_ControllingObjectClass'
      cast(head.ControllingObjectClass as pph_scope preserving type)                   as ControllingObjectClass,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      head.FunctionalArea,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'EventBasedPostingMethod'
      head.OrderIsEventBasedPosting,
      head.EventBasedPostingMethod,

      // Floats

      @ObjectModel.foreignKey.association: '_SchedulingFloatProfile'
      head.SchedulingFloatProfile,
      head.FloatBeforeProductionInWrkDays,
      head.FloatAfterProductionInWorkDays,
      head.ReleasePeriodInWorkDays,

      // Dates and Times

      head.ChangeToScheduledDatesIsMade,
      cast(head.PlannedStartDate as mfgorderplannedstartdate preserving type)          as MfgOrderPlannedStartDate,
      cast(head.PlannedStartTime as mfgorderplannedstarttime preserving type)          as MfgOrderPlannedStartTime,
      cast(head.PlannedEndDate as mfgorderplannedenddate preserving type)              as MfgOrderPlannedEndDate,
      cast(head.PlannedEndTime as mfgorderplannedendtime preserving type)              as MfgOrderPlannedEndTime,
      cast(head.PlannedReleaseDate as mfgorderplannedreleasedate preserving type)      as MfgOrderPlannedReleaseDate,
      cast(head.ScheduledBasicStartDate as mfgorderscheduledstartdate preserving type) as MfgOrderScheduledStartDate,
      cast(head.ScheduledBasicStartTime as mfgorderscheduledstarttime preserving type) as MfgOrderScheduledStartTime,
      cast(head.ScheduledBasicEndDate as mfgorderscheduledenddate preserving type)     as MfgOrderScheduledEndDate,
      cast(head.ScheduledBasicEndTime as mfgorderscheduledendtime preserving type)     as MfgOrderScheduledEndTime,
      cast(head.ScheduledReleaseDate as mfgorderscheduledreleasedate preserving type)  as MfgOrderScheduledReleaseDate,
      cast(head.ActualStartDate as mfgorderactualstartdate preserving type)            as MfgOrderActualStartDate,
      cast(head.ActualStartTime as mfgorderactualstarttime preserving type)            as MfgOrderActualStartTime,
      cast(head.ActualEndDate as mfgorderactualenddate preserving type)                as MfgOrderActualEndDate,
      cast(head.ActualReleasedDate as mfgorderactualreleasedate preserving type)       as MfgOrderActualReleaseDate,
      cast(head.ConfirmedEndDate as mfgorderconfirmedenddate preserving type)          as MfgOrderConfirmedEndDate,
      cast(head.ConfirmedEndTime as mfgorderconfirmedendtime preserving type)          as MfgOrderConfirmedEndTime,
      item.TotalCommitmentDate                                                         as MfgOrderTotalCommitmentDate,
      head.TechnicalCompletionDate                                                     as MfgOrderActualCompletionDate,
      item.ActualDeliveryDate                                                          as MfgOrderItemActualDeliveryDate,

      // Quantities and UoM

      @Semantics.unitOfMeasure: true
      cast(head.BaseUnit as productionunit preserving type)                      as ProductionUnit,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderPlannedTotalQty as mfgorderplannedtotalqty preserving type) as MfgOrderPlannedTotalQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderPlannedScrapQty as mfgorderplannedscrapqty preserving type) as MfgOrderPlannedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderConfirmedYieldQty as co_igmng preserving type)              as MfgOrderConfirmedYieldQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderConfirmedScrapQty as co_iasmg preserving type)              as MfgOrderConfirmedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      head.MfgOrderConfirmedReworkQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(item.MfgOrderItemActualDeviationQty as co_mimez preserving type)      as ExpectedDeviationQuantity,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      item.MfgOrderItemGoodsReceiptQty                                           as ActualDeliveredQuantity,

      // Fashion Manufacturing Fields

      head.MasterProductionOrder                                                 as MasterProductionOrder,
      item.ProductSeasonYear                                                     as ProductSeasonYear,
      item.ProductSeason                                                         as ProductSeason,
      item.ProductCollection                                                     as ProductCollection,
      item.ProductTheme                                                          as ProductTheme,      
      
      // Associations

      _MfgOrderCategory,
      _MfgOrderType,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderItem,
      _MfgOrderMainItem,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderSequence,
      _MfgOrderOperation,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderMaterialDocItem,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderDocdGoodsMovement,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderDocumentLink,
      _MfgOrderDocInfoRecord,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderLongText,
      _MfgOrderImportance,
      head._OrderTypeDetails,
      _CreatedByUser,
      _LastChangedByUser,
      _LongTextLanguage,
      _ProductionUnit,
      head._Currency,
      _SuperiorOrder,
      _ReferenceOrder,
      _LeadingOrder,
      _OrderInternalID,
      _BillOfOperationsMaterial,
      head._BillOfOperationsType,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_BillOfOperationsGroup2'
      head._BillOfOperationsGroup,
      head._BillOfOperationsGroup2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_BillOfOperations2'
      _BillOfOperations,
      _BillOfOperations2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_BillOfOperationsChangeState2'
      _BillOfOperationsChangeState,
      _BillOfOperationsChangeState2,
      head._BillOfOperationsApplication,
      head._BillOfOperationsUsage,
      head._ConfirmationGroup,
      head._Reservation,
      head._SettlementReservation,
      _ProductionPlant,
      _PlanningPlant,
      item._Material,
      _Product,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_ProductPlant2'
      _ProductPlant,
      _ProductPlant2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_ProductStorageLocation2'
      _ProductStorageLocation,
      _ProductStorageLocation2,
      _ProductPlantMRPArea,
      _ProductUnitsOfMeasure,
      _StorageLocation,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_Batch_2'  // 0..1 cardinality

      _Batch,
      _Batch_2,
      _MRPArea,
      _MRPController,
      _ProductionSupervisor,
      _ProductionSchedulingProfile,
      _ResponsiblePlannerGroup,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_ProductionVersion2'
      _ProductionVersion,
      _ProductionVersion2,
      head._CapacityRequirement,
      _ChangeNumber,
--    @API.element.releaseState: #DEPRECATED
--    @API.element.successor: '_MaterialRevisionLevel2'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_MaterialRevisionLevel2'
      _MaterialRevisionLevel,
      _MaterialRevisionLevel2,
      head._InspectionLot,
      _SalesOrder,
      _SalesOrderItem,
      _SalesDocument,
      _SalesDocumentItem,
--    @API.element.releaseState: #DEPRECATED
--    @API.element.successor: '_WBSElementBasicData2'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData2'
      _WBSElement,
--    @API.element.releaseState: #DEPRECATED
--    @API.element.successor: '_WBSElementBasicData2'
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData2'
      _WBSElementBasicData,
      item._WBSElementBasicData2,
      item._PlannedOrder,
      item._InventoryUsabilityCode,
      head._BasicSchedulingType,
      head._ForecastSchedulingType,
      head._SchedulingFloatProfile,
      head._BusinessArea,
      head._ProfitCenter,
      head._CostCenter,
      head._ResponsibleCostCenter,
      head._CompanyCode,
      head._ControllingArea,
      head._ControllingObjectClass,
      _CostElement,
      _ActualCostsCostingVariant,
      _PlannedCostsCostingVariant,
      head._FunctionalArea,
      _GLAccount,
      head._ProductCostCollector,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_MfgOrderLongText'
      head._LongText,
      head._RFM_MasterProductOrder
}
where
  (    head.OrderCategory = '10'
    or head.OrderCategory = '40' ); //Manufacturing orders only