P_MRPPRODDEMANDAGGREGATION
P_MRPPRODDEMANDAGGREGATION is a CDS View in S/4HANA. It contains 3 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_CacheMRPMfgOrder | view | left_outer | COMPOSITE | Cache MRP Manufacturing Orders |
Fields (3)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| MaximumDelayedQuantity | MaximumDelayedQuantity | 1 | |
| MaximumUncoveredQuantity | MaximumUncoveredQuantity | 1 | |
| NumberOfUncoveredDemandItems | NumberOfUncoveredDemandItems | 1 |
@AbapCatalog.sqlViewName: 'PMRPPRODDEMAGGR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl: {authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #NOT_REQUIRED
}
@ObjectModel: {
usageType: {serviceQuality: #C, sizeCategory: #XXL, dataClass: #MIXED }
}
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_MRPProdDemandAggregation
as select from I_MRPPlanningSegment as MRPPlanningSegment
left outer join I_MaterialShortageDefinition as ShortageDefinition on MRPPlanningSegment.MaterialShortageProfile = ShortageDefinition.MaterialShortageProfile
and ShortageDefinition.HasMfgOrderComponentCheckRule = 'X'
left outer join I_CacheSupplyDemandItem as CacheSupDemItem on CacheSupDemItem.MRPPlanningSegmentType = MRPPlanningSegment.MRPPlanningSegmentType
and CacheSupDemItem.MRPPlanningSegment = MRPPlanningSegment.MRPPlanningSegment
and CacheSupDemItem.MaterialShortageProfile = ShortageDefinition.MaterialShortageProfile
and CacheSupDemItem.NumberOfShortages = ShortageDefinition.MaterialShortageProfileCount
and CacheSupDemItem.MRPPlant = MRPPlanningSegment.MRPPlant
and CacheSupDemItem.Material = MRPPlanningSegment.Material
and CacheSupDemItem.MRPArea = MRPPlanningSegment.MRPArea
and (
CacheSupDemItem.MRPElementCategory = 'SB'
or CacheSupDemItem.MRPElementCategory = 'SM'
or CacheSupDemItem.MRPElementCategory = 'SU'
or CacheSupDemItem.MRPElementCategory = 'AR'
)
and (
CacheSupDemItem.SourceMRPElementCategory = 'BR'
or CacheSupDemItem.SourceMRPElementCategory = 'FE'
or CacheSupDemItem.SourceMRPElementCategory = 'IH'
or CacheSupDemItem.SourceMRPElementCategory = 'NE'
)
and (
CacheSupDemItem.MRPElementUncoveredQuantity > 0
or CacheSupDemItem.MRPElementDelayedQuantity > 0
)
{
key MRPPlanningSegment.MRPPlanningSegmentType,
key MRPPlanningSegment.MRPPlanningSegment,
key ShortageDefinition.MaterialShortageProfile,
key ShortageDefinition.MaterialShortageProfileCount,
key CacheSupDemItem.SourceMRPElement,
key CacheSupDemItem.SourceMRPElementCategory,
max(CacheSupDemItem.MaximumDelayInDays) as MaximumDelayInDays,
max(CacheSupDemItem.MaximumDelayInWorkdays) as MaximumDelayInWorkdays,
max(CacheSupDemItem.MRPElementDelayedQuantity) as MaximumDelayedQuantity,
max(CacheSupDemItem.MRPElementUncoveredQuantity) as MaximumUncoveredQuantity,
count(*) as NumberOfUncoveredDemandItems
}
group by
MRPPlanningSegment.MRPPlanningSegmentType,
MRPPlanningSegment.MRPPlanningSegment,
ShortageDefinition.MaterialShortageProfile,
ShortageDefinition.MaterialShortageProfileCount,
CacheSupDemItem.SourceMRPElementCategory,
CacheSupDemItem.SourceMRPElement;