I_MANUFACTURINGORDER

CDS View

Manufacturing Order

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

CDS Views using this table (45)

ViewTypeJoinVDMDescription
/VSCEW/C_Disposition_FE view_entity from Disposition FE (Production Order)
/VSCEW/C_SC_Component_FE view_entity inner Supply Chain Component FE (Prod. Order)
/VSCEW/C_SC_Operation_FE view_entity inner Supply Chain Operation FE (Prod. Order)
C_DspDocFlwMfgOrderVH view_entity from CONSUMPTION Manufacturing Order VH for DDF
C_MfgOrderObjPgContacts view_entity inner CONSUMPTION Mfg Order Object Page Contacts
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_MngProdnOrderMfgOrder view_entity from CONSUMPTION Manufacturing Order
C_OpActyWorklistOfCurUsrTP view inner CONSUMPTION Personal Work Queue
C_OperationActivityWorklistTP view inner CONSUMPTION Personal Work Queue
C_ProcessOrderEnhancedVH view_entity from CONSUMPTION Process Order
C_ProductionOrderEnhancedVH view_entity from CONSUMPTION Production Order
I_CacheMRPMfgOrder view inner COMPOSITE Cache MRP Manufacturing Orders
I_ChgImpactOrdSpcfcRtg view from COMPOSITE Order Specific Routings for POs
I_CombinedOrderValueHelp view_entity from BASIC Combined Order
I_MfgOrderDataList view_entity 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_MfgOrderOrderReport view_entity from COMPOSITE Order Report Manufacturing Order
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_MRPMfgOrder view from COMPOSITE MRP Manufacturing Order
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_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_entity union_all COMPOSITE Just-In-Time Material Combined Recipient Documents
P_MPEProdnOrderItemPover view_entity from CONSUMPTION Production Order Popover
P_MPEProdnOrderPover view_entity from CONSUMPTION Production Order Popover
P_PCLblProdCmbndByBusProc view union_all COMPOSITE Union Products by Business Processes
P_ProdnProcgIsFlexible view_entity from COMPOSITE Private View for Flexible Flag
P_ProdnVersMfgOrderCount view_entity from COMPOSITE Count of MfgOrders for ProductionVersion
P_ProductionOrderSupplyForPeg view_entity from COMPOSITE ProductionOrder and ProcessOrder
P_ProductionOrderSupplyForPeg view_entity union_all COMPOSITE ProductionOrder and ProcessOrder
P_ProjectObject view union COMPOSITE Project Objects
P_ProjPlnCostLineItms view inner COMPOSITE Project Cost Line Items with Planning Category Costs
P_RFM_SlsOrdPrgrsMntrMfgOrd view from COMPOSITE Manufacturing Order
P_SalesOrderInSupplyMfgIssue2 view from COMPOSITE SOFM Manufacturing Issue 2
R_ProcessOrderTP view_entity from TRANSACTIONAL Process Order Header - TP
R_ProductionOrderTP view_entity from TRANSACTIONAL Production Order Header - TP

Fields (252)

KeyField CDS FieldsUsed in Views
KEY ManufacturingOrder ManufacturingOrder,ProjectObjectInternalID,SubsequentDocument 16
KEY ManufacturingOrderCategory ManufacturingOrderCategory,SubsequentDocumentCategory 14
KEY ManufacturingOrderItem ManufacturingOrderItem 1
KEY SalesOrderItem ReferenceSDDocumentItem,SalesDocumentItem,SalesOrderItem,SubsequentDocumentItem 10
_ActualCostsCostingVariant _ActualCostsCostingVariant 2
_BasicSchedulingType _BasicSchedulingType 2
_Batch _Batch 2
_Batch_2 _Batch_2 2
_BillOfOperations _BillOfOperations 2
_BillOfOperations2 _BillOfOperations2 2
_BillOfOperationsApplication _BillOfOperationsApplication 2
_BillOfOperationsChangeState _BillOfOperationsChangeState 2
_BillOfOperationsChangeState2 _BillOfOperationsChangeState2 2
_BillOfOperationsGroup _BillOfOperationsGroup 2
_BillOfOperationsGroup2 _BillOfOperationsGroup2 2
_BillOfOperationsMaterial _BillOfOperationsMaterial 3
_BillOfOperationsMaterialText _BillOfOperationsMaterialText 1
_BillOfOperationsType _BillOfOperationsType 3
_BillOfOperationsUsage _BillOfOperationsUsage 2
_BusinessArea _BusinessArea 2
_BusinessAreaText _BusinessAreaText 1
_CapacityRequirement _CapacityRequirement 3
_ChangeNumber _ChangeNumber 3
_CompanyCode _CompanyCode 2
_CompanyCodeText _CompanyCodeText 1
_ConfirmationGroup _ConfirmationGroup 2
_ControllingArea _ControllingArea 2
_ControllingAreaText _ControllingAreaText 1
_ControllingObjectClass _ControllingObjectClass 2
_CostCenter _CostCenter 2
_CostElement _CostElement 2
_CreatedByUser _CreatedByUser 3
_Currency _Currency 3
_EnterpriseProjectElement _EnterpriseProjectElement 1
_ForecastSchedulingType _ForecastSchedulingType 2
_FunctionalArea _FunctionalArea 2
_FunctionalAreaText _FunctionalAreaText 1
_GLAccount _GLAccount 2
_InspectionLot _InspectionLot 2
_InspectionLotText _InspectionLotText 1
_InventoryUsabilityCode _InventoryUsabilityCode 2
_LastChangedByUser _LastChangedByUser 3
_LeadingOrder _LeadingOrder 2
_LeadingOrderText _LeadingOrderText 1
_LongText _LongText 2
_LongTextLanguage _LongTextLanguage 3
_Material _Material 5
_MaterialRevisionLevel _MaterialRevisionLevel 1
_MaterialRevisionLevel2 _MaterialRevisionLevel2 1
_MaterialText _MaterialText 3
_MfgOrderCategory _MfgOrderCategory 4
_MfgOrderDocInfoRecord _MfgOrderDocInfoRecord 1
_MfgOrderImportance _MfgOrderImportance 2
_MfgOrderItem _MfgOrderItem 1
_MfgOrderLongText _MfgOrderLongText 2
_MfgOrderMaterialDocItem _MfgOrderMaterialDocItem 1
_MfgOrderOperation _MfgOrderOperation 1
_MfgOrderSequence _MfgOrderSequence 1
_MfgOrderType _MfgOrderType 7
_MRPArea _MRPArea 2
_MRPAreaText _MRPAreaText 1
_MRPController _MRPController 5
_OrderInternalID _OrderInternalID,_OrdInternalBillOfOperations 5
_OrderTypeDetails _OrderTypeDetails 2
_PlannedCostsCostingVariant _PlannedCostsCostingVariant 2
_PlannedOrder _PlannedOrder 2
_PlanningPlant _MRPPlant,_PlanningPlant 6
_PlanningPlantText _PlanningPlantText 1
_Product _Product 1
_ProductCostCollector _ProductCostCollector 2
_ProductCostCollectorText _ProductCostCollectorText 1
_ProductionPlant _Plant,_ProductionPlant 7
_ProductionPlantText _ProductionPlantText 1
_ProductionSchedulingProfile _ProductionSchedulingProfile 3
_ProductionSupervisor _ProductionSupervisor 5
_ProductionUnit _ProductionUnit 3
_ProductionVersionText _ProductionVersionText 1
_ProductPlant _ProductPlant 2
_ProductPlant2 _ProductPlant2 2
_ProductStorageLocation _ProductStorageLocation 1
_ProductStorageLocation2 _ProductStorageLocation2 1
_ProductText _ProductText 1
_ProfitCenter _ProfitCenter 2
_ReferenceOrder _ReferenceOrder 2
_ReferenceOrderText _ReferenceOrderText 1
_RequestOrderType _RequestOrderType 2
_Reservation _Reservation 3
_ResponsibleCostCenter _ResponsibleCostCenter 2
_ResponsiblePlannerGroup _ResponsiblePlannerGroup 2
_RFM_MasterProductOrder _RFM_MasterProductOrder 1
_SalesDocument _SalesDocument 2
_SalesDocumentItem _SalesDocumentItem 2
_SalesOrder _SalesOrder 2
_SalesOrderItem _SalesOrderItem 2
_SchedulingFloatProfile _SchedulingFloatProfile 1
_SettlementReservation _SettlementReservation 2
_StatusObject _StatusObject 1
_StatusObjectText _StatusObjectText 1
_StorageLocation _StorageLocation 2
_StorageLocationText _StorageLocationText 1
_SuperiorOrder _SuperiorOrder 2
_SuperiorOrderText _SuperiorOrderText 1
_WBSElement _WBSElement 2
_WBSElementBasicData _WBSElementBasicData 2
_WBSElementBasicData2 _WBSElementBasicData,_WBSElementBasicData2 4
_WBSElementText _WBSElementText 1
ActualCostsCostingVariant ActualCostsCostingVariant 5
ActualDeliveredQuantity ActualDeliveredQuantity 8
BasicSchedulingType BasicSchedulingType,SchedulingType 6
Batch Batch 5
BillOfMaterial BillOfMaterial 3
BillOfMaterialCategory BillOfMaterialCategory 5
BillOfMaterialInternalID BillOfMaterialInternalID 4
BillOfMaterialVariant BillOfMaterialVariant 5
BillOfMaterialVariantUsage BillOfMaterialVariantUsage 5
BillOfMaterialVersion BillOfMaterialVersion 3
BillOfOperations BillOfOperations 3
BillOfOperationsApplication BillOfOperationsApplication 3
BillOfOperationsGroup BillOfOperationsGroup 5
BillOfOperationsMaterial BillOfOperationsMaterial 5
BillOfOperationsType BillOfOperationsType 5
BillOfOperationsUsage BillOfOperationsUsage 5
BillOfOperationsVariant BillOfOperationsVariant 5
BillOfOperationsVersion BillOfOperationsVersion 3
BOMExplosionDate BOMExplosionDate 5
BOMValidityStartDate BOMValidityStartDate 4
BOOExplosionDate BOOExplosionDate 5
BOOInternalVersionCounter BOOInternalVersionCounter 5
BOOValidityStartDate BOOValidityStartDate 4
BusinessArea BusinessArea 5
CapacityActiveVersion CapacityActiveVersion 3
CapacityRequirement CapacityRequirement 5
CapacityRqmtHasNotToBeCreated CapacityRqmtHasNotToBeCreated 2
ChangeNumber ChangeNumber 5
ChangeToScheduledDatesIsMade ChangeToScheduledDatesIsMade 2
CompanyCode CompanyCode 4
ConditionApplication ConditionApplication 3
ControllingArea ControllingArea 6
ControllingObjectClass ControllingObjectClass 5
CostCenter CostCenter 7
CostElement CostElement 5
CostingSheet CostingSheet 5
CreatedByUser CreatedByUser 6
CreationDate CreationDate,DocumentDate,MfgOrderCreationDate 8
CreationTime CreationTime,MfgOrderCreationTime 4
Currency Currency 4
EffectivityParameterVariant EffectivityParameterVariant 4
EventBasedPostingMethod EventBasedPostingMethod 3
EventBasedProcessingKey EventBasedProcessingKey 3
ExpectedDeviationQuantity ExpectedDeviationQuantity 7
FloatAfterProductionInWorkDays FloatAfter,FloatAfterProductionInWorkDays 3
FloatBeforeProductionInWrkDays FloatBefore,FloatBeforeProductionInWrkDays 3
ForecastSchedulingType ForecastSchedulingType 4
FunctionalArea FunctionalArea 6
GLAccount GLAccount 6
GoodsRecipientName GoodsRecipientName 3
InspectionLot InspectionLot 6
InventoryUsabilityCode InventoryUsabilityCode 3
IsCompletelyDelivered IsCompletelyDelivered 2
IsMarkedForDeletion MfgOrderIsToBeDeleted,OrderIsMarkedForDeletion 3
LastChangeDate LastChangeDate 6
LastChangedByUser LastChangedByUser 5
LastChangeTime LastChangeTime 5
LeadingOrder LeadingOrder 6
LongTextLanguageCode LongTextLanguageCode 5
ManufacturingOrderHasLongText ManufacturingOrderHasLongText,OrderHasLongText 5
ManufacturingOrderImportance ManufacturingOrderImportance,Priority 11
ManufacturingOrderText Description,ManufacturingOrderText,ProcessOrderText,ProductionOrderText,ProjectObjectDescription 14
ManufacturingOrderType DocumentType,ManufacturingOrderType,ProcessOrderType 15
MasterProductionOrder MasterProductionOrder 3
Material Material 13
MaterialGoodsReceiptDuration MaterialGoodsReceiptDuration 3
MaterialRevisionLevel MaterialRevisionLevel 1
MaterialRevisionLevel_2 MaterialRevisionLevel_2 1
MfgOrderActualCompletionDate MfgOrderActualCompletionDate,TechnicalCompletionDate 3
MfgOrderActualEndDate MfgOrderActualEndDate 8
MfgOrderActualReleaseDate ActualReleasedDate,MfgOrderActualReleaseDate 8
MfgOrderActualStartDate ActualStartDate,MfgOrderActualStartDate 10
MfgOrderActualStartTime ActualStartTime,MfgOrderActualStartTime 7
MfgOrderConfirmation MfgOrderConfirmation 3
MfgOrderConfirmedEndDate ConfirmedEndDate,MfgOrderConfirmedEndDate 7
MfgOrderConfirmedEndTime ConfirmedEndTime,MfgOrderConfirmedEndTime 5
MfgOrderConfirmedReworkQty MfgOrderConfirmedReworkQty 5
MfgOrderConfirmedScrapQty MfgOrderConfirmedScrapQty,OrderConfirmedScrapQty 6
MfgOrderConfirmedYieldQty MfgOrderConfirmedYieldQty,OrderConfirmedYieldQty 6
MfgOrderCreationDate MfgOrderCreationDate 2
MfgOrderCreationTime MfgOrderCreationTime 1
MfgOrderHasMultipleItems MfgOrderHasMultipleItems,OrderHasMultipleItems 5
MfgOrderHierarchyLevel MfgOrderHierarchyLevel 2
MfgOrderHierarchyLevelValue MfgOrderHierarchyLevelValue 2
MfgOrderHierarchyPathValue MfgOrderHierarchyPathValue 2
MfgOrderInternalID MfgOrderInternalID,OrderInternalBillOfOperations 8
MfgOrderIsPartOfCollvOrder MfgOrderIsPartOfCollvOrder 5
MfgOrderItemActualDeliveryDate ActualDeliveryDate,MfgOrderActualDeliveryDate,MfgOrderItemActualDeliveryDate 5
MfgOrderPlannedEndDate MfgOrderPlannedEndDate,PlannedEndDate 11
MfgOrderPlannedEndTime MfgOrderPlannedEndTime,PlannedEndTime 8
MfgOrderPlannedReleaseDate MfgOrderPlannedReleaseDate,PlannedReleaseDate 7
MfgOrderPlannedScrapQty MfgOrderPlannedScrapQty,OrderPlannedScrapQty 9
MfgOrderPlannedStartDate MfgOrderPlannedStartDate,PlannedStartDate 11
MfgOrderPlannedStartTime MfgOrderPlannedStartTime,PlannedStartTime 8
MfgOrderPlannedTotalQty MfgOrderPlannedTotalQty,OrderPlannedTotalQty,Quantity 14
MfgOrderScheduledEndDate MfgOrderScheduledEndDate,ScheduledBasicEndDate 11
MfgOrderScheduledEndTime MfgOrderScheduledEndTime,ScheduledBasicEndTime 5
MfgOrderScheduledReleaseDate MfgOrderScheduledReleaseDate,ScheduledReleaseDate 10
MfgOrderScheduledStartDate MfgOrderScheduledStartDate,ScheduledBasicStartDate 12
MfgOrderScheduledStartTime MfgOrderScheduledStartTime,ScheduledBasicStartTime 5
MfgOrderSplitStatus MfgOrderSplitStatus 3
MfgOrderTotalCommitmentDate MfgOrderTotalCommitmentDate 4
MRPArea MRPArea 4
MRPController MRPController,MRPResponsible 15
NumberOfMfgOrderConfirmations MfgOrderConfirmationCount,NumberOfMfgOrderConfirmations 3
ObjectInternalID ManufacturingObject,ObjectInternalID 5
OrderIsEventBasedPosting OrderIsEventBasedPosting 1
OrderSequenceNumber OrderSequenceNumber 2
OrderSettlementTriggerType OrderSettlementTriggerType 3
OverheadCode OverheadCode 1
PlannedCostsCostingVariant PlannedCostsCostingVariant 5
PlannedOrder PlannedOrder 5
PlanningPlant MRPPlant,PlanningPlant,Plant 12
ProdnProcgIsFlexible ProdnProcgIsFlexible 2
Product Product 5
ProductCollection ProductCollection 2
ProductConfiguration ProductConfiguration 5
ProductCostCollector ProductCostCollector 5
ProductionPlant ProductionPlant 13
ProductionSchedulingProfile ProductionSchedulingProfile 8
ProductionSupervisor ProductionSupervisor 15
ProductionUnit BaseUnit,ProductionUnit 14
ProductionVersion ProductionVersion 8
ProductSeason ProductSeason 2
ProductSeasonYear ProductSeasonYear 2
ProductTheme ProductTheme 2
ProfitCenter ProfitCenter 6
QuantityDistributionKey QuantityDistributionKey 3
ReferenceOrder ReferenceOrder 5
ReleasePeriodInWorkDays ReleasePeriodInWorkDays 2
RequestOrderType RequestOrderType 2
Reservation Reservation 9
ResponsibleCostCenter ResponsibleCostCenter 3
ResponsiblePlannerGroup PlannerGroup,ResponsiblePlannerGroup 6
ResultAnalysisInternalID ResultAnalysisInternalID 1
SalesOrder ReferenceSDDocument,SalesDocument,SalesOrder 9
SchedulingFloatProfile SchedulingFloatProfile 2
SchedulingIsAllowingForBreaks SchedulingIsAllowingForBreaks 1
SettlementReservation SettlementReservation 2
StockSegment StockSegment 3
StorageLocation StorageLocation 4
SuperiorOrder MfgOrderSuperiorMfgOrder,SuperiorOrder 5
UnloadingPointName UnloadingPointName 3
VarianceKey VarianceKey 1
WBSElementInternalID WBSElementInternalID 5
WBSElementInternalID_2 WBSElementInternalID,WBSElementInternalID_2 4
@AbapCatalog.sqlViewName: 'IMFGORDER'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_MRPController', '_ProductionSupervisor', '_CreatedByUser', '_LastChangedByUser',
                                        '_LongText', '_StatusObject', '_StatusObjectText']
@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.sapObjectNodeType.name: 'ProductionOrder'
@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_SerialNumberProfile          as _SerialNumberProfile         on  $projection.SerialNumberProfile = _SerialNumberProfile.SerialNumberProfile
  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 [1..1] to I_StatusObject                 as _StatusObject                on  $projection.ObjectInternalID = _StatusObject.StatusObject
  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 child: Status                                                                                       
  association [0..*] to I_ManufacturingOrderStatus     as _MfgOrderStatus              on  $projection.ManufacturingOrder = _MfgOrderStatus.ManufacturingOrder

  -- to extensionLongtextlanguageCode = _LongTextLanguage.Language
  association [1..1] to E_LogisticsOrder               as _Extension                   on  $projection.ManufacturingOrder = _Extension.OrderID

  -- start new associations for full coverage of text relations
  association [1..1] to I_Plant                       as _ProductionPlantText          on  $projection.ProductionPlant = _ProductionPlantText.Plant
  association [0..1] to I_Plant                       as _PlanningPlantText            on  $projection.PlanningPlant = _PlanningPlantText.Plant
  association [0..*] to I_ProductText                 as _MaterialText                 on  $projection.Material = _MaterialText.Product
  association [0..*] to I_ProductText                 as _ProductText                  on  $projection.Product = _ProductText.Product
  association [0..*] to I_ProductText                 as _BillOfOperationsMaterialText on  $projection.BillOfOperationsMaterial = _BillOfOperationsMaterialText.Product
  association [0..1] to I_ManufacturingOrder          as _ReferenceOrderText           on  $projection.ReferenceOrder = _ReferenceOrderText.ManufacturingOrder
  association [0..1] to I_ManufacturingOrder          as _LeadingOrderText             on  $projection.LeadingOrder   = _LeadingOrderText.ManufacturingOrder
  association [0..1] to I_ManufacturingOrder          as _SuperiorOrderText            on  $projection.SuperiorOrder  = _SuperiorOrderText.ManufacturingOrder
  association [0..1] to I_ProductionVersion           as _ProductionVersionText        on  $projection.Material          = _ProductionVersionText.Material
                                                                                       and $projection.ProductionPlant   = _ProductionVersionText.Plant
                                                                                       and $projection.ProductionVersion = _ProductionVersionText.ProductionVersion
  association [0..1] to I_MRPArea                     as _MRPAreaText                  on  $projection.MRPArea = _MRPAreaText.MRPArea
  association [0..1] to I_WBSElementBasicData         as _WBSElementText               on  $projection.WBSElementInternalID_2 = _WBSElementText.WBSElementInternalID
  association [0..1] to I_InspectionLot               as _InspectionLotText            on  $projection.InspectionLot = _InspectionLotText.InspectionLot
  association [0..1] to I_StorageLocation             as _StorageLocationText          on  $projection.ProductionPlant = _StorageLocationText.Plant
                                                                                       and $projection.StorageLocation = _StorageLocationText.StorageLocation
  association [1..1] to I_StatusObject                as _StatusObjectText             on  $projection.ObjectInternalID = _StatusObjectText.StatusObject
  association [0..*] to I_BusinessAreaText            as _BusinessAreaText             on  $projection.BusinessArea = _BusinessAreaText.BusinessArea
  association [0..1] to I_CompanyCode                 as _CompanyCodeText              on  $projection.CompanyCode = _CompanyCodeText.CompanyCode
  association [0..1] to I_ControllingArea             as _ControllingAreaText          on  $projection.ControllingArea = _ControllingAreaText.ControllingArea                                                                                     
  association [0..*] to I_FunctionalAreaText          as _FunctionalAreaText           on  $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
  association [0..1] to I_ProductCostCtrlgOrder       as _ProductCostCollectorText     on  $projection.ProductCostCollector = _ProductCostCollectorText.OrderID 
  -- end new associations for full coverage of text relations
{
      // 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,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'MfgOrderHierarchyLevelValue'
      head.MfgOrderHierarchyLevel,
      head.OrderHierarchyLevelValue                                   as MfgOrderHierarchyLevelValue,
      head.OrderHierarchyPathValue                                    as MfgOrderHierarchyPathValue,
      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,
      -- for email templates
      @Consumption.hidden: true
      cast(head.CreationDate as ordercreationdate preserving type)    as MfgOrderCreationDate,
      @Consumption.hidden: true
      cast(head.CreationTime as ordercreationtime preserving type)    as MfgOrderCreationTime,

      // Header Material data

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductStdVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_Material'
      @ObjectModel.text.association: '_MaterialText'
      item.Material                                                         as Material,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductStdVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_Product'
      @ObjectModel.text.association: '_ProductText'
      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.SerialNumberAssgmtProfile                                        as SerialNumberProfile,
      item.MaterialGoodsReceiptDuration,
      item.QuantityDistributionKey,
      item.StockSegment,

      // 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,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      cast(head.Plant as pwwrk preserving type)                             as ProductionPlant,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_PlanningPlant'
      item.MRPPlant                                                         as PlanningPlant,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MRPAreaVH', element: 'MRPArea' } } ]
      @ObjectModel.foreignKey.association: '_MRPArea'
      item.MRPArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MRPControllerVH', element: 'MRPController' } } ]
      @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,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlannedOrderStdVH', element: 'PlannedOrder' } } ]
      @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,
      head.SchedulingIsAllowingForBreaks,
      @ObjectModel.foreignKey.association: '_StatusObject'
      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,
      @ObjectModel.foreignKey.association: '_RequestOrderType'
      head.RequestOrderType,

      // Assignments BOO

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductStdVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_BillOfOperationsMaterial'
      @ObjectModel.text.association: '_BillOfOperationsMaterialText'
      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'
      @ObjectModel.text.association: '_BusinessAreaText'
      head.BusinessArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
      @ObjectModel.foreignKey.association: '_CompanyCode'
      head.CompanyCode,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ControllingAreaStdVH', element: 'ControllingArea' } } ]
      @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'
      @ObjectModel.text.association: '_FunctionalAreaText'
      head.FunctionalArea,
      head.OverheadCode,
      head.ResultAnalysisInternalID,
      head.VarianceKey,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'EventBasedPostingMethod'
      head.OrderIsEventBasedPosting,
      head.EventBasedPostingMethod,
      head.EventBasedProcessingKey,
      head.OrderSettlementTriggerType,

      // Floats

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

      // Dates and Times

      head.ChangeToScheduledDatesIsMade,
      -- planned/basic dates
      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,
      -- scheduled dates
      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,
      -- confirmed/actual dates      
      cast(head.ActualStartDate as mfgorderactualstartdate preserving type)            as MfgOrderActualStartDate,
      cast(head.ActualStartTime as mfgorderactualstarttime preserving type)            as MfgOrderActualStartTime,
      cast(head.ConfirmedEndDate as mfgorderconfirmedenddate preserving type)          as MfgOrderConfirmedEndDate,
      cast(head.ConfirmedEndTime as mfgorderconfirmedendtime preserving type)          as MfgOrderConfirmedEndTime,
      @API.element.releaseState: #DEPRECATED     // wrong GFN, GLTRI is the delivery date = LTRMI

      @API.element.successor: 'MfgOrderItemActualDeliveryDate'
      cast(head.ActualEndDate as mfgorderactualenddate preserving type)                as MfgOrderActualEndDate,
      cast(head.ActualReleasedDate as mfgorderactualreleasedate preserving type)       as MfgOrderActualReleaseDate,
      -- other dates
      item.TotalCommitmentDate                                                         as MfgOrderTotalCommitmentDate,
      head.TechnicalCompletionDate                                                     as MfgOrderActualCompletionDate,
      item.ActualDeliveryDate                                                          as MfgOrderItemActualDeliveryDate,

      // Quantities and UoM

      @ObjectModel.foreignKey.association: '_ProductionUnit'
      @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,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _MfgOrderStatus,
      _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,
      _StatusObject,
--    @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._EnterpriseProjectElement,
      item._PlannedOrder,
      item._InventoryUsabilityCode,
      _SerialNumberProfile,
      head._RequestOrderType,
      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,
      
      // Text relations

      _MaterialText,
      _ProductText,
      _ProductionPlantText,
      _PlanningPlantText,
      _ReferenceOrderText,
      _LeadingOrderText,
      _SuperiorOrderText,
      _InspectionLotText,
      _ProductionVersionText,
      _MRPAreaText,
      _WBSElementText,
      _StorageLocationText,
      _BillOfOperationsMaterialText,
      _StatusObjectText,
      _BusinessAreaText,
      _CompanyCodeText,
      _ControllingAreaText,
      _FunctionalAreaText,
      _ProductCostCollectorText 
}
where
  (    head.OrderCategory = '10'
    or head.OrderCategory = '40' ); //Manufacturing orders only