I_MasterRecipeComponentAlloc

DDL: I_MASTERRECIPECOMPONENTALLOC SQL: IMSTRRCPCOMPALC Type: view COMPOSITE Package: VDM_PP_MD_MRC

Master Recipe Component Allocation Details

I_MasterRecipeComponentAlloc is a Composite CDS View that provides data about "Master Recipe Component Allocation Details" in SAP S/4HANA. It reads from 3 data sources (I_MaterialBOM, I_MfgBOOOpBOMItemChangeState, I_MasterRecipeMaterialAssgmt) and exposes 30 fields with key fields BillOfOperationsType, BillOfOperationsGroup, BillOfOperationsVariant, BOOOperationInternalID, BOOOpBOMItemInternalID. It has 2 associations to related views. Part of development package VDM_PP_MD_MRC.

Data Sources (3)

SourceAliasJoin Type
I_MaterialBOM _BOM inner
I_MfgBOOOpBOMItemChangeState _CompAlloc from
I_MasterRecipeMaterialAssgmt _MatlAssgmt inner

Associations (2)

CardinalityTargetAliasCondition
[1..*] I_BillOfMaterialItemBasic _BOMItem $projection.BillOfMaterialCategory = _BOMItem.BillOfMaterialCategory and $projection.BillOfMaterial = _BOMItem.BillOfMaterial and $projection.BillOfMaterialItemNodeNumber = _BOMItem.InheritedNodeNumberForBOMItem and _CompAlloc.ValidityEndDate >= _BOMItem.ValidityStartDate and _CompAlloc.ValidityStartDate <= _BOMItem.ValidityEndDate and _BOMItem.ValidityEndDate >= $session.system_date and _BOMItem.IsDeleted <> 'X'
[0..*] I_ProductionVersion _ProdnVers $projection.Material = _ProdnVers.Material and $projection.Plant = _ProdnVers.Plant and $projection.BillOfOperationsType = _ProdnVers.BillOfOperationsType and $projection.BillOfOperationsGroup = _ProdnVers.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _ProdnVers.BillOfOperationsVariant and $projection.BillOfMaterialVariant = _ProdnVers.BillOfMaterialVariant and $projection.BillOfMaterialVariantUsage = _ProdnVers.BillOfMaterialVariantUsage and _CompAlloc.ValidityEndDate >= _ProdnVers.ValidityStartDate and _CompAlloc.ValidityStartDate <= _ProdnVers.ValidityEndDate and _ProdnVers.ValidityEndDate >= $session.system_date

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IMSTRRCPCOMPALC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey BOOOpBOMItemIntVersCounter view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Master Recipe Component Allocation Details view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view
Metadata.allowExtensions true view

Fields (30)

KeyFieldSource TableSource FieldDescription
KEY BillOfOperationsType I_MfgBOOOpBOMItemChangeState BillOfOperationsType
KEY BillOfOperationsGroup I_MfgBOOOpBOMItemChangeState BillOfOperationsGroup
KEY BillOfOperationsVariant I_MfgBOOOpBOMItemChangeState BillOfOperationsVariant
KEY BOOOperationInternalID BOOOperationInternalID
KEY BOOOpBOMItemInternalID BOOOpBOMItemInternalID
KEY BOOOpBOMItemIntVersCounter BOOOpBOMItemIntVersCounter
KEY BOMItemInternalChangeCount _BOMItem BOMItemInternalChangeCount
ValidityStartDateendasValidityStartDate
ValidityEndDateendendasValidityEndDate
CreationDate I_MfgBOOOpBOMItemChangeState CreationDate
CreatedByUser I_MfgBOOOpBOMItemChangeState CreatedByUser
LastChangeDate I_MfgBOOOpBOMItemChangeState LastChangeDate
LastChangedByUser I_MfgBOOOpBOMItemChangeState LastChangedByUser
IsDeleted I_MfgBOOOpBOMItemChangeState IsDeleted
IsImplicitlyDeleted I_MfgBOOOpBOMItemChangeState IsImplicitlyDeleted
ChangeNumber I_MfgBOOOpBOMItemChangeState ChangeNumber
Material I_MasterRecipeMaterialAssgmt Material
Plant I_MasterRecipeMaterialAssgmt Plant
ProductionVersion _ProdnVers ProductionVersion
BillOfMaterialCategory I_MfgBOOOpBOMItemChangeState BillOfMaterialCategory
BillOfMaterial I_MfgBOOOpBOMItemChangeState BillOfMaterial
BillOfMaterialVariant I_MfgBOOOpBOMItemChangeState BillOfMaterialVariant
BillOfMaterialVariantUsage I_MaterialBOM BillOfMaterialVariantUsage
BillOfMaterialItemNodeNumber I_MfgBOOOpBOMItemChangeState BillOfMaterialItemNodeNumber
BillOfMaterialItemCategory _BOMItem BillOfMaterialItemCategory
BillOfMaterialItemNumber _BOMItem BillOfMaterialItemNumber
BillOfMaterialComponent _BOMItem BillOfMaterialComponent
BillOfMaterialItemQuantity _BOMItem BillOfMaterialItemQuantity
BillOfMaterialItemUnit _BOMItem BillOfMaterialItemUnit
MatlCompIsMarkedForBackflush MatlCompIsMarkedForBackflush
@AbapCatalog.sqlViewName: 'IMSTRRCPCOMPALC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'BOOOpBOMItemIntVersCounter'
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Master Recipe Component Allocation Details'
@ObjectModel.usageType: { serviceQuality: #D, sizeCategory: #XXL, dataClass: #MASTER }
@Metadata.allowExtensions: true
define view I_MasterRecipeComponentAlloc
  as select from I_MfgBOOOpBOMItemChangeState as _CompAlloc
    inner join   I_MaterialBOM                as _BOM        on  _CompAlloc.BillOfMaterialCategory =  _BOM.BillOfMaterialCategory
                                                             and _CompAlloc.BillOfMaterial         =  _BOM.BillOfMaterial
                                                             and _CompAlloc.BillOfMaterialVariant  =  _BOM.BillOfMaterialVariant
                                                             and _CompAlloc.ValidityEndDate        >= _BOM.HeaderValidityStartDate
                                                             and _CompAlloc.ValidityStartDate      <= _BOM.HeaderValidityEndDate
                                                             and _BOM.HeaderValidityEndDate        >= $session.system_date
    inner join   I_MasterRecipeMaterialAssgmt as _MatlAssgmt on  _CompAlloc.BillOfOperationsType    =  _MatlAssgmt.BillOfOperationsType
                                                             and _CompAlloc.BillOfOperationsGroup   =  _MatlAssgmt.BillOfOperationsGroup
                                                             and _CompAlloc.BillOfOperationsVariant =  _MatlAssgmt.BillOfOperationsVariant
                                                             and _CompAlloc.ValidityEndDate         >= _MatlAssgmt.ValidityStartDate
                                                             and _CompAlloc.ValidityStartDate       <= _MatlAssgmt.ValidityEndDate
                                                             and _BOM.Material                      =  _MatlAssgmt.Material
                                                             and _BOM.Plant                         =  _MatlAssgmt.Plant
                                                             and _MatlAssgmt.ValidityEndDate        >= $session.system_date
  association [1..*] to I_BillOfMaterialItemBasic as _BOMItem   on  $projection.BillOfMaterialCategory       =  _BOMItem.BillOfMaterialCategory
                                                                and $projection.BillOfMaterial               =  _BOMItem.BillOfMaterial
                                                                and $projection.BillOfMaterialItemNodeNumber =  _BOMItem.InheritedNodeNumberForBOMItem
                                                                and _CompAlloc.ValidityEndDate               >= _BOMItem.ValidityStartDate
                                                                and _CompAlloc.ValidityStartDate             <= _BOMItem.ValidityEndDate
                                                                and _BOMItem.ValidityEndDate                 >= $session.system_date
                                                                and _BOMItem.IsDeleted                       <> 'X'
  association [0..*] to I_ProductionVersion       as _ProdnVers on  $projection.Material                   =  _ProdnVers.Material
                                                                and $projection.Plant                      =  _ProdnVers.Plant
                                                                and $projection.BillOfOperationsType       =  _ProdnVers.BillOfOperationsType
                                                                and $projection.BillOfOperationsGroup      =  _ProdnVers.BillOfOperationsGroup
                                                                and $projection.BillOfOperationsVariant    =  _ProdnVers.BillOfOperationsVariant
                                                                and $projection.BillOfMaterialVariant      =  _ProdnVers.BillOfMaterialVariant
                                                                and $projection.BillOfMaterialVariantUsage =  _ProdnVers.BillOfMaterialVariantUsage
                                                                and _CompAlloc.ValidityEndDate             >= _ProdnVers.ValidityStartDate
                                                                and _CompAlloc.ValidityStartDate           <= _ProdnVers.ValidityEndDate
                                                                and _ProdnVers.ValidityEndDate             >= $session.system_date
{
      //_CompAlloc

  key _CompAlloc.BillOfOperationsType,
  key _CompAlloc.BillOfOperationsGroup,
  key _CompAlloc.BillOfOperationsVariant,
  key BOOOperationInternalID,
  key BOOOpBOMItemInternalID,
  key BOOOpBOMItemIntVersCounter,
  key _BOMItem.BOMItemInternalChangeCount,
      case
      when _CompAlloc.ValidityStartDate > _BOMItem.ValidityStartDate
      then _CompAlloc.ValidityStartDate
      else _BOMItem.ValidityStartDate
      end as ValidityStartDate,
      case
      when _CompAlloc.ValidityEndDate < _BOMItem.ValidityEndDate
      then _CompAlloc.ValidityEndDate
      else case
           when _BOMItem.ValidityEndDate > _BOMItem.ValidityStartDate
           then dats_add_days( _BOMItem.ValidityEndDate, -1, 'UNCHANGED' )
           else _BOMItem.ValidityEndDate
           end
      end as ValidityEndDate,
      _CompAlloc.CreationDate,
      _CompAlloc.CreatedByUser,
      _CompAlloc.LastChangeDate,
      _CompAlloc.LastChangedByUser,
      _CompAlloc.IsDeleted,
      _CompAlloc.IsImplicitlyDeleted,
      _CompAlloc.ChangeNumber,
      _MatlAssgmt.Material,
      _MatlAssgmt.Plant,
      _ProdnVers.ProductionVersion,
      _CompAlloc.BillOfMaterialCategory,
      _CompAlloc.BillOfMaterial,
      _CompAlloc.BillOfMaterialVariant,
      _BOM.BillOfMaterialVariantUsage,
      _CompAlloc.BillOfMaterialItemNodeNumber,
      _BOMItem.BillOfMaterialItemCategory,
      _BOMItem.BillOfMaterialItemNumber,
      _BOMItem.BillOfMaterialComponent,
      _BOMItem.BillOfMaterialItemQuantity,
      _BOMItem.BillOfMaterialItemUnit,
      MatlCompIsMarkedForBackflush
}
where
      _CompAlloc.BillOfOperationsType =  '2'
  and _CompAlloc.ValidityEndDate      >= _CompAlloc.ValidityStartDate