I_SubcontractingComponent

DDL: I_SUBCONTRACTINGCOMPONENT SQL: IPPSUBCONTRCOMP Type: view BASIC

Subcontracting Component

I_SubcontractingComponent is a Basic CDS View (Dimension) that provides data about "Subcontracting Component" in SAP S/4HANA. It reads from 1 data source (resb) and exposes 159 fields with key fields Reservation, ReservationItem, RecordType. It has 44 associations to related views.

Data Sources (1)

SourceAliasJoin Type
resb mdsb from

Associations (44)

CardinalityTargetAliasCondition
[0..1] I_ReservationDocumentHeader _Reservation $projection.Reservation = _Reservation .Reservation
[1..1] I_ReservationDocumentItem _ReservationItem $projection.Reservation = _ReservationItem.Reservation and $projection.ReservationItem = _ReservationItem.ReservationItem and $projection.RecordType = _ReservationItem.RecordType
[0..1] I_ReservationDocRecordType _ReservationRecordType $projection.RecordType = _ReservationRecordType.RecordType
[1..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[1..1] I_Material _Material $projection.Material = _Material.Material
[1..1] I_Product _Product $projection.Material = _Product.Product
[1..*] I_ProductUnitsOfMeasure _ProductUnitsOfMeasure $projection.Material = _ProductUnitsOfMeasure.Product
[1..1] I_ProductPlantBasic _ProductPlant $projection.Material = _ProductPlant.Product and $projection.Plant = _ProductPlant.Plant
[0..1] I_ProductSupplyPlanning _ProductSupplyPlanning $projection.Material = _ProductSupplyPlanning.Product and $projection.Plant = _ProductSupplyPlanning.Plant
[0..1] I_ProductStorageLocationBasic _ProductStorageLocation $projection.Material = _ProductStorageLocation.Product and $projection.Plant = _ProductStorageLocation.Plant and $projection.StorageLocation = _ProductStorageLocation.StorageLocation
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_StorageLocation _StorageLocation $projection.Plant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation
[0..1] I_Batch _Batch $projection.Material = _Batch.Material and $projection.Plant = _Batch.Plant and $projection.Batch = _Batch.Batch
[0..1] I_ProductionSupplyArea _ProductionSupplyArea $projection.Plant = _ProductionSupplyArea.Plant and $projection.ProductionSupplyArea = _ProductionSupplyArea.ProductionSupplyArea
[0..1] I_DebitCreditCode _DebitCreditCode $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
[0..1] I_GoodsMovementType _GoodsMovementType $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
[0..1] I_InventorySpecialStockType _InventorySpecialStockType $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
[0..1] I_InvtrySpecialStockValnType _InventorySpecialStockValnType $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
[0..1] I_ConsumptionPosting _ConsumptionPosting $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
[0..1] I_AccountAssignmentCategory _AccountAssignmentCategory $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
[0..1] I_FunctionalArea _FunctionalArea $projection.FunctionalArea = _FunctionalArea.FunctionalArea
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..*] I_GLAccount _GLAccount $projection.GLAccount = _GLAccount.GLAccount
[0..1] I_PlannedOrder _PlannedOrder $projection.PlannedOrder = _PlannedOrder.PlannedOrder
[0..1] I_LogisticsOrder _Order $projection.OrderID = _Order.OrderID
[0..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[0..1] I_PurchasingInfoRecordApi01 _PurchasingInfoRecord $projection.PurchasingInfoRecord = _PurchasingInfoRecord.PurchasingInfoRecord
[0..1] I_PurchasingDocument _PurchasingDocument $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
[0..1] I_PurchasingDocumentItem _PurchasingDocumentItem $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
[0..1] I_PurchaseRequisitionItemAPI01 _PurchaseRequisitionItem $projection.PurchaseRequisition = _PurchaseRequisitionItem.PurchaseRequisition and $projection.PurchaseRequisitionItem = _PurchaseRequisitionItem.PurchaseRequisitionItem
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_ChangeMaster _ChangeNumber $projection.ChangeNumber = _ChangeNumber.ChangeNumber
[0..1] I_BOMExplosionDate _BOMExplosion $projection.BOMExplosionDateID = _BOMExplosion.BOMExplosionDateID
[0..1] I_MatlCompDiscontinuationType _MatlCompDiscontinuationType $projection.MatlCompDiscontinuationType = _MatlCompDiscontinuationType.MatlCompDiscontinuationType
[0..1] I_MatlCompProvisionType _ProvisionType $projection.MaterialProvisionType = _ProvisionType.MaterialProvisionType
[0..1] I_MatlCompSparePartType _SparePartType $projection.MatlComponentSparePartType = _SparePartType.MatlComponentSparePartType
[0..1] I_Product _FollowUpMaterial $projection.FollowUpMaterial = _FollowUpMaterial.Product
[0..1] I_Material _Assembly $projection.Assembly = _Assembly.Material
[0..1] I_Language _Language $projection.LongTextLanguageCode = _Language.Language
[0..1] I_UnitOfMeasure _VariableSizeCompUnit $projection.VariableSizeComponentUnit = _VariableSizeCompUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _VariableSize1To3Unit $projection.UnitOfMeasureForSize1To3 = _VariableSize1To3Unit.UnitOfMeasure
[0..1] I_UnitOfMeasure _LeadTimeOffsetUnit $projection.OperationLeadTimeOffsetUnit = _LeadTimeOffsetUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _EntryUnit $projection.EntryUnit = _EntryUnit.UnitOfMeasure

Annotations (17)

NameValueLevelField
AbapCatalog.sqlViewName IPPSUBCONTRCOMP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
Analytics.dataCategory #DIMENSION view
Analytics.internalName #LOCAL view
ClientHandling.algorithm #SESSION_VARIABLE view
ClientHandling.type #CLIENT_DEPENDENT view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view
ObjectModel.representativeKey ReservationItem view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.viewType #BASIC view
EndUserText.label Subcontracting Component view

Fields (159)

KeyFieldSource TableSource FieldDescription
KEY Reservation resb rsnum
KEY ReservationItem
KEY RecordType
MaterialGroup resb matkl
Material resb matnr
Plant resb werks
StorageLocation
Batch resb charg
ProductionSupplyArea
StockSegment resb sgt_scat
RequirementSegment resb sgt_rcat
RequirementDate
RequirementTime
LatestRequirementDate
ReservationIsFinallyIssued resb kzear
MatlCompIsMarkedForDeletion
MaterialComponentIsMissing resb xfehl
IsBulkMaterialComponent resb schgt
MatlCompIsTextItem resb txtps
MatlCompIsConfigurable resb kfpos
MaterialComponentIsClassified resb clakz
MaterialCompIsIntraMaterial resb inpos
PlannedOrder resb plnum
OrderID resb aufnr
OrderInternalID
OrderOperationInternalID
PurchasingGroup
PurchasingInfoRecord
PurchaseRequisition
PurchaseRequisitionItem
PurchasingDocument
PurchasingDocumentItem
ScheduleLine resb ebele
Supplier resb lifnr
BillOfMaterialCategory
BillOfMaterialInternalID resb stlnr
BillOfMaterialInternalID_2
BillOfMaterialVariant resb stlal
BillOfMaterialVersion resb bom_versn
BOMItem
BOMItemInternalChangeCount resb stpoz
InheritedBOMItemNode resb stvkn
BOMItemCategory
BillOfMaterialItemNumber resb posnr
BillOfMaterialItemNumber_2
BOMItemDescription resb potx1
BOMItemText2 resb potx2
BOMExplosionDateID
DebitCreditCode
GoodsMovementType resb bwart
InventorySpecialStockType
InventorySpecialStockValnType
ConsumptionPosting
AccountAssignmentCategory
MaterialCompIsCostRelevant resb sanka
MaterialCompCostingRelevancy resb sanka
BusinessArea resb gsber
saknrasGLAccount
FunctionalArea resb fkber
LongTextLanguageCode resb ltxsp
ChangeNumber resb aennr
MaterialRevisionLevel resb revlv
MaterialRevisionLevel_2
QuantityDistributionKey resb verti
EffectivityParameterVariant resb techs
ProductConfiguration resb cuobj
SortField resb sortf
MatlCompFreeDefinedAttribute resb sortf
MaterialCompIsVariableSized resb rohps
NumberOfVariableSizeComponents
VariableSizeItemQuantity
VariableSizeComponentUnit
VariableSizeComponentQuantity
UnitOfMeasureForSize1To3 resb romei
Size1 resb roms1
Size2 resb roms2
Size3 resb roms3
FormulaKey resb rform
MaterialCompIsAlternativeItem resb alpos
AlternativeItemGroup
AlternativeItemStrategy
AlternativeItemPriority
UsageProbabilityPercent resb ewahr
DiscontinuationGroup
MatlCompDiscontinuationType resb kzaus
MatlCompIsFollowUpMaterial
FollowUpGroup
FollowUpMaterial
FollowUpMaterialIsActive
MaterialComponentIsPhantomItem
OrderPathValue resb aufwg
OrderLevelValue resb aufst
Assembly resb baugr
AssemblyOrderPathValue resb bauwg
AssemblyOrderLevelValue resb baust
IsMaterialProvision resb beikz
MaterialProvisionType
SparePartFltrType resb erskz
MatlComponentSparePartType
LeadTimeOffset
OperationLeadTimeOffsetUnit
OperationLeadTimeOffset
QuantityIsFixed resb fmeng
ComponentScrapInPercent resb ausch
OperationScrapInPercent resb avoau
IsNetScrap resb netau
MaterialQtyToBaseQtyNmrtr resb umrez
MaterialQtyToBaseQtyDnmntr resb umren
BaseUnit resb meins
RequiredQuantity resb bdmng
WithdrawnQuantity
MaterialCompOriginalQuantity
MaterialComponentUsageQuantity resb esmng
EntryUnit resb erfme
QuantityInEntryUnit
_Reservation _Reservation
_ReservationItem _ReservationItem
_ReservationRecordType _ReservationRecordType
_MaterialGroup _MaterialGroup
_Material _Material
_Product _Product
_ProductUnitsOfMeasure _ProductUnitsOfMeasure
_ProductPlant _ProductPlant
_ProductStorageLocation _ProductStorageLocation
_ProductSupplyPlanning _ProductSupplyPlanning
_Plant _Plant
_StorageLocation _StorageLocation
_Batch _Batch
_ProductionSupplyArea _ProductionSupplyArea
_DebitCreditCode _DebitCreditCode
_GoodsMovementType _GoodsMovementType
_InventorySpecialStockType _InventorySpecialStockType
_InventorySpecialStockValnType _InventorySpecialStockValnType
_ConsumptionPosting _ConsumptionPosting
_AccountAssignmentCategory _AccountAssignmentCategory
_BusinessArea _BusinessArea
_GLAccount _GLAccount
_FunctionalArea _FunctionalArea
_PlannedOrder _PlannedOrder
_Order _Order
_PurchasingGroup _PurchasingGroup
_PurchasingInfoRecord _PurchasingInfoRecord
_PurchasingDocument _PurchasingDocument
_PurchasingDocumentItem _PurchasingDocumentItem
_PurchaseRequisitionItem _PurchaseRequisitionItem
_Supplier _Supplier
_ChangeNumber _ChangeNumber
_BOMExplosion _BOMExplosion
_Assembly _Assembly
_VariableSizeCompUnit _VariableSizeCompUnit
_VariableSize1To3Unit _VariableSize1To3Unit
_FollowUpMaterial _FollowUpMaterial
_MatlCompDiscontinuationType _MatlCompDiscontinuationType
_ProvisionType _ProvisionType
_SparePartType _SparePartType
_LeadTimeOffsetUnit _LeadTimeOffsetUnit
_Language _Language
_BaseUnit _BaseUnit
_EntryUnit _EntryUnit
@AbapCatalog.sqlViewName: 'IPPSUBCONTRCOMP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@Analytics.dataCategory: #DIMENSION
@Analytics.internalName: #LOCAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@ClientHandling.type: #CLIENT_DEPENDENT
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.representativeKey: 'ReservationItem'
@ObjectModel.semanticKey: ['Reservation', 'ReservationItem']
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #MIXED}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Subcontracting Component'
// corresponds to data base view MDSB


define view I_SubcontractingComponent
  as select from resb as mdsb
    left outer to one join tcs03 as tcs03 on agb29 = '29'

  association [0..1] to I_ReservationDocumentHeader    as _Reservation                on  $projection.Reservation = _Reservation .Reservation
  association [1..1] to I_ReservationDocumentItem      as _ReservationItem            on  $projection.Reservation     = _ReservationItem.Reservation
                                                                                      and $projection.ReservationItem = _ReservationItem.ReservationItem
                                                                                      and $projection.RecordType      = _ReservationItem.RecordType
  association [0..1] to I_ReservationDocRecordType     as _ReservationRecordType      on  $projection.RecordType = _ReservationRecordType.RecordType                                                                                  
  association [1..1] to I_MaterialGroup                as _MaterialGroup              on  $projection.MaterialGroup = _MaterialGroup.MaterialGroup
  association [1..1] to I_Material                     as _Material                   on  $projection.Material = _Material.Material
  association [1..1] to I_Product                      as _Product                    on  $projection.Material = _Product.Product
  association [1..*] to I_ProductUnitsOfMeasure        as _ProductUnitsOfMeasure      on  $projection.Material = _ProductUnitsOfMeasure.Product
  association [1..1] to I_ProductPlantBasic            as _ProductPlant               on  $projection.Material = _ProductPlant.Product
                                                                                      and $projection.Plant    = _ProductPlant.Plant
  association [0..1] to I_ProductSupplyPlanning        as _ProductSupplyPlanning      on  $projection.Material = _ProductSupplyPlanning.Product
                                                                                      and $projection.Plant    = _ProductSupplyPlanning.Plant
  association [0..1] to I_ProductStorageLocationBasic  as _ProductStorageLocation     on  $projection.Material        = _ProductStorageLocation.Product
                                                                                      and $projection.Plant           = _ProductStorageLocation.Plant
                                                                                      and $projection.StorageLocation = _ProductStorageLocation.StorageLocation                                                                                     
  association [1..1] to I_Plant                        as _Plant                      on  $projection.Plant = _Plant.Plant
  association [0..1] to I_StorageLocation              as _StorageLocation            on  $projection.Plant           = _StorageLocation.Plant
                                                                                      and $projection.StorageLocation = _StorageLocation.StorageLocation
  association [0..1] to I_Batch                        as _Batch                      on  $projection.Material = _Batch.Material
                                                                                      and $projection.Plant    = _Batch.Plant
                                                                                      and $projection.Batch    = _Batch.Batch  
  association [0..1] to I_ProductionSupplyArea         as _ProductionSupplyArea       on  $projection.Plant                = _ProductionSupplyArea.Plant
                                                                                      and $projection.ProductionSupplyArea = _ProductionSupplyArea.ProductionSupplyArea
  association [0..1] to I_DebitCreditCode              as _DebitCreditCode            on  $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
  association [0..1] to I_GoodsMovementType            as _GoodsMovementType          on  $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
  association [0..1] to I_InventorySpecialStockType    as _InventorySpecialStockType  on  $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
  association [0..1] to I_InvtrySpecialStockValnType as _InventorySpecialStockValnType on $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
  association [0..1] to I_ConsumptionPosting           as _ConsumptionPosting         on  $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
  association [0..1] to I_AccountAssignmentCategory    as _AccountAssignmentCategory  on  $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
  association [0..1] to I_FunctionalArea               as _FunctionalArea             on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea
  association [0..1] to I_BusinessArea                 as _BusinessArea               on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..*] to I_GLAccount                    as _GLAccount                  on  $projection.GLAccount   = _GLAccount.GLAccount
  association [0..1] to I_PlannedOrder                 as _PlannedOrder               on  $projection.PlannedOrder = _PlannedOrder.PlannedOrder
  association [0..1] to I_LogisticsOrder               as _Order                      on  $projection.OrderID = _Order.OrderID
  association [0..1] to I_PurchasingGroup              as _PurchasingGroup            on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [0..1] to I_PurchasingInfoRecordApi01    as _PurchasingInfoRecord       on  $projection.PurchasingInfoRecord = _PurchasingInfoRecord.PurchasingInfoRecord
  association [0..1] to I_PurchasingDocument           as _PurchasingDocument         on  $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
  association [0..1] to I_PurchasingDocumentItem       as _PurchasingDocumentItem     on  $projection.PurchasingDocument     = _PurchasingDocumentItem.PurchasingDocument
                                                                                      and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
  association [0..1] to I_PurchaseRequisitionItemAPI01 as _PurchaseRequisitionItem    on  $projection.PurchaseRequisition     = _PurchaseRequisitionItem.PurchaseRequisition
                                                                                      and $projection.PurchaseRequisitionItem = _PurchaseRequisitionItem.PurchaseRequisitionItem
  association [0..1] to I_Supplier                     as _Supplier                   on  $projection.Supplier = _Supplier.Supplier
  association [0..1] to I_ChangeMaster                 as _ChangeNumber               on  $projection.ChangeNumber = _ChangeNumber.ChangeNumber
  association [0..1] to I_BOMExplosionDate             as _BOMExplosion               on  $projection.BOMExplosionDateID = _BOMExplosion.BOMExplosionDateID
  association [0..1] to I_MatlCompDiscontinuationType  as _MatlCompDiscontinuationType on $projection.MatlCompDiscontinuationType = _MatlCompDiscontinuationType.MatlCompDiscontinuationType
  association [0..1] to I_MatlCompProvisionType        as _ProvisionType              on  $projection.MaterialProvisionType = _ProvisionType.MaterialProvisionType
  association [0..1] to I_MatlCompSparePartType        as _SparePartType              on  $projection.MatlComponentSparePartType = _SparePartType.MatlComponentSparePartType
  association [0..1] to I_Product                      as _FollowUpMaterial           on  $projection.FollowUpMaterial = _FollowUpMaterial.Product
  association [0..1] to I_Material                     as _Assembly                   on  $projection.Assembly = _Assembly.Material
  association [0..1] to I_Language                     as _Language                   on  $projection.LongTextLanguageCode = _Language.Language
  association [0..1] to I_UnitOfMeasure                as _VariableSizeCompUnit       on  $projection.VariableSizeComponentUnit = _VariableSizeCompUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure                as _VariableSize1To3Unit       on  $projection.UnitOfMeasureForSize1To3  = _VariableSize1To3Unit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure                as _LeadTimeOffsetUnit         on  $projection.OperationLeadTimeOffsetUnit = _LeadTimeOffsetUnit.UnitOfMeasure
  association [1..1] to I_UnitOfMeasure                as _BaseUnit                   on  $projection.BaseUnit = _BaseUnit.UnitOfMeasure
  association [0..1] to I_UnitOfMeasure                as _EntryUnit                  on  $projection.EntryUnit = _EntryUnit.UnitOfMeasure

{
      // Key

      @ObjectModel.foreignKey.association: '_Reservation'
  key mdsb.rsnum                                    as Reservation,
      @ObjectModel.text.element: ['BOMItemDescription']
  key cast(mdsb.rspos as pph_rspos preserving type) as ReservationItem,
      @ObjectModel.foreignKey.association: '_ReservationRecordType'
  key cast(mdsb.rsart as pph_rsart preserving type) as RecordType,

      //Material data

      @ObjectModel.foreignKey.association: '_MaterialGroup'
      mdsb.matkl                                    as MaterialGroup,
      @ObjectModel.foreignKey.association: '_Material'
      mdsb.matnr                                    as Material,
      @ObjectModel.foreignKey.association: '_Plant'
      mdsb.werks                                    as Plant,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      cast(mdsb.lgort as pph_lgort preserving type) as StorageLocation,
      @ObjectModel.foreignKey.association: '_Batch'      
      mdsb.charg                                    as Batch,
      @ObjectModel.foreignKey.association: '_ProductionSupplyArea'
      cast(mdsb.prvbe as pph_prvbe preserving type) as ProductionSupplyArea,
      mdsb.sgt_scat                                 as StockSegment,
      mdsb.sgt_rcat                                 as RequirementSegment,

      // Date and Time

      @Semantics.businessDate.at: true
      cast(mdsb.bdter as pph_bdter preserving type) as RequirementDate,
      cast(mdsb.bdztp as pph_bdztp preserving type) as RequirementTime,
      cast(mdsb.sbter as pph_sbter preserving type) as LatestRequirementDate,

      // Attributes

      mdsb.kzear                                    as ReservationIsFinallyIssued,
      @Semantics.booleanIndicator: true
      cast(mdsb.xloek as pph_xloek preserving type) as MatlCompIsMarkedForDeletion,
      mdsb.xfehl                                    as MaterialComponentIsMissing,
      mdsb.schgt                                    as IsBulkMaterialComponent,
      mdsb.txtps                                    as MatlCompIsTextItem,
      mdsb.kfpos                                    as MatlCompIsConfigurable,
      mdsb.clakz                                    as MaterialComponentIsClassified,
      mdsb.inpos                                    as MaterialCompIsIntraMaterial,
      
      // Assignments Order

      @ObjectModel.foreignKey.association: '_PlannedOrder'
      mdsb.plnum                                    as PlannedOrder,
      @ObjectModel.foreignKey.association: '_Order'
      mdsb.aufnr                                    as OrderID,
      cast(mdsb.aufpl as pph_aufpl preserving type) as OrderInternalID,
      cast(mdsb.aplzl as operationinternalid preserving type) as OrderOperationInternalID, 
      
      // Assignments Purchasing

      @ObjectModel.foreignKey.association: '_PurchasingGroup'
      cast(mdsb.ekgrp as pph_ekgrp preserving type) as PurchasingGroup,
      cast(mdsb.infnr as pph_infnr preserving type) as PurchasingInfoRecord,
      cast(mdsb.banfn as co_banfn  preserving type) as PurchaseRequisition,
      cast(mdsb.bnfpo as co_bnfpo  preserving type) as PurchaseRequisitionItem,
      cast(mdsb.ebeln as pph_ebeln preserving type) as PurchasingDocument,
      cast(mdsb.ebelp as pph_ebelp preserving type) as PurchasingDocumentItem,
      mdsb.ebele as ScheduleLine,
      @ObjectModel.foreignKey.association: '_Supplier'
      mdsb.lifnr as Supplier,

      // Assignments BOM

      cast(mdsb.stlty as pph_stlty preserving type) as BillOfMaterialCategory,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'BillOfMaterialInternalID_2'
      mdsb.stlnr                                    as BillOfMaterialInternalID,
      cast(mdsb.stlnr as pph_stnum preserving type) as BillOfMaterialInternalID_2,
      mdsb.stlal                                    as BillOfMaterialVariant,
      mdsb.bom_versn                                as BillOfMaterialVersion,
      cast(mdsb.stlkn as pph_stlkn preserving type) as BOMItem,
      mdsb.stpoz                                    as BOMItemInternalChangeCount,
      mdsb.stvkn                                    as InheritedBOMItemNode,
      cast(mdsb.postp as pph_postp preserving type) as BOMItemCategory,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'BillOfMaterialItemNumber_2'
      mdsb.posnr                                    as BillOfMaterialItemNumber,
      @ObjectModel.text.element: ['BOMItemDescription']
      cast(mdsb.posnr as vdm_sposn preserving type) as BillOfMaterialItemNumber_2,
      @Semantics.text: true
      mdsb.potx1                                    as BOMItemDescription,
      @Semantics.text: true
      mdsb.potx2                                    as BOMItemText2,
      @ObjectModel.foreignKey.association: '_BOMExplosion'
      cast(mdsb.sernr as pph_sernr preserving type) as BOMExplosionDateID,

      // Goods Movement data

      @ObjectModel.foreignKey.association: '_DebitCreditCode'
      cast(mdsb.shkzg as pph_shkzg preserving type)                 as DebitCreditCode,
      @ObjectModel.foreignKey.association: '_GoodsMovementType'
      mdsb.bwart                                                    as GoodsMovementType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
      cast(mdsb.sobkz as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
      cast(mdsb.kzbws as pph_kzbws preserving type)                 as InventorySpecialStockValnType,
      @ObjectModel.foreignKey.association: '_ConsumptionPosting'
      cast(mdsb.kzvbr as pph_kzvbr preserving type)                 as ConsumptionPosting,
      @ObjectModel.foreignKey.association: '_AccountAssignmentCategory'
      cast(mdsb.knttp as pph_knttp preserving type)                 as AccountAssignmentCategory,

      // Assignments FI/CO

      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MaterialCompCostingRelevancy'
      mdsb.sanka                                       as MaterialCompIsCostRelevant,
      mdsb.sanka                                       as MaterialCompCostingRelevancy,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      mdsb.gsber                                       as BusinessArea,
--    @ObjectModel.foreignKey.association: '_GLAccount'
      mdsb.saknr                                       as GLAccount,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      mdsb.fkber                                       as FunctionalArea,

      // Assignments others

      @ObjectModel.foreignKey.association: '_Language'
      mdsb.ltxsp                                       as LongTextLanguageCode,
      @ObjectModel.foreignKey.association: '_ChangeNumber'
      mdsb.aennr                                       as ChangeNumber,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MaterialRevisionLevel_2' 
      mdsb.revlv                                       as MaterialRevisionLevel,
      cast(mdsb.revlv as vdm_qm_revlv preserving type) as MaterialRevisionLevel_2,
      mdsb.verti                                       as QuantityDistributionKey,
      mdsb.techs                                       as EffectivityParameterVariant,
      mdsb.cuobj                                       as ProductConfiguration,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MatlCompFreeDefinedAttribute'      
      mdsb.sortf                                       as SortField,
      mdsb.sortf                                       as MatlCompFreeDefinedAttribute,

      // Variable-sized data

      mdsb.rohps                                    as MaterialCompIsVariableSized,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'VariableSizeItemQuantity'
      cast(mdsb.roanz as pph_roanz preserving type) as NumberOfVariableSizeComponents,
      @Semantics.unitOfMeasure: true
      cast(case mdsb.rohps
        when 'X' then tcs03.roame
      end as vdm_roame)                             as VariableSizeItemUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeItemUnit'
      @Aggregation.default: #SUM
      cast(mdsb.roanz as pph_roanz preserving type) as VariableSizeItemQuantity,      
      @Semantics.unitOfMeasure: true      
      cast(mdsb.rokme as pph_rokme preserving type) as VariableSizeComponentUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
      @Aggregation.default: #SUM
      cast(mdsb.romen as pph_romen preserving type) as VariableSizeComponentQuantity,
      @Semantics.unitOfMeasure: true
      mdsb.romei                                    as UnitOfMeasureForSize1To3,
      @Semantics.quantity.unitOfMeasure: 'UnitOfMeasureForSize1To3'
      @Aggregation.default: #SUM
      mdsb.roms1                                    as Size1,
      @Semantics.quantity.unitOfMeasure: 'UnitOfMeasureForSize1To3'
      @Aggregation.default: #SUM
      mdsb.roms2                                    as Size2,
      @Semantics.quantity.unitOfMeasure: 'UnitOfMeasureForSize1To3'
      @Aggregation.default: #SUM
      mdsb.roms3                                    as Size3,
      mdsb.rform                                    as FormulaKey,

      // Alternative item data

      mdsb.alpos                                    as MaterialCompIsAlternativeItem,
      cast(mdsb.alpgr as pph_alpgr preserving type) as AlternativeItemGroup,
      cast(mdsb.alpst as pph_alpst preserving type) as AlternativeItemStrategy,
      cast(mdsb.alprf as pph_alprf preserving type) as AlternativeItemPriority,
      mdsb.ewahr                                    as UsageProbabilityPercent,

      // Discontinuation

      cast(mdsb.nfeag as pph_nfeag preserving type) as DiscontinuationGroup,
      @ObjectModel.foreignKey.association: '_MatlCompDiscontinuationType'
      mdsb.kzaus                                    as MatlCompDiscontinuationType,
      cast(mdsb.nfpkz as pph_kznfp preserving type) as MatlCompIsFollowUpMaterial,
      cast(mdsb.nfgrp as pph_nfgrp preserving type) as FollowUpGroup,
      @ObjectModel.foreignKey.association: '_FollowUpMaterial'
      cast(mdsb.nomat as pph_nomat preserving type) as FollowUpMaterial,
      cast(mdsb.nafkz as pph_nafkz preserving type) as FollowUpMaterialIsActive,

      // Phantom assembly

      cast(mdsb.dumps as pph_dumps preserving type) as MaterialComponentIsPhantomItem,
      mdsb.aufwg                                    as OrderPathValue,
      mdsb.aufst                                    as OrderLevelValue,
      @ObjectModel.foreignKey.association: '_Assembly'
      mdsb.baugr                                    as Assembly,
      mdsb.bauwg                                    as AssemblyOrderPathValue,
      mdsb.baust                                    as AssemblyOrderLevelValue,

      // Material provision

      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MaterialProvisionType'
      mdsb.beikz                                    as IsMaterialProvision,
      @ObjectModel.foreignKey.association: '_ProvisionType'
      cast(mdsb.beikz as vdm_beikz preserving type) as MaterialProvisionType,

      // Spare parts

      cast(case 
        when mdsb.erskz <> '' then 'X'
      end as vdm_kzers preserving type)             as MaterialComponentIsSparePart,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'MatlComponentSparePartType'
      mdsb.erskz                                    as SparePartFltrType,
      @ObjectModel.foreignKey.association: '_SparePartType'
      cast(mdsb.erskz as vdm_erskz preserving type) as MatlComponentSparePartType,

      // Lead-Time offset

      cast(mdsb.nlfzt as pph_nlfzt preserving type) as LeadTimeOffset,
      @Semantics.unitOfMeasure: true
      cast(mdsb.nlfmv as pph_nlfmv preserving type) as OperationLeadTimeOffsetUnit,
      cast(mdsb.nlfzv as pph_nlfzv preserving type) as OperationLeadTimeOffset,

      // Quantities and UoM

      mdsb.fmeng                                    as QuantityIsFixed,
      mdsb.ausch                                    as ComponentScrapInPercent,
      mdsb.avoau                                    as OperationScrapInPercent,
      mdsb.netau                                    as IsNetScrap,
      mdsb.umrez                                    as MaterialQtyToBaseQtyNmrtr,
      mdsb.umren                                    as MaterialQtyToBaseQtyDnmntr,
      @Semantics.unitOfMeasure: true
      mdsb.meins                                    as BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      mdsb.bdmng                                    as RequiredQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast(mdsb.enmng as pph_enmng preserving type) as WithdrawnQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      cast(mdsb.nomng as pph_nomng preserving type) as MaterialCompOriginalQuantity,      
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM     
      mdsb.esmng                                    as MaterialComponentUsageQuantity,
      
      @Semantics.unitOfMeasure: true
      mdsb.erfme                                    as EntryUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      @Aggregation.default: #SUM
      cast(mdsb.erfmg as pph_erfmg preserving type) as QuantityInEntryUnit,

      // Associations

      _Reservation,
      _ReservationItem,
      _ReservationRecordType,
      _MaterialGroup,
      _Material,
      _Product,
      _ProductUnitsOfMeasure,
      _ProductPlant,
      _ProductStorageLocation,
      _ProductSupplyPlanning,
      _Plant,
      _StorageLocation,
      _Batch,
      _ProductionSupplyArea,
      _DebitCreditCode,
      _GoodsMovementType,
      _InventorySpecialStockType,
      _InventorySpecialStockValnType,
      _ConsumptionPosting,
      _AccountAssignmentCategory,
      _BusinessArea,
      _GLAccount,
      _FunctionalArea,
      _PlannedOrder,
      _Order,
      _PurchasingGroup,
      _PurchasingInfoRecord,
      _PurchasingDocument,
      _PurchasingDocumentItem,
      _PurchaseRequisitionItem,
      _Supplier,
      _ChangeNumber,
      _BOMExplosion,
      _Assembly,
      _VariableSizeCompUnit,
      _VariableSize1To3Unit,
      _FollowUpMaterial,
      _MatlCompDiscontinuationType,
      _ProvisionType,
      _SparePartType,
      _LeadTimeOffsetUnit,
      _Language,
      _BaseUnit,
      _EntryUnit  
}
where mdsb.bdart = 'BB';  //Subcontracting

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"RESB",
"TCS03"
],
"ASSOCIATED":
[
"I_ACCOUNTASSIGNMENTCATEGORY",
"I_BATCH",
"I_BOMEXPLOSIONDATE",
"I_BUSINESSAREA",
"I_CHANGEMASTER",
"I_CONSUMPTIONPOSTING",
"I_DEBITCREDITCODE",
"I_FUNCTIONALAREA",
"I_GLACCOUNT",
"I_GOODSMOVEMENTTYPE",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_INVTRYSPECIALSTOCKVALNTYPE",
"I_LANGUAGE",
"I_LOGISTICSORDER",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_MATLCOMPDISCONTINUATIONTYPE",
"I_MATLCOMPPROVISIONTYPE",
"I_MATLCOMPSPAREPARTTYPE",
"I_PLANNEDORDER",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTIONSUPPLYAREA",
"I_PRODUCTPLANTBASIC",
"I_PRODUCTSTORAGELOCATIONBASIC",
"I_PRODUCTSUPPLYPLANNING",
"I_PRODUCTUNITSOFMEASURE",
"I_PURCHASEREQUISITIONITEMAPI01",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCHASINGGROUP",
"I_PURCHASINGINFORECORDAPI01",
"I_RESERVATIONDOCRECORDTYPE",
"I_RESERVATIONDOCUMENTHEADER",
"I_RESERVATIONDOCUMENTITEM",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/