I_MRPMATERIALCOVERAGE
MRP Material Coverage without Supplier
I_MRPMATERIALCOVERAGE is a CDS View in S/4HANA. MRP Material Coverage without Supplier. It contains 85 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaterialCoverage | view | from | CONSUMPTION | MRP Material Coverage Net Segment |
| C_MaterialCoverageIndivSegment | view | from | CONSUMPTION | MRP Material Coverage Individual Segment |
| C_MRPExtRqmtMaterialOverview | view_entity | from | CONSUMPTION | MRP External Requirement Matl Overview |
Fields (85)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | FactoryCalendar | FactoryCalendar | 3 |
| KEY | Material | Material | 3 |
| KEY | MaterialShortageProfile | MaterialShortageProfile | 3 |
| KEY | MaterialShortageProfileCount | MaterialShortageProfileCount | 3 |
| KEY | MRPArea | MRPArea | 3 |
| KEY | MRPPlanningSegment | MRPPlanningSegment | 3 |
| KEY | MRPPlanningSegmentType | MRPPlanningSegmentType | 1 |
| KEY | MRPPlant | MRPPlant | 3 |
| _UnitOfMeasure | _UnitOfMeasure | 2 | |
| AvailabilityChart | AvailabilityChart | 1 | |
| Customer | Customer | 1 | |
| CustomerName | CustomerName | 1 | |
| DaysOfSupplyCriticality | DaysOfSupplyCriticality | 2 | |
| DaysOfSupplyDuration | DaysOfSupplyDuration | 3 | |
| EvaluationHorizonInDays | EvaluationHorizonInDays | 2 | |
| HasAcceptedShortage | HasAcceptedShortage | 2 | |
| HasShortageManualPlanHorizon | HasShortageManualPlanHorizon | 2 | |
| HasShortageMRPSafetyDuration | HasShortageMRPSafetyDuration | 2 | |
| HasShortageTotalReplnmtLead | HasShortageTotalReplnmtLead | 2 | |
| IntraDaySupplyDuration | IntraDaySupplyDuration | 2 | |
| IsMarkedForDeletion | IsMarkedForDeletion | 2 | |
| IssueCount | IssueCount | 2 | |
| LowLevelCode | LowLevelCode | 2 | |
| ManualPlanningHorizonEndDate | ManualPlanningHorizonEndDate | 2 | |
| MaterialABCClassification | MaterialABCClassification | 3 | |
| MaterialBaseUnit | MaterialBaseUnit | 1 | |
| MaterialCompIsProcuredDirectly | MaterialCompIsProcuredDirectly | 1 | |
| MaterialFirstShortageDate | MaterialFirstShortageDate | 1 | |
| MaterialFirstShortageDateQty | MaterialFirstShortageDateQty | 1 | |
| MaterialGoodsReceiptDuration | MaterialGoodsReceiptDuration | 3 | |
| MaterialGroup | MaterialGroup | 3 | |
| MaterialGroupName | MaterialGroupName | 3 | |
| MaterialName | MaterialName | 3 | |
| MaterialPlannedDeliveryDurn | MaterialPlannedDeliveryDurn | 1 | |
| MaterialPlannedProductionDurn | MaterialPlannedProductionDurn | 3 | |
| MaterialProcurementCategory | MaterialProcurementCategory | 3 | |
| MaterialProcurementProfile | MaterialProcurementProfile | 2 | |
| MaterialReorderPointQty | MaterialReorderPointQty | 1 | |
| MaterialSafetyStockQty | MaterialSafetyStockQty | 1 | |
| MaterialShortageDefinitionName | MaterialShortageDefinitionName | 2 | |
| MaterialShortageDuration | MaterialShortageDuration | 2 | |
| MaterialShortageDurnInWorkdays | MaterialShortageDurnInWorkdays | 2 | |
| MaterialShortageEndDate | MaterialShortageEndDate | 3 | |
| MaterialShortageQuantity | MaterialShortageQuantity | 1 | |
| MaterialShortageStartDate | MaterialShortageStartDate | 3 | |
| MaterialType | MaterialType | 3 | |
| MaterialTypeName | MaterialTypeName | 3 | |
| MatlMaxCoverageDurnInWorkdays | MatlMaxCoverageDurnInWorkdays | 1 | |
| MatlPlngProjectNetwork | MatlPlngProjectNetwork | 1 | |
| MRPAvailableStockQty | MRPAvailableStockQty | 3 | |
| MRPController | MRPController | 3 | |
| MRPGroup | MRPGroup | 2 | |
| MRPMaterialNoteText | MRPMaterialNoteText | 2 | |
| MRPPlanningSegmentExternalCode | MRPPlanningSegmentExternalCode | 1 | |
| MRPSafetyDuration | MRPSafetyDuration | 2 | |
| MRPSafetyDurationEndDate | MRPSafetyDurationEndDate | 2 | |
| MRPSafetyStockMethod | MRPSafetyStockMethod | 2 | |
| MRPType | MRPType | 1 | |
| MRPValidMaterialStatus | MRPValidMaterialStatus | 2 | |
| NumberOfCancelProcesses | NumberOfCancelProcesses | 2 | |
| NumberOfPastDueEndDateElements | NumberOfPastDueEndDateElements | 2 | |
| NumberOfPastDueStartDateElmnts | NumberOfPastDueStartDateElmnts | 2 | |
| NumberOfRescheduleOutElements | NumberOfRescheduleOutElements | 2 | |
| NumberOfSupplier | NumberOfSupplier | 2 | |
| PlanningSegmentDocumentItem | PlanningSegmentDocumentItem | 1 | |
| PlanningTimeFenceInDays | PlanningTimeFenceInDays | 2 | |
| PlantLanguage | PlantLanguage | 2 | |
| ProductionProductHierarchy | ProductionProductHierarchy | 2 | |
| ProductionProductHierarchyNode | ProductionProductHierarchyNode | 2 | |
| ProjectInternalID | ProjectInternalID | 1 | |
| PurchasingGroup | PurchasingGroup | 1 | |
| ResponsiblePerson | ResponsiblePerson | 1 | |
| ScheduleAgreementHasReleaseDoc | ScheduleAgreementHasReleaseDoc | 1 | |
| SegmentationStrategy | SegmentationStrategy | 1 | |
| StockDaysSupplyCriticality | StockDaysSupplyCriticality | 2 | |
| StockDaysSupplyDuration | StockDaysSupplyDuration | 2 | |
| StockIntraDaySupplyDuration | StockIntraDaySupplyDuration | 2 | |
| TimeTillShortageInCalendarDays | TimeTillShortageInCalendarDays | 2 | |
| TotalReplenishmentLeadDuration | TotalReplenishmentLeadDuration | 3 | |
| TotalReplnmtLeadDurnEndDate | TotalReplnmtLeadDurnEndDate | 2 | |
| UnitOfMeasureDspNmbrOfDcmls | UnitOfMeasureDspNmbrOfDcmls | 2 | |
| WBSDescription | WBSDescription | 1 | |
| WBSElement | WBSElement | 1 | |
| WBSElementInternalID | WBSElementInternalID | 1 | |
| WeeklyAvailabilityChart | WeeklyAvailabilityChart | 2 |
@AccessControl: { authorizationCheck: #MANDATORY,
personalData.blocking: #('TRANSACTIONAL_DATA') }
@EndUserText.label: 'MRP Material Coverage without Supplier'
@ObjectModel: {
usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED }
}
@VDM.viewType: #COMPOSITE
define view entity I_MRPMaterialCoverage
as select from I_MRPPlanningSegment as MRPPlanningSegment
inner join I_CacheMaterial as CacheMaterial on MRPPlanningSegment.MRPPlant = CacheMaterial.MRPPlant
and MRPPlanningSegment.Material = CacheMaterial.Material
and MRPPlanningSegment.MRPArea = CacheMaterial.MRPArea
left outer one to many join I_MaterialShortageDefinition as MaterialShortageDefinition on MRPPlanningSegment.MaterialShortageProfile = MaterialShortageDefinition.MaterialShortageProfile
left outer one to many join I_TimeDependentStockLevel as TimedependentStockLevel on MRPPlanningSegment.Material = TimedependentStockLevel.Product
and MRPPlanningSegment.MRPPlant = TimedependentStockLevel.Plant
and MRPPlanningSegment.MRPArea = TimedependentStockLevel.MRPArea
and (
TimedependentStockLevel.StockLevelValidityStartDate <= $session.system_date
and TimedependentStockLevel.StockLevelValidityEndDate >= $session.system_date
)
association [0..1] to I_CacheShortageStatistic as _CacheShortageStatistics on MRPPlanningSegment.MRPPlant = _CacheShortageStatistics.MRPPlant
and MRPPlanningSegment.Material = _CacheShortageStatistics.Material
and MRPPlanningSegment.MRPArea = _CacheShortageStatistics.MRPArea
and MRPPlanningSegment.MRPPlanningSegment = _CacheShortageStatistics.MRPPlanningSegment
and MRPPlanningSegment.MRPPlanningSegmentType = _CacheShortageStatistics.MRPPlanningSegmentType
and MRPPlanningSegment.MaterialShortageProfile = _CacheShortageStatistics.MaterialShortageProfile
and MaterialShortageDefinition.MaterialShortageProfileCount = _CacheShortageStatistics.MaterialShortageProfileCount
and _CacheShortageStatistics.MaterialShortageDefinitionName != '' // only materials with shortage profile
association [1..1] to I_CacheMaterial as _CacheMaterial on $projection.MRPPlant = _CacheMaterial.MRPPlant
and $projection.Material = _CacheMaterial.Material
and $projection.MRPArea = _CacheMaterial.MRPArea
association [1..1] to I_Product as _Product on $projection.Material = _Product.Product
association [0..1] to I_ScheduleAgreementExists as _ScheduleAgreementExists on $projection.MRPPlant = _ScheduleAgreementExists.Plant
and $projection.Material = _ScheduleAgreementExists.Material
association [0..1] to I_UnitOfMeasure as _UnitOfMeasure on $projection.MaterialBaseUnit = _UnitOfMeasure.UnitOfMeasure
association [1..1] to I_MRPPlant as _MRPPlant on $projection.MRPPlant = _MRPPlant.MRPPlant
association [0..1] to I_MRPSupplierCount as _SupplierCount on MRPPlanningSegment.MRPPlant = _SupplierCount.MRPPlant
and MRPPlanningSegment.Material = _SupplierCount.Material
and MRPPlanningSegment.MRPArea = _SupplierCount.MRPArea
and MRPPlanningSegment.MRPPlanningSegmentType = _SupplierCount.MRPPlanningSegmentType
and MRPPlanningSegment.MRPPlanningSegment = _SupplierCount.MRPPlanningSegment
association [0..1] to P_AcceptedMaterialShortageCnt as _AcceptedMaterialShortageCnt on MRPPlanningSegment.MRPPlant = _AcceptedMaterialShortageCnt.MRPPlant
and MRPPlanningSegment.Material = _AcceptedMaterialShortageCnt.Material
and MRPPlanningSegment.MRPArea = _AcceptedMaterialShortageCnt.MRPArea
and MRPPlanningSegment.MRPPlanningSegment = _AcceptedMaterialShortageCnt.MRPPlanningSegment
and MRPPlanningSegment.MRPPlanningSegmentType = _AcceptedMaterialShortageCnt.MRPPlanningSegmentType
and MRPPlanningSegment.MaterialShortageProfile = _AcceptedMaterialShortageCnt.MaterialShortageProfile
and MaterialShortageDefinition.MaterialShortageProfileCount = _AcceptedMaterialShortageCnt.MaterialShortageProfileCount
association [0..*] to I_MRPAvailability as _MRPAvailability on $projection.MRPPlant = _MRPAvailability.MRPPlant
and $projection.Material = _MRPAvailability.Material
and $projection.MRPArea = _MRPAvailability.MRPArea
and $projection.MRPPlanningSegmentType = _MRPAvailability.MRPPlanningSegmentType
and $projection.MRPPlanningSegment = _MRPAvailability.MRPPlanningSegment
and $projection.MaterialShortageProfile = _MRPAvailability.MaterialShortageProfile
and $projection.MaterialShortageProfileCount = _MRPAvailability.MaterialShortageProfileCount
association [1..1] to I_SalesOrder as _SalesOrder on $projection.PlanningSegmentDocument = _SalesOrder.SalesOrder
association [1..1] to I_MRPMaterial as _MRPMaterial on $projection.MRPPlant = _MRPMaterial.MRPPlant
and $projection.Material = _MRPMaterial.Material
and $projection.MRPArea = _MRPMaterial.MRPArea
association [0..1] to I_MaterialMRPArea as _MaterialMRPArea on $projection.MRPPlant = _MaterialMRPArea.Plant
and $projection.Material = _MaterialMRPArea.Material
and $projection.MRPArea = _MaterialMRPArea.MRPArea
association [0..1] to P_ProdnProductHierNode as _PlanningHierNodeOnePlant on $projection.Material = _PlanningHierNodeOnePlant.Material
and $projection.MRPPlant = _PlanningHierNodeOnePlant.MRPPlant
and _PlanningHierNodeOnePlant.ProdnProductHierarchyPurpose = '01'
and _PlanningHierNodeOnePlant.UniversalHierVersValidFrom <= $session.user_date
and _PlanningHierNodeOnePlant.UniversalHierVersValidTo >= $session.user_date
association [0..1] to P_ProdnProductHierNode as _PlanningHierNodeAllPlants on $projection.Material = _PlanningHierNodeAllPlants.Material
and _PlanningHierNodeAllPlants.MRPPlant = '*'
and _PlanningHierNodeAllPlants.ProdnProductHierarchyPurpose = '01'
and _PlanningHierNodeAllPlants.UniversalHierVersValidFrom <= $session.user_date
and _PlanningHierNodeAllPlants.UniversalHierVersValidTo >= $session.user_date
association [0..1] to P_ProdnProductHierNode as _ProductHierNodeAll on $projection.Material = _ProductHierNodeAll.Material
and _ProductHierNodeAll.MRPPlant = '*'
and _ProductHierNodeAll.ProdnProductHierarchyPurpose = '*'
and _ProductHierNodeAll.UniversalHierVersValidFrom <= $session.user_date
and _ProductHierNodeAll.UniversalHierVersValidTo >= $session.user_date
association [0..1] to P_MRPMATERIALSTATUS as _MRPMaterialStatus on MRPPlanningSegment.MRPPlant = _MRPMaterialStatus.MRPPlant
and MRPPlanningSegment.Material = _MRPMaterialStatus.Material
association [0..1] to P_MRPMasterDataIssueCount as _MRPMasterDataIssue on $projection.Material = _MRPMasterDataIssue.Material
and $projection.MRPPlant = _MRPMasterDataIssue.Plant
and $projection.MRPArea = _MRPMasterDataIssue.MRPArea
association [0..1] to I_WBSElementBasicData as _WBSElement on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID // instead of I_WBSElement for cloud
association [0..1] to I_EntProjectResponsiblePerson as _ProjectRespPersn on $projection.WBSElementInternalID = _ProjectRespPersn.WBSElementInternalID
and _ProjectRespPersn.WBSElementInternalID is not initial
{
key MRPPlanningSegment.MRPPlant,
key MRPPlanningSegment.MRPArea,
key MRPPlanningSegment.Material,
key MRPPlanningSegment.MRPPlanningSegment, // needed as keyfield to be sure that it is filled
key cast(MRPPlanningSegment.MRPPlanningSegmentType as plaab) as MRPPlanningSegmentType,
key MRPPlanningSegment.MaterialShortageProfile, // needed as keyfield to be sure that it is filled
key cast (MaterialShortageDefinition.MaterialShortageProfileCount as materialshortageprofilecount) as MaterialShortageProfileCount,
key CacheMaterial.FactoryCalendar, // needed as keyfield to be sure that it is filled
MRPPlanningSegment.MRPPlanningSegmentExternalCode,
cast (CacheMaterial.MaterialName as maktx) as MaterialName,
CacheMaterial.MaterialBaseUnit,
CacheMaterial.MRPController,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
cast (MRPPlanningSegment.MRPAvailableStockQty as mrpavailablestockqty) as MRPAvailableStockQty,
_CacheShortageStatistics.MaterialShortageQuantity,
_CacheShortageStatistics.EvaluationHorizonInDays,
_CacheShortageStatistics.MaterialShortageDefinitionName,
_CacheShortageStatistics.MaterialShortageStartDate,
_CacheShortageStatistics.MaterialShortageEndDate,
_CacheShortageStatistics.MaterialShortageDuration,
_CacheShortageStatistics.MaterialShortageDurnInWorkdays,
_CacheShortageStatistics.DaysOfSupplyCoveragePercent,
_CacheShortageStatistics.MatlMaxCoverageDurnInWorkdays,
_CacheShortageStatistics.NumberOfShortagesPerSegment,
_CacheShortageStatistics.MinAvailQtyOverCompleteHrzn,
_CacheShortageStatistics.MaterialFirstShortageDate,
_CacheShortageStatistics.MaterialFirstShortageDateQty,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else _CacheShortageStatistics.DaysOfSupplyDuration
end as DaysOfSupplyDuration,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else _CacheShortageStatistics.IntraDaySupplyDuration
end as IntraDaySupplyDuration,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else _CacheShortageStatistics.ReceiptDaysSupplyDuration
end as ReceiptDaysSupplyDuration,
_CacheShortageStatistics.ReceiptDaysSupplyCriticality,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 3
else _CacheShortageStatistics.DaysOfSupplyCriticality
end as DaysOfSupplyCriticality,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else _CacheShortageStatistics.StockDaysSupplyDuration
end as StockDaysSupplyDuration,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 3
else _CacheShortageStatistics.StockDaysSupplyCriticality
end as StockDaysSupplyCriticality,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else _CacheShortageStatistics.StockIntraDaySupplyDuration
end as StockIntraDaySupplyDuration,
CacheMaterial.MaterialProcurementProfile,
CacheMaterial.MaterialProcurementCategory,
case
when CacheMaterial.MRPType <> _MaterialMRPArea.MRPType and _MaterialMRPArea.MRPType <> ''
then _MaterialMRPArea.MRPType
else CacheMaterial.MRPType
end as MRPType,
CacheMaterial.MaterialPlannedDeliveryDurn,
CacheMaterial.MaterialPlannedProductionDurn,
CacheMaterial.MRPSafetyDuration,
_MRPMaterial.PlanningTimeFenceInDays,
CacheMaterial.MaterialGoodsReceiptDuration,
CacheMaterial.MaterialGroup,
CacheMaterial.MaterialGroupName,
CacheMaterial.MRPGroup,
CacheMaterial.PurchasingGroup,
CacheMaterial.TotalReplenishmentLeadDuration,
CacheMaterial.MaterialType,
CacheMaterial.MaterialTypeName,
CacheMaterial.MaterialABCClassification,
CacheMaterial.MaterialReplnmtLeadDurnEndDate,
CacheMaterial.TotalReplnmtLeadDurnEndDate,
CacheMaterial.ManualPlanningHorizonEndDate,
CacheMaterial.MRPSafetyDurationEndDate,
case
when _MRPMaterial.MRPSafetyStockMethod = 'MB' or _MRPMaterial.MRPProcedure = 'C'
then cast( TimedependentStockLevel.ProductSafetyStockLvlQuantity as materialsafetystockqty )
else CacheMaterial.MaterialSafetyStockQty
end as MaterialSafetyStockQty,
case
when _MRPMaterial.MRPSafetyStockMethod = 'MB' or _MRPMaterial.MRPProcedure = 'C'
then cast (TimedependentStockLevel.ReorderThresholdQuantity as materialreorderpointqty )
else CacheMaterial.MaterialReorderPointQty
end as MaterialReorderPointQty,
case MRPPlanningSegment.MRPPlanningSegmentType
when '20' then _SalesOrder.SoldToParty else ''
end as Customer,
case MRPPlanningSegment.MRPPlanningSegmentType
when '20' then _SalesOrder._SoldToParty.BPCustomerName else ''
end as CustomerName,
_SupplierCount.NumberOfSupplier,
cast( '' as availabilitychart ) as AvailabilityChart,
cast( '' as weeklyavailabilitychart ) as WeeklyAvailabilityChart,
case
when _CacheShortageStatistics.MaterialShortageStartDate <= CacheMaterial.MaterialReplnmtLeadDurnEndDate
then cast('X' as boolean preserving type)
else cast('-' as boolean preserving type )
end as HasMaterialShortageReplnmtLead,
case
when _CacheShortageStatistics.MaterialShortageStartDate <= CacheMaterial.TotalReplnmtLeadDurnEndDate
then cast('X' as boolean preserving type )
else cast('-' as boolean preserving type )
end as HasShortageTotalReplnmtLead,
case
when _CacheShortageStatistics.MaterialShortageStartDate <= CacheMaterial.ManualPlanningHorizonEndDate
then cast('X' as boolean preserving type )
else cast('-' as boolean preserving type )
end as HasShortageManualPlanHorizon,
case
when _CacheShortageStatistics.MaterialShortageStartDate <= CacheMaterial.MRPSafetyDurationEndDate
then cast('X' as boolean preserving type )
else cast('-' as boolean preserving type )
end as HasShortageMRPSafetyDuration,
case
when _CacheShortageStatistics.MaterialShortageStartDate is null then 9999
else dats_days_between(_MRPPlant.CurrentPlantDate, _CacheShortageStatistics.MaterialShortageStartDate)
end as TimeTillShortageInCalendarDays,
_MRPPlant.Language as PlantLanguage,
_MRPMaterialStatus.MRPValidMaterialStatus,
_ScheduleAgreementExists.ScheduleAgreementHasReleaseDoc,
-- individual planning segment fields
MRPPlanningSegment._Reservation.MaterialCompIsProcuredDirectly,
cast (
case
when MRPPlanningSegment.MRPPlanningSegmentType = '24'
then
case
when MRPPlanningSegment._Reservation.ReferenceOrder <> ''
then MRPPlanningSegment._Reservation.ReferenceOrder
else
MRPPlanningSegment._Reservation.PlannedOrder
end
else
_WBSElement._Project.Project
end as ps_pspid_edit preserving type ) as MatlPlngProjectNetwork,
cast ( _WBSElement.ProjectInternalID as ps_s4_proj_pspnr preserving type ) as ProjectInternalID,
MRPPlanningSegment.WBSElementInternalID,
case MRPPlanningSegment.MRPPlanningSegmentType
when '22' then _WBSElement.WBSElementExternalID else ''
end as WBSElement,
case MRPPlanningSegment.MRPPlanningSegmentType
when '22' then _WBSElement.WBSDescription else ''
end as WBSDescription,
cast( case MRPPlanningSegment.MRPPlanningSegmentType
when '22' then _ProjectRespPersn.PersonWorkAgreement else cast ( '00000000' as ps_s4_vernr preserving type )
end as ps_s4_vernr preserving type ) as ResponsiblePerson,
case MRPPlanningSegment.MRPPlanningSegmentType
when '22' then _ProjectRespPersn._WorkforcePerson.PersonFullName else ''
end as ResponsiblePersonName,
MRPPlanningSegment.PlanningSegmentDocument,
MRPPlanningSegment.PlanningSegmentDocumentItem,
_Product.IsMarkedForDeletion,
_Product.LowLevelCode,
cast( case when _AcceptedMaterialShortageCnt.NumberOfAcceptedShortages > 0 then 'X' else '' end as boolean preserving type ) as HasAcceptedShortage,
_UnitOfMeasure.UnitOfMeasureDspNmbrOfDcmls,
_UnitOfMeasure.UnitOfMeasureNumberOfDecimals,
_UnitOfMeasure.UnitOfMeasure_E as UnitOfMeasureCommercialName,
case
when _PlanningHierNodeOnePlant.ProductionProductHierarchy is not null
then _PlanningHierNodeOnePlant.ProductionProductHierarchy
when _PlanningHierNodeAllPlants.ProductionProductHierarchy is not null
then _PlanningHierNodeAllPlants.ProductionProductHierarchy
when _ProductHierNodeAll.ProductionProductHierarchy is not null
then _ProductHierNodeAll.ProductionProductHierarchy
else ''
end as ProductionProductHierarchy,
case
when _PlanningHierNodeOnePlant.ProductionProductHierarchy is not null
then _PlanningHierNodeOnePlant.HierarchyNode
when _PlanningHierNodeAllPlants.ProductionProductHierarchy is not null
then _PlanningHierNodeAllPlants.HierarchyNode
when _ProductHierNodeAll.ProductionProductHierarchy is not null
then _ProductHierNodeAll.HierarchyNode
else ''
end as ProductionProductHierarchyNode,
MRPPlanningSegment.NmbrOfPastDueOpeningDateElmnts,
MRPPlanningSegment.NumberOfPastDueStartDateElmnts,
MRPPlanningSegment.NumberOfPastDueEndDateElements,
MRPPlanningSegment.MaterialHasMRPNote,
MRPPlanningSegment.MRPMaterialNoteText,
MRPPlanningSegment.NumberOfRescheduleInElements,
MRPPlanningSegment.NumberOfRescheduleOutElements,
MRPPlanningSegment.NumberOfCancelProcesses,
_MRPMasterDataIssue.IssueCount,
_MRPMaterial.MRPSafetyStockMethod,
--------------------------------------------------------------------------------------------------------
-- Additions for Fashion-Department
--------------------------------------------------------------------------------------------------------
_Product.CrossPlantConfigurableProduct,
_Product.SegmentationStrategy,
_Product.SegmentationIsRelevant,
_MRPPlant,
_MRPAvailability,
_Product,
_UnitOfMeasure,
_CacheMaterial,
_SalesOrder,
_MRPMaterial,
_MaterialMRPArea,
_ProjectRespPersn
}
where
(
MRPPlanningSegment.MRPPlanningSegmentType = '02'
or MRPPlanningSegment.MRPPlanningSegmentType = '00'
or MRPPlanningSegment.MRPPlanningSegmentType = '20'
or MRPPlanningSegment.MRPPlanningSegmentType = '22'
or MRPPlanningSegment.MRPPlanningSegmentType = '24'
)
and CacheMaterial.FactoryCalendar != ''