C_ProdBufPrflAndClassfctn is a Consumption CDS View that provides data about "Product Buffer Profile and Classifications" in SAP S/4HANA. It reads from 1 data source (I_ProdBufLvlPrpsl) and exposes 49 fields with key fields Material, Plant, MRPArea, ProposalEndDate. It has 2 associations to related views.
_CurrentBuffer.Material = _ProposedBuffer.Material and _CurrentBuffer.Plant = _ProposedBuffer.Plant and _CurrentBuffer.MRPArea = _ProposedBuffer.MRPArea and _CurrentBuffer.BufferLevelStartDate <= $session.system_date and _CurrentBuffer.BufferLevelEndDate >= $session.system_date
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 C_ProdBufPrflAndClassfctn.-- 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.-- SQL view name: CPRODBUFCLSFCTNCREATE VIEW C_ProdBufPrflAndClassfctn ASSELECT
_ProposedBuffer.Material AS Material,
_ProposedBuffer.Plant AS Plant,
_ProposedBuffer.MRPArea AS MRPArea,
_ProposedBuffer.ProposalEndDate AS ProposalEndDate,
_Product.DDScopeProduct AS DDScopeProduct,
_CurrentBuffer.CurrentVariabilityFactor AS CurrentVariabilityFactor,
_CurrentBuffer.CurrentLeadTimeFactor AS CurrentLeadTimeFactor,
concat(_CurrentBuffer.ProcurementType,concat('-',concat(concat (_CurrentBuffer.ReplenishmentLeadTimeCode, '-'), _CurrentBuffer.VariabilityCode))) AS MaterialBufferProfile,
concat(_CurrentBuffer._ProcmtText.ProcurementTypeDescription,concat('-',concat(concat(_CurrentBuffer._ReplnmtText.ReplenishmentLeadTimeDesc,'-'),_CurrentBuffer._VarText.VariabilityDescription))) AS MaterialBufferProfileText,
_CurrentBuffer.ProcurementType AS ProcurementType,
_CurrentBuffer._ProcmtText.ProcurementTypeDescription AS ProcurementTypeDescription,
_CurrentBuffer.BOMUsageCode AS BOMUsageCode,
cast(_CurrentBuffer.BOMUsageValue as abap.int4) AS BOMUsageValue,
_CurrentBuffer._BOMUsgText.BOMUsageDescription AS BOMUsageDescription,
_CurrentBuffer.ConsumptionCode AS ConsumptionCode,
_CurrentBuffer.ConsumptionValue AS ConsumptionValue,
_CurrentBuffer._ConsumptionText.ConsumptionDescription AS ConsumptionDescription,
_Product.Currency AS Currency,
_CurrentBuffer.VariabilityCode AS VariabilityCode,
_CurrentBuffer.VariabilityQuantity AS VariabilityQuantity,
_CurrentBuffer.VariabilityUnit AS VariabilityUnit,
_CurrentBuffer._VarText.VariabilityDescription AS VariabilityDescription,
_CurrentBuffer.ReplenishmentLeadTimeCode AS ReplenishmentLeadTimeCode,
_CurrentBuffer.ReplenishmentLeadTimeValue AS ReplenishmentLeadTimeValue,
_CurrentBuffer._ReplnmtText.ReplenishmentLeadTimeDesc AS ReplenishmentLeadTimeDesc,
_ProposedBuffer.VariabilityFactor AS ProposedVariabilityFactor,
_ProposedBuffer.LeadTimeFactor AS ProposedLeadTimeFactor,
concat(_ProposedBuffer.ProcurementType,concat('-',concat(concat(_ProposedBuffer.ReplenishmentLeadTimeCode,'-'),_ProposedBuffer.VariabilityCode))) AS ProposedMaterialBufferProfile,
concat(_ProposedBuffer._ProcmtText.ProcurementTypeDescription,concat('-',concat(concat(_ProposedBuffer._ReplnmtText.ReplenishmentLeadTimeDesc,'-'),_ProposedBuffer._VarText.VariabilityDescription))) AS ProposedMatlBufferProfileText,
_ProposedBuffer.ProcurementType AS ProposedMatlProcurementType,
_ProposedBuffer._ProcmtText.ProcurementTypeDescription AS ProposedMatlProcurementTypeTxt,
_ProposedBuffer.BOMUsageCode AS ProposedMatlBOMUsageCode,
cast(_ProposedBuffer.BOMUsageValue as abap.int4) AS ProposedMatlBOMUsageValue,
_ProposedBuffer._BOMUsgText.BOMUsageDescription AS ProposedMatlBOMUsageDesc,
_ProposedBuffer.ConsumptionCode AS ProposedMatlConsumptionCode,
_ProposedBuffer.ConsumptionValue AS ProposedMatlConsumptionAmount,
_ProposedBuffer._ConsumptionText.ConsumptionDescription AS ProposedMatlConsumptionDesc,
_ProposedBuffer.VariabilityCode AS ProposedMatlVariabilityCode,
_ProposedBuffer.VariabilityQuantity AS ProposedMatlVariabilityQty,
_ProposedBuffer.VariabilityUnit AS ProposedMatlVariabilityUnit,
_ProposedBuffer._VarText.VariabilityDescription AS ProposedMatlVariabilityDesc,
_ProposedBuffer.ReplenishmentLeadTimeCode AS ProposedMatlLeadTimeCode,
_ProposedBuffer.ReplenishmentLeadTimeValue AS ProposedMatlLeadTime,
_ProposedBuffer._ReplnmtText.ReplenishmentLeadTimeDesc AS ProposedMatlLeadTimeDesc,
_ProposedBuffer._StatusText.StockLevelProposalStatus AS StockLevelProposalStatus,
_ProposedBuffer._BufMatPlant AS _BufMatPlant,
MaterialBaseUnit,
cast(_CurrentBuffer.MinimumOrderQuantity as pph_dd_minimumorderquantity preserving type ) AS OrderQuantityInBaseUnit,
cast(_ProposedBuffer.MinimumOrderQuantity as pph_dd_minimumorderquantity preserving type ) AS MinimumOrderQuantity
FROM I_ProdBufLvlPrpsl AS _ProposedBuffer
LEFTOUTERJOIN P_TimeDependentBufferLevels AS _CurrentBuffer ON _CurrentBuffer.Material = _ProposedBuffer.Material AND _CurrentBuffer.Plant = _ProposedBuffer.Plant AND _CurrentBuffer.MRPArea = _ProposedBuffer.MRPArea AND _CurrentBuffer.BufferLevelStartDate <= $session.system_date AND _CurrentBuffer.BufferLevelEndDate >= $session.system_date -- association [1..1]LEFTOUTERJOIN I_DemandDrivenProduct AS _Product ON Material = _Product.Material AND Plant = _Product.Plant AND MRPArea = _Product.MRPArea -- association [0..1]
;