I_ProductionOrder

DDL: I_PRODUCTIONORDER Type: view_entity BASIC Package: VDM_PP_SFC

Production Order Header

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

Data Sources (1)

SourceAliasJoin Type
I_LogisticsOrder head from

Associations (40)

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

Annotations (20)

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

Fields (172)

KeyFieldSource TableSource FieldDescription
KEY ProductionOrder
ProductionOrderText
ProductionOrderHasLongText I_LogisticsOrder OrderHasLongText
LongTextLanguage I_LogisticsOrder LongTextLanguage
OrderCategory OrderCategory
ProductionOrderType
OrderImportance
IsMarkedForDeletion I_LogisticsOrder IsMarkedForDeletion
OrderHasMultipleItems I_LogisticsOrder MfgOrderHasMultipleItems
OrderIsPartOfCollectiveOrder I_LogisticsOrder MfgOrderIsPartOfCollvOrder
OrderHierarchyLevelValue I_LogisticsOrder OrderHierarchyLevelValue
OrderHierarchyPathValue I_LogisticsOrder OrderHierarchyPathValue
OrderIsNotCostedAutomatically I_LogisticsOrder OrderIsNotCostedAutomatically
OrdIsNotSchedldAutomatically I_LogisticsOrder OrdIsNotSchedldAutomatically
ProdnProcgIsFlexible I_LogisticsOrder ProdnProcgIsFlexible
CreationDate
CreationTime
CreatedByUser I_LogisticsOrder CreatedByUser
LastChangeDate I_LogisticsOrder LastChangeDate
LastChangeTime I_LogisticsOrder LastChangeTime
LastChangedByUser I_LogisticsOrder LastChangedByUser
ProductionOrderInternalID
ReferenceOrder I_LogisticsOrder ReferenceOrder
LeadingOrder I_LogisticsOrder LeadingOrder
MfgOrderSuperiorMfgOrderasSuperiorOrder
Currency I_LogisticsOrder Currency
ProductionPlant
MRPController
ProductionSupervisor
ProductionSchedulingProfile
ResponsiblePlannerGroup I_LogisticsOrder ResponsiblePlannerGroup
SalesOrder I_LogisticsOrder SalesOrder
SalesOrderItem I_LogisticsOrder SalesOrderItem
Reservation I_LogisticsOrder Reservation
SettlementReservation
OrderConfirmationGroup I_LogisticsOrder MfgOrderConfirmation
NumberOfOrderConfirmations
CapacityRequirement I_LogisticsOrder CapacityRequirement
InspectionLot I_LogisticsOrder InspectionLot
ChangeNumber I_LogisticsOrder ChangeNumber
MaterialRevisionLevel I_LogisticsOrder MaterialRevisionLevel_2
BasicSchedulingType
SchedulingIsAllowingForBreaks I_LogisticsOrder SchedulingIsAllowingForBreaks
ObjectInternalID
ConditionApplication I_LogisticsOrder ConditionApplication
CapacityActiveVersion I_LogisticsOrder CapacityActiveVersion
CapacityRqmtHasNotToBeCreated I_LogisticsOrder CapacityRqmtHasNotToBeCreated
OrderSequenceNumber I_LogisticsOrder OrderSequenceNumber
BillOfOperationsMaterial I_LogisticsOrder Material
BillOfOperationsType I_LogisticsOrder BillOfOperationsType
BillOfOperationsGroup I_LogisticsOrder BillOfOperationsGroup
BillOfOperationsVariant I_LogisticsOrder BillOfOperationsVariant
BOOInternalVersionCounter
BillOfOperationsApplication I_LogisticsOrder BillOfOperationsApplication
BillOfOperationsUsage I_LogisticsOrder BillOfOperationsUsage
BillOfOperationsVersion I_LogisticsOrder BillOfOperationsVersion
BOOExplosionDate I_LogisticsOrder BOOExplosionDate
BOOValidityStartDate I_LogisticsOrder BOOValidityStartDate
BillOfMaterialCategory I_LogisticsOrder BillOfMaterialCategory
BillOfMaterialInternalID I_LogisticsOrder BillOfMaterialInternalID
BillOfMaterialVariant I_LogisticsOrder BillOfMaterialVariant
BillOfMaterialVariantUsage I_LogisticsOrder BillOfMaterialVariantUsage
BillOfMaterialVersion
BOMExplosionDate I_LogisticsOrder BOMExplosionDate
BOMValidityStartDate I_LogisticsOrder BOMValidityStartDate
BusinessArea I_LogisticsOrder BusinessArea
CompanyCode I_LogisticsOrder CompanyCode
ControllingArea I_LogisticsOrder ControllingArea
ProfitCenter I_LogisticsOrder ProfitCenter
CostCenter I_LogisticsOrder CostCenter
ResponsibleCostCenter I_LogisticsOrder ResponsibleCostCenter
CostElement I_LogisticsOrder CostElement
CostingSheet I_LogisticsOrder CostingSheet
GLAccount I_LogisticsOrder GLAccount
ProductCostCollector
ActualCostsCostingVariant I_LogisticsOrder ActualCostsCostingVariant
PlannedCostsCostingVariant I_LogisticsOrder PlannedCostsCostingVariant
ControllingObjectClass
FunctionalArea I_LogisticsOrder FunctionalArea
OverheadCode I_LogisticsOrder OverheadCode
ResultAnalysisInternalID I_LogisticsOrder ResultAnalysisInternalID
VarianceKey I_LogisticsOrder VarianceKey
EventBasedPostingMethod I_LogisticsOrder EventBasedPostingMethod
EventBasedProcessingKey I_LogisticsOrder EventBasedProcessingKey
SchedulingFloatProfile I_LogisticsOrder SchedulingFloatProfile
FloatBeforeProductionInWrkDays I_LogisticsOrder FloatBeforeProductionInWrkDays
FloatAfterProductionInWorkDays I_LogisticsOrder FloatAfterProductionInWorkDays
ReleasePeriodInWorkDays I_LogisticsOrder ReleasePeriodInWorkDays
ChangeToScheduledDatesIsMade I_LogisticsOrder ChangeToScheduledDatesIsMade
OrderPlannedStartTime
OrderPlannedEndDate
OrderPlannedEndTime
OrderPlannedReleaseDate
OrderScheduledStartTime
OrderScheduledEndDate
OrderScheduledEndTime
OrderScheduledReleaseDate
OrderActualStartTime
OrderConfirmedEndDate
OrderConfirmedEndTime
OrderActualEndDate
OrderActualReleaseDate
ProductionUnit
OrderPlannedTotalQty
OrderPlannedScrapQty
OrderConfirmedYieldQty
OrderConfirmedScrapQty
OrderConfirmedReworkQty I_LogisticsOrder MfgOrderConfirmedReworkQty
_ProductionOrderType _ProductionOrderType
_ProductionOrderInternal _ProductionOrderInternal
_OrderTypeDetails I_LogisticsOrder _OrderTypeDetails
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_LongTextLanguage _LongTextLanguage
_ProductionUnit _ProductionUnit
_Currency I_LogisticsOrder _Currency
_ReferenceOrder _ReferenceOrder
_LeadingOrder _LeadingOrder
_BillOfOperationsType I_LogisticsOrder _BillOfOperationsType
_BillOfOperationsGroup _BillOfOperationsGroup
_BillOfOperations _BillOfOperations
_BillOfOperationsChangeState _BillOfOperationsChangeState
_BillOfOperationsMaterial _BillOfOperationsMaterial
_BillOfOperationsApplication I_LogisticsOrder _BillOfOperationsApplication
_BillOfOperationsUsage I_LogisticsOrder _BillOfOperationsUsage
_ConfirmationGroup I_LogisticsOrder _ConfirmationGroup
_Reservation I_LogisticsOrder _Reservation
_SettlementReservation I_LogisticsOrder _SettlementReservation
_ProductionPlant _ProductionPlant
_MRPController _MRPController
_ProductionSupervisor _ProductionSupervisor
_ProductionSchedulingProfile _ProductionSchedulingProfile
_ResponsiblePlannerGroup _ResponsiblePlannerGroup
_SalesOrder I_LogisticsOrder _SalesOrder
_SalesOrderItem I_LogisticsOrder _SalesOrderItem
_WBSElementBasicData
_CapacityRequirement I_LogisticsOrder _CapacityRequirement
_ChangeNumber _ChangeNumber
_StatusObject _StatusObject
_MaterialRevisionLevel _MaterialRevisionLevel
_InspectionLot I_LogisticsOrder _InspectionLot
_BasicSchedulingType I_LogisticsOrder _BasicSchedulingType
_SchedulingFloatProfile I_LogisticsOrder _SchedulingFloatProfile
_BusinessArea I_LogisticsOrder _BusinessArea
_ProfitCenter I_LogisticsOrder _ProfitCenter
_CostCenter I_LogisticsOrder _CostCenter
_ResponsibleCostCenter I_LogisticsOrder _ResponsibleCostCenter
_CompanyCode I_LogisticsOrder _CompanyCode
_ControllingArea I_LogisticsOrder _ControllingArea
_ControllingObjectClass I_LogisticsOrder _ControllingObjectClass
_CostElement _CostElement
_ActualCostsCostingVariant _ActualCostsCostingVariant
_PlannedCostsCostingVariant _PlannedCostsCostingVariant
_FunctionalArea I_LogisticsOrder _FunctionalArea
_GLAccount _GLAccount
_ProductCostCollector I_LogisticsOrder _ProductCostCollector
SOTrelations_ProductionOrderItem
_ProductionOrderSequence _ProductionOrderSequence
_ProductionOrderDocumentLink _ProductionOrderDocumentLink
_ProductionOrderLongText _ProductionOrderLongText
Newtextrelations_ProductionPlantText
_ReferenceOrderText _ReferenceOrderText
_LeadingOrderText _LeadingOrderText
_SuperiorOrderText _SuperiorOrderText
_InspectionLotText _InspectionLotText
_BillOfOperationsMaterialText _BillOfOperationsMaterialText
_StatusObjectText _StatusObjectText
_BusinessAreaText _BusinessAreaText
_CompanyCodeText _CompanyCodeText
_ControllingAreaText _ControllingAreaText
_FunctionalAreaText _FunctionalAreaText
_ProductCostCollectorText _ProductCostCollectorText
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_LastChangedByUser', '_MRPController', '_ProductionSupervisor', '_StatusObject', '_StatusObjectText']
@Analytics.dataCategory: #DIMENSION
@Analytics.dataExtraction: { enabled: true,
                             delta.changeDataCapture:
                                    { mapping:
                                      [ { role: #MAIN,
                                          table: 'aufk',
                                          tableElement: ['aufnr'],
                                          viewElement:  ['ProductionOrder']
                                        },
                                        { role: #LEFT_OUTER_TO_ONE_JOIN,
                                         table: 'afko',
                                          tableElement: ['aufnr'],
                                          viewElement:  ['ProductionOrder']
                                        }
                                        ] } }
@Analytics.internalName: #LOCAL
@Analytics.technicalName: 'IPRODNORDER'
@Consumption.ranked: true
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.compositionRoot: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.representativeKey: 'ProductionOrder'
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #EXTRACTION_DATA_SOURCE, #SQL_DATA_SOURCE, #SEARCHABLE_ENTITY]
@ObjectModel.sapObjectNodeType.name: 'ProductionOrder'
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@Search.searchable: true
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Production Order Header'

/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view entity I_ProductionOrder
  as select from I_LogisticsOrder as head

  association [1..1] to I_ProductionOrderType          as _ProductionOrderType         on  $projection.ProductionOrderType = _ProductionOrderType.ProductionOrderType
  association [1..1] to I_ProductionOrderInternalID    as _ProductionOrderInternal     on  $projection.ProductionOrderInternalID = _ProductionOrderInternal.ProductionOrderInternalID
  association [0..1] to I_Language                     as _LongTextLanguage            on  $projection.LongTextLanguage = _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_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 [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_WBSElementBasicData          as _WBSElementBasicData         on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
  association [0..1] to I_Product                      as _BillOfOperationsMaterial    on  $projection.BillOfOperationsMaterial = _BillOfOperationsMaterial.Product
  association [0..1] to I_BillOfOperationsGroup        as _BillOfOperationsGroup       on  $projection.BillOfOperationsType  = _BillOfOperationsGroup.BillOfOperationsType
                                                                                       and $projection.BillOfOperationsGroup = _BillOfOperationsGroup.BillOfOperationsGroup
  association [0..1] to I_MfgBillOfOperations          as _BillOfOperations            on  $projection.BillOfOperationsType    = _BillOfOperations.BillOfOperationsType
                                                                                       and $projection.BillOfOperationsGroup   = _BillOfOperations.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant = _BillOfOperations.BillOfOperationsVariant
  association [0..1] to I_MfgBillOfOperationsChgSt     as _BillOfOperationsChangeState on $projection.BillOfOperationsType       = _BillOfOperationsChangeState.BillOfOperationsType
                                                                                       and $projection.BillOfOperationsGroup     = _BillOfOperationsChangeState.BillOfOperationsGroup
                                                                                       and $projection.BillOfOperationsVariant   = _BillOfOperationsChangeState.BillOfOperationsVariant
                                                                                       and $projection.BOOInternalVersionCounter = _BillOfOperationsChangeState.BOOInternalVersionCounter
  -- to extension
  association [1..1] to E_LogisticsOrder               as _Extension                   on  $projection.ProductionOrder = _Extension.OrderID

  -- SOT relations to children
  composition [1..*] of I_ProductionOrderItem         as _ProductionOrderItem
  composition [1..*] of I_ProductionOrderSequence     as _ProductionOrderSequence
  composition [0..*] of I_ProductionOrderDocumentLink as _ProductionOrderDocumentLink
  composition [0..*] of I_ProductionOrderLongText     as _ProductionOrderLongText

  -- 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_ProductionOrder             as _ReferenceOrderText           on  $projection.ReferenceOrder = _ReferenceOrderText.ProductionOrder 
  association [0..1] to I_ProductionOrder             as _LeadingOrderText             on  $projection.LeadingOrder   = _LeadingOrderText.ProductionOrder 
  association [0..1] to I_ProductionOrder             as _SuperiorOrderText            on  $projection.SuperiorOrder  = _SuperiorOrderText.ProductionOrder 
  association [0..1] to I_InspectionLot               as _InspectionLotText            on  $projection.InspectionLot = _InspectionLotText.InspectionLot
  association [0..*] to I_ProductText                 as _BillOfOperationsMaterialText on  $projection.BillOfOperationsMaterial = _BillOfOperationsMaterialText.Product
  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: ['ProductionOrderText']
      @Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.9}
  key cast(head.OrderID as vdm_manufacturingorder preserving type)     as ProductionOrder,

      // Text

      @Search: {defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.8}
      @Semantics.text: true
      cast(head.OrderDescription as vdm_prodnordertext preserving type) as ProductionOrderText,
      @Semantics.booleanIndicator:true
      head.OrderHasLongText                                             as ProductionOrderHasLongText,
      @ObjectModel.foreignKey.association: '_LongTextLanguage'
      head.LongTextLanguage,

      // Category and Type

      @Consumption.hidden: true
      OrderCategory,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderTypeStdVH', element: 'ProductionOrderType' } } ]
      @ObjectModel.foreignKey.association: '_ProductionOrderType'
      cast(head.OrderType as vdm_prodnordertype preserving type)     as ProductionOrderType,

      // Attributes

      cast(head.PriorityCode as orderimportancecode preserving type) as OrderImportance,
      @Semantics.booleanIndicator: true
      head.IsMarkedForDeletion,
      @Semantics.booleanIndicator:true
      head.MfgOrderHasMultipleItems                                  as OrderHasMultipleItems,
      @Semantics.booleanIndicator:true
      head.MfgOrderIsPartOfCollvOrder                                as OrderIsPartOfCollectiveOrder,
      head.OrderHierarchyLevelValue,
      head.OrderHierarchyPathValue,
      @Semantics.booleanIndicator:true
      head.OrderIsNotCostedAutomatically,
      @Semantics.booleanIndicator:true
      head.OrdIsNotSchedldAutomatically,
      @Semantics.booleanIndicator: true
      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,

      // Assignments

      @ObjectModel.foreignKey.association: '_ProductionOrderInternal'
      cast(head.OrderInternalBillOfOperations as pph_aufpl preserving type) as ProductionOrderInternalID,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderStdVH', element: 'ProductionOrder' } } ]
      @ObjectModel.foreignKey.association: '_ReferenceOrder'
      head.ReferenceOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderStdVH', element: 'ProductionOrder' } } ]
      @ObjectModel.foreignKey.association: '_LeadingOrder'
      head.LeadingOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderStdVH', element: 'ProductionOrder' } } ]
--    @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_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,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionSchedgProfileVH', element: 'ProductionSchedulingProfile' } } ]
      @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_SalesOrderStdVH', element: 'SalesOrder' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrder'
      head.SalesOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderItemStdVH', element: 'SalesOrderItem' } } ]  
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      head.SalesOrderItem,
--    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElementBasicDataStdVH', element: 'WBSElementInternalID' } } ]  
--    @ObjectModel.foreignKey.association: '_WBSElementBasicData'
--    head.WBSElementInternalID_2                                           as WBSElementInternalID,
      @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                                            as OrderConfirmationGroup,
      cast(head.MfgOrderConfirmationCount as pph_noofconf preserving type) as NumberOfOrderConfirmations,
      @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,
      head.MaterialRevisionLevel_2                                           as MaterialRevisionLevel,
      @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,
      head.ConditionApplication,
      head.CapacityActiveVersion,
      head.CapacityRqmtHasNotToBeCreated,
      head.OrderSequenceNumber,

      // 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,
      @ObjectModel.foreignKey.association: '_BillOfOperationsGroup'     
      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,
      head.BillOfMaterialInternalID,
      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,
      head.EventBasedPostingMethod,
      head.EventBasedProcessingKey,

      // 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 OrderPlannedStartDate,
      cast(head.PlannedStartTime as mfgorderplannedstarttime preserving type)          as OrderPlannedStartTime,
      cast(head.PlannedEndDate as mfgorderplannedenddate preserving type)              as OrderPlannedEndDate,
      cast(head.PlannedEndTime as mfgorderplannedendtime preserving type)              as OrderPlannedEndTime,
      cast(head.PlannedReleaseDate as mfgorderplannedreleasedate preserving type)      as OrderPlannedReleaseDate,
      -- scheduled dates
      cast(head.ScheduledBasicStartDate as mfgorderscheduledstartdate preserving type) as OrderScheduledStartDate,
      cast(head.ScheduledBasicStartTime as mfgorderscheduledstarttime preserving type) as OrderScheduledStartTime,
      cast(head.ScheduledBasicEndDate as mfgorderscheduledenddate preserving type)     as OrderScheduledEndDate,
      cast(head.ScheduledBasicEndTime as mfgorderscheduledendtime preserving type)     as OrderScheduledEndTime,
      cast(head.ScheduledReleaseDate as mfgorderscheduledreleasedate preserving type)  as OrderScheduledReleaseDate,
      -- confirmed/actual dates      
      cast(head.ActualStartDate as mfgorderactualstartdate preserving type)            as OrderActualStartDate,
      cast(head.ActualStartTime as mfgorderactualstarttime preserving type)            as OrderActualStartTime,
      cast(head.ConfirmedEndDate as mfgorderconfirmedenddate preserving type)          as OrderConfirmedEndDate,
      cast(head.ConfirmedEndTime as mfgorderconfirmedendtime preserving type)          as OrderConfirmedEndTime,
      cast(head.ActualEndDate as mfgorderactualenddate preserving type)                as OrderActualEndDate,
      cast(head.ActualReleasedDate as mfgorderactualreleasedate preserving type)       as OrderActualReleaseDate,
      -- other dates
      head.TechnicalCompletionDate                                                     as OrderActualCompletionDate,

      // Quantities and UoM

      @ObjectModel.foreignKey.association: '_ProductionUnit'
      cast(head.BaseUnit as productionunit preserving type)                      as ProductionUnit,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderPlannedTotalQty as mfgorderplannedtotalqty preserving type) as OrderPlannedTotalQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderPlannedScrapQty as mfgorderplannedscrapqty preserving type) as OrderPlannedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderConfirmedYieldQty as co_igmng preserving type)              as OrderConfirmedYieldQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      cast(head.OrderConfirmedScrapQty as co_iasmg preserving type)              as OrderConfirmedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      head.MfgOrderConfirmedReworkQty                                            as OrderConfirmedReworkQty,
      
      // Associations

      _ProductionOrderType,
      _ProductionOrderInternal,
      head._OrderTypeDetails,
      _CreatedByUser,
      _LastChangedByUser,
      _LongTextLanguage,
      _ProductionUnit,
      head._Currency,
      _ReferenceOrder,
      _LeadingOrder,
      head._BillOfOperationsType,
      _BillOfOperationsGroup,
      _BillOfOperations,
      _BillOfOperationsChangeState,
      _BillOfOperationsMaterial,
      head._BillOfOperationsApplication,
      head._BillOfOperationsUsage,
      head._ConfirmationGroup,
      head._Reservation,
      head._SettlementReservation,
      _ProductionPlant,
      _MRPController,
      _ProductionSupervisor,
      _ProductionSchedulingProfile,
      _ResponsiblePlannerGroup,
      head._SalesOrder,
      head._SalesOrderItem,
--    _WBSElementBasicData,
      head._CapacityRequirement,
      _ChangeNumber,
      _StatusObject,
      _MaterialRevisionLevel,
      head._InspectionLot,
      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,

      -- SOT relations
      _ProductionOrderItem,
      _ProductionOrderSequence,
      _ProductionOrderDocumentLink,
      _ProductionOrderLongText,

      -- New text relations
      _ProductionPlantText,
      _ReferenceOrderText,
      _LeadingOrderText,
      _SuperiorOrderText,
      _InspectionLotText,
      _BillOfOperationsMaterialText,
      _StatusObjectText,
      _BusinessAreaText,
      _CompanyCodeText,
      _ControllingAreaText,
      _FunctionalAreaText,
      _ProductCostCollectorText 

}
where head.OrderCategory = '10';