P_MPEMaterial

DDL: P_MPEMATERIAL Type: view_entity CONSUMPTION Package: ODATA_MPE_MATERIAL

Private view for Material pop over

P_MPEMaterial is a Consumption CDS View that provides data about "Private view for Material pop over" in SAP S/4HANA. It reads from 2 data sources (I_ProductPlant, P_MPE_MaterialStorageLocation) and exposes 31 fields with key fields Material, Plant, StorageLocation. It has 9 associations to related views. Part of development package ODATA_MPE_MATERIAL.

Data Sources (2)

SourceAliasJoin Type
I_ProductPlant _ProductPlant from
P_MPE_MaterialStorageLocation _StgLoc left_outer

Parameters (1)

NameTypeDefault
P_Language sylangu

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_Product _Product $projection.Material = _Product.Product
[1..1] I_ProductDescription _ProductDS _ProductDS.Product = $projection.Material and _ProductDS.Language = $parameters.P_Language
[1..1] I_MRPController _MRPController _MRPController.Plant = $projection.Plant and _MRPController.MRPController = _ProductPlant.MRPResponsible
[1..1] I_MatlProcurementCategoryText _ProcurementText _ProcurementText.MaterialProcurementCategory = _ProductPlant.ProcurementType and _ProcurementText.Language = $parameters.P_Language
[1..1] P_MPE_MaterialStockQuantity _ProductStock _ProductStock.Material = $projection.Material and _ProductStock.Plant = $projection.Plant and _ProductStock.StorageLocation = $projection.StorageLocation
[1..1] I_Plant _Plant _Plant.Plant = $projection.Plant
[1..1] I_MPESrlNmbPrfText _SerialNumberText _SerialNumberText.SerialNumberProfile = _ProductPlant.SerialNumberProfile and _SerialNumberText.Language = $parameters.P_Language
[1..1] I_MRPTypeText _MRPText _MRPText.MRPType = _ProductPlant.MRPType and _MRPText.Language = $parameters.P_Language
[1..1] I_ProductionSupervisor _ProductionSup _ProductionSup.Plant = $projection.Plant and _ProductionSup.ProductionSupervisor = _ProductPlant.ProductionSupervisor association[1..1] to P_MPE_MaterialPlantStkQty as _PlantStock on $projection.Material = _PlantStock.Material and $projection.Plant = _PlantStock.Plant and $projection.StorageLocation = '' association[1..1] to P_MPE_MaterialPlantSalesStkQty as _PlantSalesStock on $projection.Material = _PlantSalesStock.Material and $projection.Plant = _PlantSalesStock.Plant and $projection.StorageLocation = '' association[1..1] to P_MPE_MaterialPlantWBSStkQty as _PlantWBSSTock on $projection.Material = _PlantWBSSTock.Material and $projection.Plant = _PlantWBSSTock.Plant and $projection.StorageLocation = ''

Annotations (4)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view
EndUserText.label Private view for Material pop over view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY Material I_ProductPlant Product Product Sold
KEY Plant I_ProductPlant Plant Valuation Area
KEY StorageLocation P_MPE_MaterialStorageLocation StorageLocation StorageLocation
StorageLocationName P_MPE_MaterialStorageLocation StorageLocationName Storage Loc. Name
ProductionPlant _Plant PlantName Plant Name
MRPPlant I_ProductPlant Plant Valuation Area
ProductDescription _ProductDS ProductDescription Description
MRPController _MRPController MRPController MRP Controller
MRPControllerName _MRPController MRPControllerName Controller name
MRPControllerPhoneNumber _MRPController MRPControllerPhoneNumber
ProductionSupervisor I_ProductPlant ProductionSupervisor Prodn Supervisor
ProductionSupervisorName _ProductionSup ProductionSupervisorName
MRPType I_ProductPlant MRPType MRP Type
MRPTypeName _MRPText MRPTypeName
BlockedStockendasBlockedStockQuantity
ProductionSchedulingProfile I_ProductPlant ProductionSchedulingProfile Production Scheduling Profile
SerialNumberProfile I_ProductPlant SerialNumberProfile SerialNoProfile
SerialNumberProfileName _SerialNumberText SerialNumberProfileName
IsApprovedBatchRecordReqd _Product IsApprovedBatchRecordReqd Batch rec. req.
UnderDelivToleranceLimit I_ProductPlant UnderDelivToleranceLimit Underdely tol.
OverDelivToleranceLimit I_ProductPlant OverDelivToleranceLimit Overdely tol.
MaterialProcurementCatName _ProcurementText MaterialProcurementCatName
SpecialProcurementType I_ProductPlant SpecialProcurementType SpecProcurement
SafetyStockQuantity I_ProductPlant SafetyStockQuantity Safety stock
DeliveryToleranceUnit
BaseUnit _Product BaseUnit Unit of Measure
MRPResponsible I_ProductPlant MRPResponsible MRP Controller
ProcurementType I_ProductPlant ProcurementType Procurement
_Product _Product
_MRPController _MRPController
_ProductionSup _ProductionSup

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 P_MPEMaterial.
-- 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.
-- Parameters: P_Language : sylangu

CREATE VIEW P_MPEMaterial AS
SELECT
  _ProductPlant.Product AS Material,
  _ProductPlant.Plant AS Plant,
  _StgLoc.StorageLocation AS StorageLocation,
  _StgLoc.StorageLocationName AS StorageLocationName,
  _Plant.PlantName AS ProductionPlant,
  _ProductPlant.Plant AS MRPPlant,
  _ProductDS.ProductDescription AS ProductDescription,
  _MRPController.MRPController AS MRPController,
  _MRPController.MRPControllerName AS MRPControllerName,
  _MRPController.MRPControllerPhoneNumber AS MRPControllerPhoneNumber,
  _ProductPlant.ProductionSupervisor AS ProductionSupervisor,
  _ProductionSup.ProductionSupervisorName AS ProductionSupervisorName,
  _ProductPlant.MRPType AS MRPType,
  _MRPText.MRPTypeName AS MRPTypeName,
  case when _StgLoc.StorageLocation = '' then _PlantStock.BlockedStock else _ProductStock.BlockedStock end as BlockedStockQuantity AS BlockedStockendasBlockedStockQuantity,
  _ProductPlant.ProductionSchedulingProfile AS ProductionSchedulingProfile,
  _ProductPlant.SerialNumberProfile AS SerialNumberProfile,
  _SerialNumberText.SerialNumberProfileName AS SerialNumberProfileName,
  _Product.IsApprovedBatchRecordReqd AS IsApprovedBatchRecordReqd,
  _ProductPlant.UnderDelivToleranceLimit AS UnderDelivToleranceLimit,
  _ProductPlant.OverDelivToleranceLimit AS OverDelivToleranceLimit,
  _ProcurementText.MaterialProcurementCatName AS MaterialProcurementCatName,
  _ProductPlant.SpecialProcurementType AS SpecialProcurementType,
  _ProductPlant.SafetyStockQuantity AS SafetyStockQuantity,
  cast('%' as unit) AS DeliveryToleranceUnit,
  _Product.BaseUnit AS BaseUnit,
  _ProductPlant.MRPResponsible AS MRPResponsible,
  _ProductPlant.ProcurementType AS ProcurementType
FROM I_ProductPlant AS _ProductPlant
LEFT OUTER JOIN P_MPE_MaterialStorageLocation AS _StgLoc ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [1..1]
LEFT OUTER JOIN I_ProductDescription AS _ProductDS ON _ProductDS.Product = Material AND _ProductDS.Language = $parameters.P_Language  -- association [1..1]
LEFT OUTER JOIN I_MRPController AS _MRPController ON _MRPController.Plant = Plant AND _MRPController.MRPController = _ProductPlant.MRPResponsible  -- association [1..1]
LEFT OUTER JOIN I_MatlProcurementCategoryText AS _ProcurementText ON _ProcurementText.MaterialProcurementCategory = _ProductPlant.ProcurementType AND _ProcurementText.Language = $parameters.P_Language  -- association [1..1]
LEFT OUTER JOIN P_MPE_MaterialStockQuantity AS _ProductStock ON _ProductStock.Material = Material AND _ProductStock.Plant = Plant AND _ProductStock.StorageLocation = StorageLocation  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON _Plant.Plant = Plant  -- association [1..1]
LEFT OUTER JOIN I_MPESrlNmbPrfText AS _SerialNumberText ON _SerialNumberText.SerialNumberProfile = _ProductPlant.SerialNumberProfile AND _SerialNumberText.Language = $parameters.P_Language  -- association [1..1]
LEFT OUTER JOIN I_MRPTypeText AS _MRPText ON _MRPText.MRPType = _ProductPlant.MRPType AND _MRPText.Language = $parameters.P_Language  -- association [1..1]
LEFT OUTER JOIN I_ProductionSupervisor AS _ProductionSup ON _ProductionSup.Plant = Plant AND _ProductionSup.ProductionSupervisor = _ProductPlant.ProductionSupervisor association[1..1] to P_MPE_MaterialPlantStkQty as _PlantStock on Material = _PlantStock.Material AND Plant = _PlantStock.Plant AND StorageLocation = '' association[1..1] to P_MPE_MaterialPlantSalesStkQty as _PlantSalesStock on Material = _PlantSalesStock.Material AND Plant = _PlantSalesStock.Plant AND StorageLocation = '' association[1..1] to P_MPE_MaterialPlantWBSStkQty as _PlantWBSSTock on Material = _PlantWBSSTock.Material AND Plant = _PlantWBSSTock.Plant AND StorageLocation = ''  -- association [1..1]
;