I_MfgOrderOperationCompCube

DDL: I_MFGORDEROPERATIONCOMPCUBE SQL: IPPMFGORDOPCOMPC Type: view COMPOSITE

Manufacturing Order Operation Component - Cube

I_MfgOrderOperationCompCube is a Composite CDS View (Cube) that provides data about "Manufacturing Order Operation Component - Cube" in SAP S/4HANA. It reads from 2 data sources (I_MfgOrderOperationComponent, P_PPH_ReportingDate3) and exposes 193 fields with key fields Reservation, ReservationItem, RecordType. It has 12 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_MfgOrderOperationComponent comp from
P_PPH_ReportingDate3 repdate inner

Associations (12)

CardinalityTargetAliasCondition
[1..1] I_CalendarDate _RequirementDate $projection.MatlCompRequirementDate = _RequirementDate.CalendarDate
[0..1] I_CalendarMonth _RequirementDateMonth $projection.RequirementDateMonth = _RequirementDateMonth.CalendarMonth
[0..1] I_CalendarYear _RequirementDateYear $projection.RequirementDateYear = _RequirementDateYear.CalendarYear
[0..1] I_WeekDay _RequirementDateWeekDay $projection.RequirementDateWeekDay = _RequirementDateWeekDay.WeekDay
[0..1] I_ReportingPeriod _ReportingPeriod $projection.ReportingPeriod = _ReportingPeriod.ReportingPeriod
[0..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
[0..1] I_MRPController _MRPController $projection.Plant = _MRPController.Plant and $projection.MRPController = _MRPController.MRPController
[0..1] I_MaterialPlant _MaterialPlant $projection.Plant = _MaterialPlant.Plant and $projection.Material = _MaterialPlant.Material
[1..1] I_OrderReservationDocument _Reservation $projection.Reservation = _Reservation.Reservation
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.WBSElementInternalID_2 = _WBSElementBasicData.WBSElementInternalID
[1..1] I_ManufacturingOrder _ManufacturingOrder $projection.ManufacturingOrder = _ManufacturingOrder.ManufacturingOrder
[0..1] I_ManufacturingOrderSequence _ManufacturingOrderSequence $projection.ManufacturingOrder = _ManufacturingOrderSequence.ManufacturingOrder and $projection.ManufacturingOrderSequence = _ManufacturingOrderSequence.ManufacturingOrderSequence

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName IPPMFGORDOPCOMPC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
ClientHandling.type #CLIENT_DEPENDENT view
Metadata.allowExtensions true view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
EndUserText.label Manufacturing Order Operation Component - Cube view

Fields (193)

KeyFieldSource TableSource FieldDescription
KEY Reservation I_MfgOrderOperationComponent Reservation
KEY ReservationItem I_MfgOrderOperationComponent ReservationItem
KEY RecordType I_MfgOrderOperationComponent RecordType
ManufacturingOrderCategory I_MfgOrderOperationComponent ManufacturingOrderCategory
ManufacturingOrderType I_MfgOrderOperationComponent ManufacturingOrderType
ManufacturingOrder I_MfgOrderOperationComponent ManufacturingOrder
ManufacturingOrderSequence I_MfgOrderOperationComponent ManufacturingOrderSequence
ManufacturingOrderOperation I_MfgOrderOperationComponent ManufacturingOrderOperation
ManufacturingOrderOperation_2 I_MfgOrderOperationComponent ManufacturingOrderOperation_2
ProductionPlant I_MfgOrderOperationComponent ProductionPlant
OrderInternalBillOfOperations I_MfgOrderOperationComponent OrderInternalBillOfOperations
OrderIntBillOfOperationsItem I_MfgOrderOperationComponent OrderIntBillOfOperationsItem
AssemblyMRPController I_MfgOrderOperationComponent AssemblyMRPController
ProductionSupervisor I_MfgOrderOperationComponent ProductionSupervisor
MatlCompRequirementDate I_MfgOrderOperationComponent MatlCompRequirementDate
MatlCompRequirementTime I_MfgOrderOperationComponent MatlCompRequirementTime
RequirementDateWeekDay P_PPH_ReportingDate3 ReportingDateWeekDay
RequirementDateWeek P_PPH_ReportingDate3 ReportingDateWeek
RequirementDateMonth P_PPH_ReportingDate3 ReportingDateMonth
RequirementDateYear P_PPH_ReportingDate3 ReportingDateYear
RequirementDateYearMonth
ReportingPeriod
ReservationItemCreationCode I_MfgOrderOperationComponent ReservationItemCreationCode
ReservationIsFinallyIssued I_MfgOrderOperationComponent ReservationIsFinallyIssued
MatlCompIsMarkedForDeletion I_MfgOrderOperationComponent MatlCompIsMarkedForDeletion
MaterialComponentIsMissing I_MfgOrderOperationComponent MaterialComponentIsMissing
IsBulkMaterialComponent I_MfgOrderOperationComponent IsBulkMaterialComponent
MatlCompIsMarkedForBackflush I_MfgOrderOperationComponent MatlCompIsMarkedForBackflush
MaterialCompIsAlternativeItem I_MfgOrderOperationComponent MaterialCompIsAlternativeItem
MatlCompIsTextItem I_MfgOrderOperationComponent MatlCompIsTextItem
MatlCompDiscontinuationType I_MfgOrderOperationComponent MatlCompDiscontinuationType
MatlCompIsConfigurable I_MfgOrderOperationComponent MatlCompIsConfigurable
MaterialCompIsCostRelevant I_MfgOrderOperationComponent MaterialCompIsCostRelevant
MaterialComponentIsClassified I_MfgOrderOperationComponent MaterialComponentIsClassified
MaterialCompIsIntraMaterial I_MfgOrderOperationComponent MaterialCompIsIntraMaterial
UsageProbabilityPercent I_MfgOrderOperationComponent UsageProbabilityPercent
OrderIsReleased
OrderIsConfirmed
OrderIsDeleted
OrderIsTechnicallyCompleted
OrderIsClosed
OrderIsMarkedForDeletion
LongTextLanguageCode I_MfgOrderOperationComponent LongTextLanguageCode
LongTextExists I_MfgOrderOperationComponent LongTextExists
RequirementType I_MfgOrderOperationComponent RequirementType
MaterialGroup I_MfgOrderOperationComponent MaterialGroup
Material I_MfgOrderOperationComponent Material
Plant I_MfgOrderOperationComponent Plant
MRPController
SalesOrder I_MfgOrderOperationComponent SalesOrder
SalesOrderItem I_MfgOrderOperationComponent SalesOrderItem
WBSElementInternalID I_MfgOrderOperationComponent WBSElementInternalID
WBSElementInternalID_2 I_MfgOrderOperationComponent WBSElementInternalID_2
ProductConfiguration I_MfgOrderOperationComponent ProductConfiguration
ChangeNumber I_MfgOrderOperationComponent ChangeNumber
EffectivityParameterVariant I_MfgOrderOperationComponent EffectivityParameterVariant
SortField I_MfgOrderOperationComponent SortField
MaterialComponentSortText I_MfgOrderOperationComponent MaterialComponentSortText
BillOfMaterialCategory I_MfgOrderOperationComponent BillOfMaterialCategory
BillOfMaterialInternalID I_MfgOrderOperationComponent BillOfMaterialInternalID_2
BillOfMaterialVariant I_MfgOrderOperationComponent BillOfMaterialVariant
BillOfMaterialItemNodeNumber I_MfgOrderOperationComponent BOMItem
BillOfMaterialItemCategory I_MfgOrderOperationComponent BOMItemCategory
BillOfMaterialItemNumber I_MfgOrderOperationComponent BillOfMaterialItemNumber_2
BOMItemDescription I_MfgOrderOperationComponent BOMItemDescription
BOMExplosionDateID I_MfgOrderOperationComponent BOMExplosionDateID
PurchasingInfoRecord I_MfgOrderOperationComponent PurchasingInfoRecord
PurchasingGroup I_MfgOrderOperationComponent PurchasingGroup
PurchaseRequisition
PurchaseRequisitionItem
PurchaseOrder
PurchaseOrderItem
DeliveryDurationInDays I_MfgOrderOperationComponent DeliveryDurationInDays
GoodsMovementIsAllowed I_MfgOrderOperationComponent GoodsMovementIsAllowed
StorageLocation I_MfgOrderOperationComponent StorageLocation
Batch I_MfgOrderOperationComponent Batch
DebitCreditCode I_MfgOrderOperationComponent DebitCreditCode
GoodsMovementType I_MfgOrderOperationComponent GoodsMovementType
InventorySpecialStockType I_MfgOrderOperationComponent InventorySpecialStockType
InventorySpecialStockValnType I_MfgOrderOperationComponent InventorySpecialStockValnType
ConsumptionPosting I_MfgOrderOperationComponent ConsumptionPosting
SupplyArea I_MfgOrderOperationComponent SupplyArea
GoodsRecipientName I_MfgOrderOperationComponent GoodsRecipientName
UnloadingPointName I_MfgOrderOperationComponent UnloadingPointName
StockSegment I_MfgOrderOperationComponent StockSegment
RequirementSegment I_MfgOrderOperationComponent RequirementSegment
Warehouse I_MfgOrderOperationComponent Warehouse
StorageType I_MfgOrderOperationComponent StorageType
StorageBin I_MfgOrderOperationComponent StorageBin
BusinessArea I_MfgOrderOperationComponent BusinessArea
CompanyCode I_MfgOrderOperationComponent CompanyCode
GLAccount I_MfgOrderOperationComponent GLAccount
AccountAssignmentCategory I_MfgOrderOperationComponent AccountAssignmentCategory
FunctionalArea I_MfgOrderOperationComponent FunctionalArea
BatchSplitType I_MfgOrderOperationComponent BatchSplitType
BatchMasterReservationItem I_MfgOrderOperationComponent BatchMasterReservationItem
MaterialCompIsVariableSized I_MfgOrderOperationComponent MaterialCompIsVariableSized
NumberOfVariableSizeComponents
VariableSizeItemUnit I_MfgOrderOperationComponent VariableSizeItemUnit
VariableSizeItemQuantity I_MfgOrderOperationComponent VariableSizeItemQuantity
VariableSizeComponentUnit I_MfgOrderOperationComponent VariableSizeComponentUnit
VariableSizeComponentQuantity I_MfgOrderOperationComponent VariableSizeComponentQuantity
FormulaKey I_MfgOrderOperationComponent FormulaKey
MaterialComponentIsPhantomItem I_MfgOrderOperationComponent MaterialComponentIsPhantomItem
OrderPathValue I_MfgOrderOperationComponent OrderPathValue
OrderLevelValue I_MfgOrderOperationComponent OrderLevelValue
LeadTimeOffset I_MfgOrderOperationComponent LeadTimeOffset
OperationLeadTimeOffsetUnit I_MfgOrderOperationComponent OperationLeadTimeOffsetUnit
OperationLeadTimeOffset I_MfgOrderOperationComponent OperationLeadTimeOffset
QuantityIsFixed I_MfgOrderOperationComponent QuantityIsFixed
IsNetScrap I_MfgOrderOperationComponent IsNetScrap
ComponentScrapInPercent I_MfgOrderOperationComponent ComponentScrapInPercent
OperationScrapInPercent I_MfgOrderOperationComponent OperationScrapInPercent
BaseUnit I_MfgOrderOperationComponent BaseUnit
RequiredQuantity
WithdrawnQuantity I_MfgOrderOperationComponent WithdrawnQuantity
OpenQuantity
DeviationQuantity
ConfirmedAvailableQuantity I_MfgOrderOperationComponent ConfirmedAvailableQuantity
MaterialCompOriginalQuantity I_MfgOrderOperationComponent MaterialCompOriginalQuantity
OriginalDemandQuantity
EntryUnit I_MfgOrderOperationComponent EntryUnit
GoodsMovementEntryQty I_MfgOrderOperationComponent GoodsMovementEntryQty
Currency I_MfgOrderOperationComponent Currency
WithdrawnQuantityAmount I_MfgOrderOperationComponent WithdrawnQuantityAmount
CompanyCodeCurrency
FreeDefinedAmount1
_Reservation _Reservation
_ReservationItem I_MfgOrderOperationComponent _ReservationItem
_ReservationDocRecordType I_MfgOrderOperationComponent _ReservationDocRecordType
_MfgOrderCategory I_MfgOrderOperationComponent _MfgOrderCategory
_MfgOrderType I_MfgOrderOperationComponent _MfgOrderType
_ManufacturingOrder _ManufacturingOrder
_ManufacturingOrderSequence _ManufacturingOrderSequence
_MfgOrder I_MfgOrderOperationComponent _MfgOrder
_MfgOrderSequence I_MfgOrderOperationComponent _MfgOrderSequence
_MfgOrderOperation I_MfgOrderOperationComponent _MfgOrderOperation
_MfgOrderOperationBySemanKey I_MfgOrderOperationComponent _MfgOrderOperationBySemanKey
_MfgOrderOperationBySemKey I_MfgOrderOperationComponent _MfgOrderOperationBySemKey
_OrdInternalBillOfOperations I_MfgOrderOperationComponent _OrdInternalBillOfOperations
_OrderInternalID I_MfgOrderOperationComponent _OrderInternalID
_ProductionPlant I_MfgOrderOperationComponent _ProductionPlant
_AssemblyMRPController I_MfgOrderOperationComponent _AssemblyMRPController
_ProductionSupervisor I_MfgOrderOperationComponent _ProductionSupervisor
_RequirementType I_MfgOrderOperationComponent _RequirementType
_MaterialGroup I_MfgOrderOperationComponent _MaterialGroup
_Material I_MfgOrderOperationComponent _Material
_MaterialPlant _MaterialPlant
_Product I_MfgOrderOperationComponent _Product
_ProductPlant I_MfgOrderOperationComponent _ProductPlant
_ProductPlant2 I_MfgOrderOperationComponent _ProductPlant2
_Plant I_MfgOrderOperationComponent _Plant
_MRPController _MRPController
_MatlCompDiscontinuationType I_MfgOrderOperationComponent _MatlCompDiscontinuationType
_StorageLocation I_MfgOrderOperationComponent _StorageLocation
_Batch I_MfgOrderOperationComponent _Batch
_BatchSplitType I_MfgOrderOperationComponent _BatchSplitType
_DebitCreditCode I_MfgOrderOperationComponent _DebitCreditCode
_GoodsMovementType I_MfgOrderOperationComponent _GoodsMovementType
_InventorySpecialStockType I_MfgOrderOperationComponent _InventorySpecialStockType
_InventorySpecialStockValnType I_MfgOrderOperationComponent _InventorySpecialStockValnType
_ConsumptionPosting I_MfgOrderOperationComponent _ConsumptionPosting
_SupplyArea I_MfgOrderOperationComponent _SupplyArea
_Warehouse I_MfgOrderOperationComponent _Warehouse
_BOMExplosion I_MfgOrderOperationComponent _BOMExplosion
_BOMItemCategory I_MfgOrderOperationComponent _BOMItemCategory
_SalesOrder I_MfgOrderOperationComponent _SalesOrder
_SalesOrderItem I_MfgOrderOperationComponent _SalesOrderItem
_WBSElement I_MfgOrderOperationComponent _WBSElement
_WBSElementBasicData _WBSElementBasicData
_ChangeNumber I_MfgOrderOperationComponent _ChangeNumber
_PurchasingGroup I_MfgOrderOperationComponent _PurchasingGroup
_PurchasingInfoRecord I_MfgOrderOperationComponent _PurchasingInfoRecord
_PurchaseOrder I_MfgOrderOperationComponent _PurchaseOrder
_PurchaseOrderItem I_MfgOrderOperationComponent _PurchaseOrderItem
_PurchaseRequisition I_MfgOrderOperationComponent _PurchaseRequisition
_PurchaseRequisitionItem I_MfgOrderOperationComponent _PurchaseRequisitionItem
_PurchaseRequisitionItem2 I_MfgOrderOperationComponent _PurchaseRequisitionItem2
_CompanyCode I_MfgOrderOperationComponent _CompanyCode
_BusinessArea I_MfgOrderOperationComponent _BusinessArea
_FunctionalArea I_MfgOrderOperationComponent _FunctionalArea
_GLAccount I_MfgOrderOperationComponent _GLAccount
_AccountAssignmentCategory I_MfgOrderOperationComponent _AccountAssignmentCategory
_BaseUnit I_MfgOrderOperationComponent _BaseUnit
_EntryUnit I_MfgOrderOperationComponent _EntryUnit
_Currency I_MfgOrderOperationComponent _Currency
_LongTextLanguage I_MfgOrderOperationComponent _LongTextLanguage
_CompanyCodeCurrency _CompanyCodeCurrency
_RequirementDate _RequirementDate
_RequirementDateMonth _RequirementDateMonth
_RequirementDateYear _RequirementDateYear
_RequirementDateWeekDay _RequirementDateWeekDay
_ReportingPeriod _ReportingPeriod
@AbapCatalog.sqlViewName: 'IPPMFGORDOPCOMPC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_MRPController', '_AssemblyMRPController', '_ProductionSupervisor']
@Analytics.dataCategory: #CUBE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ClientHandling.type: #CLIENT_DEPENDENT
@Metadata.allowExtensions: true
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
@ObjectModel.supportedCapabilities: [#ANALYTICAL_PROVIDER]
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Manufacturing Order Operation Component - Cube'

define view I_MfgOrderOperationCompCube
  as select from I_MfgOrderOperationComponent as comp
    inner join   P_PPH_ReportingDate3         as repdate on comp.MatlCompRequirementDate = repdate.ReportingDate

  association [1..1] to I_CalendarDate    as _RequirementDate         on  $projection.MatlCompRequirementDate = _RequirementDate.CalendarDate
  association [0..1] to I_CalendarMonth   as _RequirementDateMonth    on  $projection.RequirementDateMonth = _RequirementDateMonth.CalendarMonth
  association [0..1] to I_CalendarYear    as _RequirementDateYear     on  $projection.RequirementDateYear = _RequirementDateYear.CalendarYear
  association [0..1] to I_WeekDay         as _RequirementDateWeekDay  on  $projection.RequirementDateWeekDay = _RequirementDateWeekDay.WeekDay
  association [0..1] to I_ReportingPeriod as _ReportingPeriod         on  $projection.ReportingPeriod = _ReportingPeriod.ReportingPeriod
  association [0..1] to I_Currency        as _CompanyCodeCurrency     on  $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
  association [0..1] to I_MRPController   as _MRPController           on  $projection.Plant         = _MRPController.Plant
                                                                      and $projection.MRPController = _MRPController.MRPController
  association [0..1] to I_MaterialPlant   as _MaterialPlant           on  $projection.Plant    = _MaterialPlant.Plant
                                                                      and $projection.Material = _MaterialPlant.Material
  association [1..1] to I_OrderReservationDocument   as _Reservation  on  $projection.Reservation = _Reservation.Reservation
  association [0..1] to I_WBSElementBasicData        as _WBSElementBasicData        on  $projection.WBSElementInternalID_2 = _WBSElementBasicData.WBSElementInternalID        
  association [1..1] to I_ManufacturingOrder         as _ManufacturingOrder         on  $projection.ManufacturingOrder = _ManufacturingOrder.ManufacturingOrder
  association [0..1] to I_ManufacturingOrderSequence as _ManufacturingOrderSequence on  $projection.ManufacturingOrder         = _ManufacturingOrderSequence.ManufacturingOrder
                                                                                    and $projection.ManufacturingOrderSequence = _ManufacturingOrderSequence.ManufacturingOrderSequence                                                
{
      // Key

      @ObjectModel.foreignKey.association: '_Reservation'
  key comp.Reservation,
      @ObjectModel.text.element: ['BOMItemDescription']
  key comp.ReservationItem,
      @ObjectModel.foreignKey.association: '_ReservationDocRecordType'
  key comp.RecordType,

      // Order and operation data

      @ObjectModel.foreignKey.association: '_MfgOrderCategory'
      comp.ManufacturingOrderCategory,
      @ObjectModel.foreignKey.association: '_MfgOrderType'
      comp.ManufacturingOrderType,
      @ObjectModel.foreignKey.association: '_ManufacturingOrder'
      comp.ManufacturingOrder,
      @ObjectModel.foreignKey.association: '_ManufacturingOrderSequence'
      comp.ManufacturingOrderSequence,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'ManufacturingOrderOperation_2'
      @ObjectModel.foreignKey.association: '_MfgOrderOperationBySemanKey'
      comp.ManufacturingOrderOperation,
      @ObjectModel.foreignKey.association: '_MfgOrderOperationBySemKey'
      comp.ManufacturingOrderOperation_2,
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      comp.ProductionPlant,
      @ObjectModel.foreignKey.association: '_OrdInternalBillOfOperations'
      comp.OrderInternalBillOfOperations,
      @ObjectModel.foreignKey.association: '_MfgOrderOperation'
      comp.OrderIntBillOfOperationsItem,
      @ObjectModel.foreignKey.association: '_AssemblyMRPController'
      comp.AssemblyMRPController,
      @ObjectModel.foreignKey.association: '_ProductionSupervisor'
      comp.ProductionSupervisor,      

      // Date and Time

      @Semantics.businessDate.at: true
      comp.MatlCompRequirementDate,
      comp.MatlCompRequirementTime,
      @ObjectModel.foreignKey.association: '_RequirementDateWeekDay'
      repdate.ReportingDateWeekDay as RequirementDateWeekDay,
      @Semantics.calendar.week: true
      repdate.ReportingDateWeek    as RequirementDateWeek,
      @ObjectModel.foreignKey.association: '_RequirementDateMonth'
    //@Semantics.calendar.month: true

      repdate.ReportingDateMonth   as RequirementDateMonth,
      @ObjectModel.foreignKey.association: '_RequirementDateYear'
    //@Semantics.calendar.year: true

      repdate.ReportingDateYear    as RequirementDateYear,
      cast(concat(repdate.ReportingDateYear, repdate.ReportingDateMonth) as vdm_yearmonth) as RequirementDateYearMonth,
      @ObjectModel.foreignKey.association: '_ReportingPeriod'
      cast(repdate.ReportingPeriod as pph_reportingperiod preserving type) as ReportingPeriod,

      // Attributes

      comp.ReservationItemCreationCode,
      comp.ReservationIsFinallyIssued,
      comp.MatlCompIsMarkedForDeletion,
      comp.MaterialComponentIsMissing,
      comp.IsBulkMaterialComponent,
      comp.MatlCompIsMarkedForBackflush,
      comp.MaterialCompIsAlternativeItem,
      comp.MatlCompIsTextItem,
      @ObjectModel.foreignKey.association: '_MatlCompDiscontinuationType'
      comp.MatlCompDiscontinuationType,
      comp.MatlCompIsConfigurable,
      comp.MaterialCompIsCostRelevant,
      comp.MaterialComponentIsClassified,
      comp.MaterialCompIsIntraMaterial,
      comp.UsageProbabilityPercent,

      //Order Status -- no longer required in query, but kept for compatibility reasons

      cast('X' as xfeld preserving type) as OrderIsReleased,
      cast(' ' as xfeld preserving type) as OrderIsConfirmed,
      cast(' ' as xfeld preserving type) as OrderIsDeleted,
      cast(' ' as xfeld preserving type) as OrderIsTechnicallyCompleted,
      cast(' ' as xfeld preserving type) as OrderIsClosed,
      cast(' ' as xfeld preserving type) as OrderIsMarkedForDeletion,

      // Long Text

      @ObjectModel.foreignKey.association: '_LongTextLanguage'
      comp.LongTextLanguageCode,
      comp.LongTextExists,

      // Assignments

      @ObjectModel.foreignKey.association: '_RequirementType'      
      comp.RequirementType,
      @ObjectModel.foreignKey.association: '_MaterialGroup'
      comp.MaterialGroup,
      @ObjectModel.foreignKey.association: '_Material'
      comp.Material,
      @ObjectModel.foreignKey.association: '_Plant'
      comp.Plant,
      @ObjectModel.foreignKey.association: '_MRPController'
      cast(_MaterialPlant.MRPController as pph_dispo preserving type) as MRPController,
      @ObjectModel.foreignKey.association: '_SalesOrder'
      comp.SalesOrder,
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      comp.SalesOrderItem,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'WBSElementInternalID_2'
      @ObjectModel.foreignKey.association: '_WBSElement'
      comp.WBSElementInternalID,  
      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      comp.WBSElementInternalID_2,
      comp.ProductConfiguration,
      @ObjectModel.foreignKey.association: '_ChangeNumber'
      comp.ChangeNumber,
      comp.EffectivityParameterVariant,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MaterialComponentSortText'
      comp.SortField,
      comp.MaterialComponentSortText,

      // Assignments BOM

      comp.BillOfMaterialCategory,
      comp.BillOfMaterialInternalID_2                                  as BillOfMaterialInternalID,
      comp.BillOfMaterialVariant,
      @ObjectModel.text.element: ['BOMItemDescription']
      comp.BOMItem                                                     as BillOfMaterialItemNodeNumber,
      comp.BOMItemCategory                                             as BillOfMaterialItemCategory,
      @ObjectModel.text.element: ['BOMItemDescription']
      comp.BillOfMaterialItemNumber_2                                  as BillOfMaterialItemNumber,
      @Semantics.text: true
      comp.BOMItemDescription,
      @ObjectModel.foreignKey.association: '_BOMExplosion'
      comp.BOMExplosionDateID,

      // Assignments Purchasing

      comp.PurchasingInfoRecord,
      @ObjectModel.foreignKey.association: '_PurchasingGroup'
      comp.PurchasingGroup,
--    @ObjectModel.foreignKey.association: '_PurchaseRequisition'
      comp.PurchaseRequisition,
--    @ObjectModel.foreignKey.association: '_PurchaseRequisitionItem'
      comp.PurchaseRequisitionItem,
--    @ObjectModel.foreignKey.association: '_PurchaseOrder'
      comp.PurchaseOrder,
--    @ObjectModel.foreignKey.association: '_PurchaseOrderItem'
      comp.PurchaseOrderItem,
      @Semantics.calendarItem.duration: true
      comp.DeliveryDurationInDays,

      // Goods Movement data

      comp.GoodsMovementIsAllowed,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      comp.StorageLocation,
      comp.Batch,
      @ObjectModel.foreignKey.association: '_DebitCreditCode'     
      comp.DebitCreditCode,
      @ObjectModel.foreignKey.association: '_GoodsMovementType'
      comp.GoodsMovementType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
      comp.InventorySpecialStockType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'      
      comp.InventorySpecialStockValnType,
      @ObjectModel.foreignKey.association: '_ConsumptionPosting'      
      comp.ConsumptionPosting,
      @ObjectModel.foreignKey.association: '_SupplyArea'
      comp.SupplyArea,
      @Semantics.text: true
      comp.GoodsRecipientName,
      @Semantics.text: true
      comp.UnloadingPointName,
      comp.StockSegment,
      comp.RequirementSegment,

      // Assignments WM

      @ObjectModel.foreignKey.association: '_Warehouse'
      comp.Warehouse,
      comp.StorageType,
      comp.StorageBin,

      // Assignments FI/CO

      @ObjectModel.foreignKey.association: '_BusinessArea'
      comp.BusinessArea,
      @ObjectModel.foreignKey.association: '_CompanyCode'
      comp.CompanyCode,
      @ObjectModel.foreignKey.association: '_GLAccount'
      comp.GLAccount,
      @ObjectModel.foreignKey.association: '_AccountAssignmentCategory'
      comp.AccountAssignmentCategory,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      comp.FunctionalArea,

      // Batch split data

      @ObjectModel.foreignKey.association: '_BatchSplitType'      
      comp.BatchSplitType,
      comp.BatchMasterReservationItem,

      // Variable-size comp. data

      comp.MaterialCompIsVariableSized,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'VariableSizeItemQuantity'
      cast(comp.NumberOfVariableSizeComponents as int2) as NumberOfVariableSizeComponents,
      @Semantics.unitOfMeasure: true
      comp.VariableSizeItemUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeItemUnit'
      @Aggregation.default: #SUM
      comp.VariableSizeItemQuantity,
      @Semantics.unitOfMeasure: true      
      comp.VariableSizeComponentUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
      @Aggregation.default: #SUM
      comp.VariableSizeComponentQuantity,
      comp.FormulaKey,

      // Phantom assembly

      comp.MaterialComponentIsPhantomItem,
      comp.OrderPathValue,
      comp.OrderLevelValue,

      // Lead-Time offset

      comp.LeadTimeOffset,
      @Semantics.unitOfMeasure: true
      comp.OperationLeadTimeOffsetUnit,
      comp.OperationLeadTimeOffset,

      // Quantities and UoM

      comp.QuantityIsFixed,
      comp.IsNetScrap,
      @Aggregation.default: #MAX
      comp.ComponentScrapInPercent,
      @Aggregation.default: #MAX
      comp.OperationScrapInPercent,
      @Semantics.unitOfMeasure: true
      comp.BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast(comp.RequiredQuantity as requirementquantity preserving type) as RequiredQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      comp.WithdrawnQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      (comp.RequiredQuantity - comp.WithdrawnQuantity) as OpenQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast((comp.WithdrawnQuantity - comp.RequiredQuantity) as deviationquantity) as DeviationQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      comp.ConfirmedAvailableQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      comp.MaterialCompOriginalQuantity,   
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast(division( cast(comp.RequiredQuantity as abap.dec(16,5)),(1 + division(comp.ComponentScrapInPercent,100,3)),3) as originaldemandquantity) as OriginalDemandQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast(comp.WithdrawnQuantity -
      (division( cast(comp.RequiredQuantity as abap.dec(16,5)),(1 + division(comp.ComponentScrapInPercent,100,3)),3)) as excessconsumptionquantity) as ExcessConsumptionQuantity,

      @Semantics.unitOfMeasure: true
      comp.EntryUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      @Aggregation.default: #SUM
      comp.GoodsMovementEntryQty,

      // Amounts and Currencies

      @Semantics.currencyCode: true
      comp.Currency,
      @Aggregation.default: #SUM
      @Semantics.amount.currencyCode: 'Currency'
      comp.WithdrawnQuantityAmount,

      @Semantics.currencyCode: true
      cast(comp._CompanyCode.Currency as vdm_v_company_code_currency preserving type) as CompanyCodeCurrency,
      @Aggregation.default: #SUM
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      case
        when comp.Currency = comp._CompanyCode.Currency
          then comp.WithdrawnQuantityAmount
        else  
          cast(currency_conversion( amount => comp.WithdrawnQuantityAmount,
                            source_currency => comp.Currency,
                            round => 'X',
                            target_currency => comp._CompanyCode.Currency,
                            exchange_rate_date => comp.MatlCompRequirementDate,
                            error_handling => 'SET_TO_NULL' ) as wihthdrawnamountcocurcy preserving type)
      end as WithdrawnQtyAmountInCoCodeCry,

      // no longer needed and consumed - but kept for MDES compatibility reasons

      @Consumption.hidden: true
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      cast(1 as usrcurr13) as FreeDefinedAmount1,

      // Associations

      _Reservation,
      comp._ReservationItem,
      comp._ReservationDocRecordType,
      comp._MfgOrderCategory,
      comp._MfgOrderType,
      _ManufacturingOrder,
      _ManufacturingOrderSequence,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_ManufacturingOrder'
      comp._MfgOrder,
      comp._MfgOrderSequence,
      comp._MfgOrderOperation,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_MfgOrderOperationBySemKey'
      comp._MfgOrderOperationBySemanKey,
      comp._MfgOrderOperationBySemKey,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_OrderInternalID'
      comp._OrdInternalBillOfOperations,
      comp._OrderInternalID,
      comp._ProductionPlant,
      comp._AssemblyMRPController,
      comp._ProductionSupervisor,
      comp._RequirementType,
      comp._MaterialGroup,
      comp._Material,
      _MaterialPlant,
      comp._Product,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_ProductPlant2'
      comp._ProductPlant,
      comp._ProductPlant2,
      comp._Plant,
      _MRPController,
      comp._MatlCompDiscontinuationType,
      comp._StorageLocation,
      comp._Batch,
      comp._BatchSplitType,
      comp._DebitCreditCode,
      comp._GoodsMovementType,
      comp._InventorySpecialStockType,
      comp._InventorySpecialStockValnType,
      comp._ConsumptionPosting,
      comp._SupplyArea,
      comp._Warehouse,
      comp._BOMExplosion,
      comp._BOMItemCategory,
      comp._SalesOrder,
      comp._SalesOrderItem,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData'
      comp._WBSElement,
      _WBSElementBasicData,
      comp._ChangeNumber,
      comp._PurchasingGroup,
      comp._PurchasingInfoRecord,
      comp._PurchaseOrder,
      comp._PurchaseOrderItem,
      comp._PurchaseRequisition,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_PurchaseRequisitionItem2'
      comp._PurchaseRequisitionItem,
      comp._PurchaseRequisitionItem2,
      comp._CompanyCode,
      comp._BusinessArea,
      comp._FunctionalArea,
      comp._GLAccount,
      comp._AccountAssignmentCategory,
      comp._BaseUnit,
      comp._EntryUnit,
      comp._Currency,
      comp._LongTextLanguage,
      _CompanyCodeCurrency,
      _RequirementDate,
      _RequirementDateMonth,
      _RequirementDateYear,      
      _RequirementDateWeekDay,
      _ReportingPeriod
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_MANUFACTURINGORDER",
"I_MATERIALPLANT",
"I_MFGORDEROPERATIONCOMPONENT",
"P_PPH_REPORTINGDATE3"
],
"ASSOCIATED":
[
"I_ACCOUNTASSIGNMENTCATEGORY",
"I_BATCH",
"I_BATCHSPLITTYPE",
"I_BILLOFMATERIALITEMCATEGORY",
"I_BOMEXPLOSIONDATE",
"I_BUSINESSAREA",
"I_CALENDARDATE",
"I_CALENDARMONTH",
"I_CALENDARYEAR",
"I_CHANGEMASTER",
"I_COMPANYCODE",
"I_CONSUMPTIONPOSTING",
"I_CURRENCY",
"I_DEBITCREDITCODE",
"I_FUNCTIONALAREA",
"I_GLACCOUNT",
"I_GOODSMOVEMENTTYPE",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_INVTRYSPECIALSTOCKVALNTYPE",
"I_LANGUAGE",
"I_MANUFACTURINGORDER",
"I_MANUFACTURINGORDERSEQUENCE",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_MATERIALPLANT",
"I_MATERIALREQUIREMENTTYPE",
"I_MATLCOMPDISCONTINUATIONTYPE",
"I_MFGORDER",
"I_MFGORDERCATEGORY",
"I_MFGORDEROPERATIONBASIC",
"I_MFGORDEROPERATIONBYSEMANKEY",
"I_MFGORDEROPERATIONBYSEMKEY",
"I_MFGORDERSEQUENCE",
"I_MFGORDERTYPE",
"I_MRPCONTROLLER",
"I_ORDERINTERNALID",
"I_ORDERRESERVATIONDOCUMENT",
"I_ORDINTERNALBILLOFOPERATIONS",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTIONSUPERVISOR",
"I_PRODUCTIONSUPPLYAREA",
"I_PRODUCTPLANT",
"I_PRODUCTPLANTBASIC",
"I_PURCHASEORDERAPI01",
"I_PURCHASEORDERITEMAPI01",
"I_PURCHASEREQUISITION",
"I_PURCHASEREQUISITIONITEMAPI01",
"I_PURCHASEREQUISITION_API01",
"I_PURCHASINGGROUP",
"I_PURCHASINGINFORECORDAPI01",
"I_REPORTINGPERIOD",
"I_RESERVATIONDOCRECORDTYPE",
"I_RESERVATIONDOCUMENTITEM",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_STORAGELOCATION",
"I_UNITOFMEASURE",
"I_WAREHOUSE",
"I_WBSELEMENTBASICDATA",
"I_WBSELEMENTBYINTERNALKEY",
"I_WEEKDAY"
],
"BASE":
[
"I_MFGORDEROPERATIONCOMPONENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/