P_DemandDrivenExtdProduct

DDL: P_DEMANDDRIVENEXTDPRODUCT Type: view_entity COMPOSITE Package: PPH_DD_VDM_STLM

Demand Driven Product Details

P_DemandDrivenExtdProduct is a Composite CDS View that provides data about "Demand Driven Product Details" in SAP S/4HANA. It reads from 7 data sources and exposes 95 fields with key fields Material, Plant, MRPArea, Plant, MRPArea. Part of development package PPH_DD_VDM_STLM.

Data Sources (7)

SourceAliasJoin Type
I_BufferedMaterialPlant1 _BufMatPlant inner
I_BufferedMaterialPlant1 _BufMatPlant inner
I_DemandDrivenProduct _ddProduct from
I_DemandDrivenProduct _ddProduct union_all
I_MaterialMRPArea _MaterialMRPArea inner
I_SDMAreaOfResponsibility _SDMAreaOfResponsibility inner
I_SDMAreaOfResponsibility _SDMAreaOfResponsibility inner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Demand Driven Product Details view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (95)

KeyFieldSource TableSource FieldDescription
KEY Material I_DemandDrivenProduct Material
KEY Plant I_DemandDrivenProduct Plant
KEY MRPArea I_DemandDrivenProduct MRPArea
MRPController I_MaterialMRPArea MRPController
MRPType I_MaterialMRPArea MRPType
LotSizingProcedure I_MaterialMRPArea LotSizingProcedure
MinimumLotSizeQuantity I_MaterialMRPArea MinimumLotSizeQuantity
PlanningTimeFence I_MaterialMRPArea PlanningTimeFence
ReorderThresholdQuantity I_MaterialMRPArea ReorderThresholdQuantity
MaterialMaxStockLevelQuantity I_MaterialMRPArea MaterialMaxStockLevelQuantity
SafetyStockQuantity I_MaterialMRPArea SafetyStockQuantity
ConsumptionCode I_DemandDrivenProduct ConsumptionCode
ConsumptionMode I_DemandDrivenProduct ConsumptionMode
ProductConsumptionAmount I_DemandDrivenProduct ProductConsumptionAmount
Currency I_DemandDrivenProduct Currency
VariabilityCode I_DemandDrivenProduct VariabilityCode
VariabilityMode I_DemandDrivenProduct VariabilityMode
VariabilityQuantity I_DemandDrivenProduct VariabilityQuantity
VariabilityUnit I_DemandDrivenProduct VariabilityUnit
ReplenishmentLeadTimeCode I_DemandDrivenProduct ReplenishmentLeadTimeCode
ReplenishmentLeadTimeMode I_DemandDrivenProduct ReplenishmentLeadTimeMode
ProcurementType I_DemandDrivenProduct ProcurementType
ReplenishmentLeadTimeValue I_DemandDrivenProduct ReplenishmentLeadTimeValue
BOMUsageCode I_DemandDrivenProduct BOMUsageCode
BOMUsageMode I_DemandDrivenProduct BOMUsageMode
BOMUsageValue I_DemandDrivenProduct BOMUsageValue
IndividualLeadTime I_DemandDrivenProduct IndividualLeadTime
SpikeHorizonConstant I_DemandDrivenProduct SpikeHorizonConstant
SpikeHorizonMultiplier I_DemandDrivenProduct SpikeHorizonMultiplier
SpikeThresholdFactor I_DemandDrivenProduct SpikeThresholdFactor
DecoupledLeadTime I_DemandDrivenProduct DecoupledLeadTime
HorizonDaysInPast I_DemandDrivenProduct HorizonDaysInPast
HorizonDaysInFuture I_DemandDrivenProduct HorizonDaysInFuture
PastHorizonDLTMultiplierValue I_DemandDrivenProduct PastHorizonDLTMultiplierValue
FutureHrznDLTMultiplierValue I_DemandDrivenProduct FutureHrznDLTMultiplierValue
DDScopeProduct I_DemandDrivenProduct DDScopeProduct
CreatedByUser I_DemandDrivenProduct CreatedByUser
LastChangedByUser I_DemandDrivenProduct LastChangedByUser
CreationDateTime I_DemandDrivenProduct CreationDateTime
LastChangeDateTime I_DemandDrivenProduct LastChangeDateTime
IsBulkMaterial I_BufferedMaterialPlant1 IsBulkMaterial
IsPhantomItem I_BufferedMaterialPlant1 IsPhantomItem
BaseUnit I_BufferedMaterialPlant1 BaseUnit
ProductGroup I_BufferedMaterialPlant1 ProductGroup
_MatStatus I_BufferedMaterialPlant1 _MatStatus
AuthorizationGroup I_BufferedMaterialPlant1 AuthorizationGroup
ProductTypeAuthorizationGroup I_BufferedMaterialPlant1 ProductTypeAuthorizationGroup
Material
KEY Plant I_DemandDrivenProduct Plant
KEY MRPArea I_DemandDrivenProduct Plant
MRPController I_BufferedMaterialPlant1 MRPController
MRPType I_BufferedMaterialPlant1 MRPType
LotSizingProcedure I_BufferedMaterialPlant1 LotSizingProcedure
MinimumLotSizeQuantity I_BufferedMaterialPlant1 MinimumLotSizeQuantity
PlanningTimeFence I_BufferedMaterialPlant1 PlanningTimeFence
ReorderThresholdQuantity I_BufferedMaterialPlant1 ReorderThresholdQuantity
MaterialMaxStockLevelQuantity I_BufferedMaterialPlant1 MaterialMaxStockLevelQuantity
SafetyStockQuantity I_BufferedMaterialPlant1 SafetyStockQuantity
ConsumptionCode I_DemandDrivenProduct ConsumptionCode
ConsumptionMode I_DemandDrivenProduct ConsumptionMode
ProductConsumptionAmount I_DemandDrivenProduct ProductConsumptionAmount
Currency I_DemandDrivenProduct Currency
VariabilityCode I_DemandDrivenProduct VariabilityCode
VariabilityMode I_DemandDrivenProduct VariabilityMode
VariabilityQuantity I_DemandDrivenProduct VariabilityQuantity
VariabilityUnit I_DemandDrivenProduct VariabilityUnit
ReplenishmentLeadTimeCode I_DemandDrivenProduct ReplenishmentLeadTimeCode
ReplenishmentLeadTimeMode I_DemandDrivenProduct ReplenishmentLeadTimeMode
ProcurementType I_DemandDrivenProduct ProcurementType
ReplenishmentLeadTimeValue I_DemandDrivenProduct ReplenishmentLeadTimeValue
BOMUsageCode I_DemandDrivenProduct BOMUsageCode
BOMUsageMode I_DemandDrivenProduct BOMUsageMode
BOMUsageValue I_DemandDrivenProduct BOMUsageValue
IndividualLeadTime I_DemandDrivenProduct IndividualLeadTime
SpikeHorizonConstant I_DemandDrivenProduct SpikeHorizonConstant
SpikeHorizonMultiplier I_DemandDrivenProduct SpikeHorizonMultiplier
SpikeThresholdFactor I_DemandDrivenProduct SpikeThresholdFactor
DecoupledLeadTime I_DemandDrivenProduct DecoupledLeadTime
HorizonDaysInPast I_DemandDrivenProduct HorizonDaysInPast
HorizonDaysInFuture I_DemandDrivenProduct HorizonDaysInFuture
PastHorizonDLTMultiplierValue I_DemandDrivenProduct PastHorizonDLTMultiplierValue
FutureHrznDLTMultiplierValue I_DemandDrivenProduct FutureHrznDLTMultiplierValue
DDScopeProduct I_DemandDrivenProduct DDScopeProduct
CreatedByUser I_DemandDrivenProduct CreatedByUser
LastChangedByUser I_DemandDrivenProduct LastChangedByUser
CreationDateTime I_DemandDrivenProduct CreationDateTime
LastChangeDateTime I_DemandDrivenProduct LastChangeDateTime
IsBulkMaterial I_BufferedMaterialPlant1 IsBulkMaterial
IsPhantomItem I_BufferedMaterialPlant1 IsPhantomItem
BaseUnit I_BufferedMaterialPlant1 BaseUnit
ProductGroup I_BufferedMaterialPlant1 ProductGroup
_MatStatus I_BufferedMaterialPlant1 _MatStatus
AuthorizationGroup I_BufferedMaterialPlant1 AuthorizationGroup
ProductTypeAuthorizationGroup I_BufferedMaterialPlant1 ProductTypeAuthorizationGroup
ProductGroupAuthorizationGroup I_BufferedMaterialPlant1 ProductGroupAuthorizationGroup
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Demand Driven Product Details'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view entity P_DemandDrivenExtdProduct 
as select from I_DemandDrivenProduct as _ddProduct 

inner join  I_MaterialMRPArea as _MaterialMRPArea on _MaterialMRPArea.Material = _ddProduct.Material
                                                        and _MaterialMRPArea.Plant = _ddProduct.Plant
                                                        and _MaterialMRPArea.MRPArea = _ddProduct.MRPArea

inner join I_SDMAreaOfResponsibility as _SDMAreaOfResponsibility  on _SDMAreaOfResponsibility.Plant = _MaterialMRPArea.Plant 
                                                          and _SDMAreaOfResponsibility.MRPController = _MaterialMRPArea.MRPController
                                                          and _SDMAreaOfResponsibility.UserID = $session.user   

inner join I_BufferedMaterialPlant1 as _BufMatPlant on  _BufMatPlant.Material = _MaterialMRPArea.Material
                                                                and _BufMatPlant.Plant = _SDMAreaOfResponsibility.Plant
{

  key   _ddProduct.Material,
  key   _ddProduct.Plant,
  key   _ddProduct.MRPArea,
        _MaterialMRPArea.MRPController,
        _MaterialMRPArea.MRPType,
        _MaterialMRPArea.LotSizingProcedure,
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _MaterialMRPArea.MinimumLotSizeQuantity,
        _MaterialMRPArea.PlanningTimeFence,
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _MaterialMRPArea.ReorderThresholdQuantity,
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _MaterialMRPArea.MaterialMaxStockLevelQuantity,
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _MaterialMRPArea.SafetyStockQuantity,
        
        //DD Product Fields

        _ddProduct.ConsumptionCode,
        _ddProduct.ConsumptionMode,
             
        @Semantics.amount.currencyCode: 'Currency'
        _ddProduct.ProductConsumptionAmount,
        _ddProduct.Currency,
        _ddProduct.VariabilityCode,
        _ddProduct.VariabilityMode,
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _ddProduct.VariabilityQuantity,
        _ddProduct.VariabilityUnit,
        _ddProduct.ReplenishmentLeadTimeCode,
        _ddProduct.ReplenishmentLeadTimeMode,
        _ddProduct.ProcurementType,
        _ddProduct.ReplenishmentLeadTimeValue,
        _ddProduct.BOMUsageCode,
        _ddProduct.BOMUsageMode,
        _ddProduct.BOMUsageValue,
        _ddProduct.IndividualLeadTime,
        _ddProduct.SpikeHorizonConstant,
        _ddProduct.SpikeHorizonMultiplier,
        _ddProduct.SpikeThresholdFactor,
        cast(
          case
            when _ddProduct.LeadTimeCalculationMethod = ''
              then 'HCRE'
          else
            _ddProduct.LeadTimeCalculationMethod
          end as pph_leadtime_calc_method )                                          as LeadTimeCalculationMethod,
        _ddProduct.DecoupledLeadTime,
        _ddProduct.HorizonDaysInPast,
        _ddProduct.HorizonDaysInFuture,
        _ddProduct.PastHorizonDLTMultiplierValue,
        _ddProduct.FutureHrznDLTMultiplierValue,
        _ddProduct.DDScopeProduct,
        _ddProduct.CreatedByUser,
        _ddProduct.LastChangedByUser,
        _ddProduct.CreationDateTime,
        _ddProduct.LastChangeDateTime,
        _BufMatPlant.IsBulkMaterial,
        _BufMatPlant.IsPhantomItem,
        _BufMatPlant.BaseUnit,
        _BufMatPlant.ProductGroup,
        _BufMatPlant._MatStatus,
        
        _BufMatPlant.AuthorizationGroup,
        _BufMatPlant.ProductTypeAuthorizationGroup,
        _BufMatPlant.ProductGroupAuthorizationGroup      
}
where
   _MaterialMRPArea.DeletionIndicator <> 'X'
   and
   _ddProduct.Plant != _ddProduct.MRPArea
   and
   (_BufMatPlant.CrossPlantStatus is null or _BufMatPlant.CrossPlantStatus is initial)
   and
   (_BufMatPlant.MRPMaterialStatus is null or _BufMatPlant.MRPMaterialStatus is initial)
   and
   _BufMatPlant.IsBulkMaterial = ''
   and
   (_BufMatPlant.IsPhantomItem = '' or _BufMatPlant.IsPhantomItem is null)
   
union all 
  select from I_DemandDrivenProduct   as _ddProduct

inner join I_BufferedMaterialPlant1 as _BufMatPlant on  _BufMatPlant.Material = _ddProduct.Material  
                                                    and _BufMatPlant.Plant = _ddProduct.Plant       

inner join I_SDMAreaOfResponsibility as _SDMAreaOfResponsibility  on  _SDMAreaOfResponsibility.Plant = _BufMatPlant.Plant  
                                                  and _SDMAreaOfResponsibility.MRPController = _BufMatPlant.MRPController  
                                                  and _SDMAreaOfResponsibility.UserID = $session.user 
{

  key  _ddProduct.Material,
  key  _ddProduct.Plant,
  key  _ddProduct.Plant   as MRPArea,
       _BufMatPlant.MRPController,
       _BufMatPlant.MRPType,
       _BufMatPlant.LotSizingProcedure,
       _BufMatPlant.MinimumLotSizeQuantity,
       _BufMatPlant.PlanningTimeFence,
       _BufMatPlant.ReorderThresholdQuantity,
       _BufMatPlant.MaterialMaxStockLevelQuantity,
       _BufMatPlant.SafetyStockQuantity,
       
       //DD Product Fields

       _ddProduct.ConsumptionCode,
       _ddProduct.ConsumptionMode,
       
        _ddProduct.ProductConsumptionAmount,
        _ddProduct.Currency,
        _ddProduct.VariabilityCode,
        _ddProduct.VariabilityMode,
        _ddProduct.VariabilityQuantity,
        _ddProduct.VariabilityUnit,
        _ddProduct.ReplenishmentLeadTimeCode,
        _ddProduct.ReplenishmentLeadTimeMode,
        _ddProduct.ProcurementType,
        _ddProduct.ReplenishmentLeadTimeValue,
        _ddProduct.BOMUsageCode,
        _ddProduct.BOMUsageMode,
        _ddProduct.BOMUsageValue,
        _ddProduct.IndividualLeadTime,
        _ddProduct.SpikeHorizonConstant,
        _ddProduct.SpikeHorizonMultiplier,
        _ddProduct.SpikeThresholdFactor,
        cast(
          case
            when _ddProduct.LeadTimeCalculationMethod = ''
              then 'HCRE'
          else
            _ddProduct.LeadTimeCalculationMethod
          end as pph_leadtime_calc_method )                                          as LeadTimeCalculationMethod,
        _ddProduct.DecoupledLeadTime,
        _ddProduct.HorizonDaysInPast,
        _ddProduct.HorizonDaysInFuture,
        _ddProduct.PastHorizonDLTMultiplierValue,
        _ddProduct.FutureHrznDLTMultiplierValue,
        _ddProduct.DDScopeProduct,
        _ddProduct.CreatedByUser,
        _ddProduct.LastChangedByUser,
        _ddProduct.CreationDateTime,
        _ddProduct.LastChangeDateTime,
        _BufMatPlant.IsBulkMaterial,
        _BufMatPlant.IsPhantomItem,
        _BufMatPlant.BaseUnit,
        _BufMatPlant.ProductGroup,
        _BufMatPlant._MatStatus,      
        _BufMatPlant.AuthorizationGroup,
        _BufMatPlant.ProductTypeAuthorizationGroup,
        _BufMatPlant.ProductGroupAuthorizationGroup   
}where
_BufMatPlant.DeletionIndicator <> 'X'
and
_ddProduct.Plant = _ddProduct.MRPArea
and
(_BufMatPlant.CrossPlantStatus is null or _BufMatPlant.CrossPlantStatus is initial)
and
(_BufMatPlant.MRPMaterialStatus is null or _BufMatPlant.MRPMaterialStatus is initial)
and
_BufMatPlant.IsBulkMaterial = ''
and
(_BufMatPlant.IsPhantomItem = '' or _BufMatPlant.IsPhantomItem is null)