I_MRPProductionDemand

DDL: I_MRPPRODUCTIONDEMAND Type: view_entity COMPOSITE Package: ODATA_PP_MRP

MRP Production Demand

I_MRPProductionDemand is a Composite CDS View that provides data about "MRP Production Demand" in SAP S/4HANA. It reads from 5 data sources (I_MRPAreaOfResponsibility, I_CacheMaterial, I_LogisticsOrderBasic, I_MRPPlanningSegment, I_MRPReservation) and exposes 68 fields with key fields MRPPlant, MRPArea, Material, MRPPlanningSegment, MRPPlanningSegmentType. It has 12 associations to related views. Part of development package ODATA_PP_MRP.

Data Sources (5)

SourceAliasJoin Type
I_MRPAreaOfResponsibility _AreaOfResponsibility inner
I_CacheMaterial CacheMaterial from
I_LogisticsOrderBasic LogisticsOrderBasic inner
I_MRPPlanningSegment MRPPlanningSegment inner
I_MRPReservation MRPReservations inner

Associations (12)

CardinalityTargetAliasCondition
[0..1] I_CustomizingMRPArea CustomizingMRPArea $projection.MRPArea = CustomizingMRPArea.MRPArea
[0..1] I_Plant MRPPlant $projection.MRPPlant = MRPPlant.Plant
[0..1] I_UnitOfMeasure Uom $projection.MaterialBaseUnit = Uom.UnitOfMeasure
[0..1] I_MRPController MRPController $projection.MRPPlant = MRPController.Plant and $projection.MRPController = MRPController.MRPController
[0..1] I_OrganizationAddress _Address $projection.addressid = _Address.AddressID and _Address.AddressPersonID = '' and _Address.AddressRepresentationCode = '' -- text associations
[0..1] I_UnitOfMeasureText _UnitOfMeasureText $projection.MaterialBaseUnit = _UnitOfMeasureText.UnitOfMeasure and _UnitOfMeasureText.Language = $session.system_language
[0..1] I_MRPElementCategoryText _MRPElementCategoryText $projection.MRPElementCategory = _MRPElementCategoryText.MRPElementCategory and _MRPElementCategoryText.Language = $session.system_language
[0..1] I_MRPElementCategoryText _SrcMRPElementCategoryText $projection.SourceMRPElementCategory = _SrcMRPElementCategoryText.MRPElementCategory and _SrcMRPElementCategoryText.Language = $session.system_language
[0..1] I_OrderTypeText _OrderTypeText $projection.OrderType = _OrderTypeText.OrderType and _OrderTypeText.Language = $session.system_language
[0..1] I_ProductionResourceText _ProductionLineText $projection.ProductionLine = _ProductionLineText.ProductionResourceInternalID and _ProductionLineText.Language = $session.system_language
[0..1] I_MaterialText _ProducedMaterialText $projection.ProducedMaterial = _ProducedMaterialText.Material and _ProducedMaterialText.Language = $session.system_language
[0..1] I_MaterialMRPArea _MaterialMRPArea $projection.MRPPlant = _MaterialMRPArea.Plant and $projection.Material = _MaterialMRPArea.Material and $projection.MRPArea = _MaterialMRPArea.MRPArea

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label MRP Production Demand view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view

Fields (68)

KeyFieldSource TableSource FieldDescription
KEY MRPPlant I_CacheMaterial MRPPlant Plant
KEY MRPArea I_CacheMaterial MRPArea MRP Area
KEY Material I_CacheMaterial Material Vehicle Model
KEY MRPPlanningSegment I_MRPPlanningSegment MRPPlanningSegment Plng Segmnt No.
KEY MRPPlanningSegmentType
KEY MaterialShortageProfile I_MRPPlanningSegment MaterialShortageProfile Shortage Prf.
KEY MaterialShortageProfileCount CacheItem NumberOfShortages
KEY MRPElement CacheItem MRPElement MRP element number
KEY MRPElementItem CacheItem MRPElementItem MRP elemnt item
KEY MRPElementScheduleLine CacheItem MRPElementScheduleLine Scheduling
KEY MRPElementCategory CacheItem MRPElementCategory MRP Elmnt Ind.
KEY MRPElementAvailyOrRqmtDate CacheItem MRPElementAvailyOrRqmtDate Time Stamp
ReservationItem
MaterialExternalID I_CacheMaterial Material Vehicle Model
MaterialShortageDefinition
MRPPlanningSegmentExternalCode I_MRPPlanningSegment MRPPlanningSegmentExternalCode Individual Segment
MRPElementMissingQuantity
HasMaterialShortageReplnmtLead
HasShortageTotalReplnmtLead
HasShortageManualPlanHorizon
HasShortageMRPSafetyDuration
PlanningSegmentDocument I_MRPPlanningSegment PlanningSegmentDocument
PlanningSegmentDocumentItem I_MRPPlanningSegment PlanningSegmentDocumentItem
FactoryCalendar I_CacheMaterial FactoryCalendar Factory Calendar
MaterialName I_CacheMaterial MaterialName Material Description
MaterialSafetyStockQty I_CacheMaterial MaterialSafetyStockQty Safety Stock
MRPController I_CacheMaterial MRPController MRP Controller
MaterialProcurementCategory I_CacheMaterial MaterialProcurementCategory Procurement
MaterialBaseUnit I_CacheMaterial MaterialBaseUnit Valuation Unit
UnitOfMeasureNumberOfDecimals Uom UnitOfMeasureNumberOfDecimals
UnitOfMeasureDspNmbrOfDcmls Uom UnitOfMeasureDspNmbrOfDcmls
MaterialReplnmtLeadDurnEndDate I_CacheMaterial MaterialReplnmtLeadDurnEndDate Date
TotalReplnmtLeadDurnEndDate I_CacheMaterial TotalReplnmtLeadDurnEndDate Date
ManualPlanningHorizonEndDate I_CacheMaterial ManualPlanningHorizonEndDate Date
MRPSafetyDurationEndDate I_CacheMaterial MRPSafetyDurationEndDate Date
MRPTypeendasMRPType
MRPElementOpenQuantity
SourceMRPElementCategory CacheItem SourceMRPElementCategory MRP Elmnt Ind.
SourceMRPElement CacheItem SourceMRPElement MRP element number
SourceMRPElementItem CacheItem SourceMRPElementItem MRP elemnt item
MRPElementTypeImportance CacheItem MRPElementTypeImportance Sort ind. 01
MRPElementUncoveredQuantity CacheItem MRPElementUncoveredQuantity DEC 20 3
MRPElementDelayedQuantity CacheItem MRPElementDelayedQuantity DEC 20 3
MaximumDelayDate CacheItem MaximumDelayDate Date
MaximumDelayInDays CacheItem MaximumDelayInDays Max.DelayInDays
MaximumDelayInWorkdays CacheItem MaximumDelayInWorkdays MaxDelayWorkday
ProcurementProgress CacheItem ProcurementProgress
StorageLocation CacheItem StorageLocation StorageLocation
PlantName MRPPlant PlantName Plant Name
OrderType OrderBasic OrderType Order Type
MRPControllerName MRPController MRPControllerName Controller name
MRPAreaText CustomizingMRPArea MRPAreaText
OrderQuantity I_MRPReservation ResvnItmRequiredQtyInBaseUnit Requirement qty
ProducedMaterial OrderItem Material Vehicle Model
ProductionSupervisor
ProductionSupervisorName
ProductionVersion
ProductionVersionText
ProductionPlant
ProductionLine ProductionVersion ProductionLine Production Line
AddressID MRPPlant AddressID Ship-to address
_UnitOfMeasureText _UnitOfMeasureText
_MRPElementCategoryText _MRPElementCategoryText
_SrcMRPElementCategoryText _SrcMRPElementCategoryText
_OrderTypeText _OrderTypeText
_ProductionLineText _ProductionLineText
_ProducedMaterialText _ProducedMaterialText
_Address _Address

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_MRPProductionDemand.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_MRPProductionDemand AS
SELECT
  CacheMaterial.MRPPlant AS MRPPlant,
  CacheMaterial.MRPArea AS MRPArea,
  CacheMaterial.Material AS Material,
  MRPPlanningSegment.MRPPlanningSegment AS MRPPlanningSegment,
  cast( MRPPlanningSegment.MRPPlanningSegmentType as plaab ) AS MRPPlanningSegmentType,
  MRPPlanningSegment.MaterialShortageProfile AS MaterialShortageProfile,
  CacheItem.NumberOfShortages AS MaterialShortageProfileCount,
  CacheItem.MRPElement AS MRPElement,
  CacheItem.MRPElementItem AS MRPElementItem,
  CacheItem.MRPElementScheduleLine AS MRPElementScheduleLine,
  CacheItem.MRPElementCategory AS MRPElementCategory,
  CacheItem.MRPElementAvailyOrRqmtDate AS MRPElementAvailyOrRqmtDate,
  cast( substring( CacheItem.MRPElementItem, 3, 4 ) as rspos ) AS ReservationItem,
  CacheMaterial.Material AS MaterialExternalID,
  concat(MRPPlanningSegment.MaterialShortageProfile, CacheItem.NumberOfShortages) AS MaterialShortageDefinition,
  MRPPlanningSegment.MRPPlanningSegmentExternalCode AS MRPPlanningSegmentExternalCode,
  CacheItem.MRPElementUncoveredQuantity + CacheItem.MRPElementDelayedQuantity AS MRPElementMissingQuantity,
  cast ( case when CacheItem.MRPElementAvailyOrRqmtDate <= CacheMaterial.MaterialReplnmtLeadDurnEndDate then 'X' else '' end as boolean preserving type ) AS HasMaterialShortageReplnmtLead,
  cast ( case when CacheItem.MRPElementAvailyOrRqmtDate <= CacheMaterial.TotalReplnmtLeadDurnEndDate then 'X' else '' end as boolean preserving type ) AS HasShortageTotalReplnmtLead,
  cast ( case when CacheItem.MRPElementAvailyOrRqmtDate <= CacheMaterial.ManualPlanningHorizonEndDate then 'X' else '' end as boolean preserving type) AS HasShortageManualPlanHorizon,
  cast ( case when CacheItem.MRPElementAvailyOrRqmtDate <= CacheMaterial.MRPSafetyDurationEndDate then 'X' else '' end as boolean preserving type ) AS HasShortageMRPSafetyDuration,
  MRPPlanningSegment.PlanningSegmentDocument AS PlanningSegmentDocument,
  MRPPlanningSegment.PlanningSegmentDocumentItem AS PlanningSegmentDocumentItem,
  CacheMaterial.FactoryCalendar AS FactoryCalendar,
  CacheMaterial.MaterialName AS MaterialName,
  CacheMaterial.MaterialSafetyStockQty AS MaterialSafetyStockQty,
  CacheMaterial.MRPController AS MRPController,
  CacheMaterial.MaterialProcurementCategory AS MaterialProcurementCategory,
  CacheMaterial.MaterialBaseUnit AS MaterialBaseUnit,
  Uom.UnitOfMeasureNumberOfDecimals AS UnitOfMeasureNumberOfDecimals,
  Uom.UnitOfMeasureDspNmbrOfDcmls AS UnitOfMeasureDspNmbrOfDcmls,
  CacheMaterial.MaterialReplnmtLeadDurnEndDate AS MaterialReplnmtLeadDurnEndDate,
  CacheMaterial.TotalReplnmtLeadDurnEndDate AS TotalReplnmtLeadDurnEndDate,
  CacheMaterial.ManualPlanningHorizonEndDate AS ManualPlanningHorizonEndDate,
  CacheMaterial.MRPSafetyDurationEndDate AS MRPSafetyDurationEndDate,
  case when CacheMaterial.MRPType <> _MaterialMRPArea.MRPType and _MaterialMRPArea.MRPType <> '' then _MaterialMRPArea.MRPType else CacheMaterial.MRPType end as MRPType AS MRPTypeendasMRPType,
  cast ( -1 * CacheItem.MRPElementOpenQuantity as abap.dec( 20, 3 ) ) AS MRPElementOpenQuantity,
  CacheItem.SourceMRPElementCategory AS SourceMRPElementCategory,
  CacheItem.SourceMRPElement AS SourceMRPElement,
  CacheItem.SourceMRPElementItem AS SourceMRPElementItem,
  CacheItem.MRPElementTypeImportance AS MRPElementTypeImportance,
  CacheItem.MRPElementUncoveredQuantity AS MRPElementUncoveredQuantity,
  CacheItem.MRPElementDelayedQuantity AS MRPElementDelayedQuantity,
  CacheItem.MaximumDelayDate AS MaximumDelayDate,
  CacheItem.MaximumDelayInDays AS MaximumDelayInDays,
  CacheItem.MaximumDelayInWorkdays AS MaximumDelayInWorkdays,
  CacheItem.ProcurementProgress AS ProcurementProgress,
  CacheItem.StorageLocation AS StorageLocation,
  MRPPlant.PlantName AS PlantName,
  OrderBasic.OrderType AS OrderType,
  MRPController.MRPControllerName AS MRPControllerName,
  CustomizingMRPArea.MRPAreaText AS MRPAreaText,
  MRPReservations.ResvnItmRequiredQtyInBaseUnit AS OrderQuantity,
  OrderItem.Material AS ProducedMaterial,
  coalesce(LogisticsOrderBasic.ProductionSupervisor, '') AS ProductionSupervisor,
  coalesce(ProductionSupervisor.ProductionSupervisorName,'') AS ProductionSupervisorName,
  coalesce(OrderItem.ProductionVersion, '') AS ProductionVersion,
  coalesce(ProductionVersion.ProductionVersionText, '') AS ProductionVersionText,
  coalesce(OrderItem.ProductionPlant, '') AS ProductionPlant,
  ProductionVersion.ProductionLine AS ProductionLine,
  MRPPlant.AddressID AS AddressID
FROM I_CacheMaterial AS CacheMaterial
INNER JOIN I_MRPAreaOfResponsibility AS _AreaOfResponsibility ON /* join condition not captured in parsed metadata */
INNER JOIN I_MRPPlanningSegment AS MRPPlanningSegment ON /* join condition not captured in parsed metadata */
INNER JOIN I_MRPReservation AS MRPReservations ON /* join condition not captured in parsed metadata */
INNER JOIN I_LogisticsOrderBasic AS LogisticsOrderBasic ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CustomizingMRPArea AS CustomizingMRPArea ON MRPArea = CustomizingMRPArea.MRPArea  -- association [0..1]
LEFT OUTER JOIN I_Plant AS MRPPlant ON MRPPlant = MRPPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS Uom ON MaterialBaseUnit = Uom.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_MRPController AS MRPController ON MRPPlant = MRPController.Plant AND MRPController = MRPController.MRPController  -- association [0..1]
LEFT OUTER JOIN I_OrganizationAddress AS _Address ON addressid = _Address.AddressID AND _Address.AddressPersonID = '' AND _Address.AddressRepresentationCode = ''  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasureText AS _UnitOfMeasureText ON MaterialBaseUnit = _UnitOfMeasureText.UnitOfMeasure AND _UnitOfMeasureText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MRPElementCategoryText AS _MRPElementCategoryText ON MRPElementCategory = _MRPElementCategoryText.MRPElementCategory AND _MRPElementCategoryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MRPElementCategoryText AS _SrcMRPElementCategoryText ON SourceMRPElementCategory = _SrcMRPElementCategoryText.MRPElementCategory AND _SrcMRPElementCategoryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_OrderTypeText AS _OrderTypeText ON OrderType = _OrderTypeText.OrderType AND _OrderTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ProductionResourceText AS _ProductionLineText ON ProductionLine = _ProductionLineText.ProductionResourceInternalID AND _ProductionLineText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _ProducedMaterialText ON ProducedMaterial = _ProducedMaterialText.Material AND _ProducedMaterialText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MaterialMRPArea AS _MaterialMRPArea ON MRPPlant = _MaterialMRPArea.Plant AND Material = _MaterialMRPArea.Material AND MRPArea = _MaterialMRPArea.MRPArea  -- association [0..1]
;