P_ProdBufPosCalcFields is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_ProdBufPositioning) and exposes 21 fields with key fields Material, Plant, MRPArea. It has 3 associations to related views.
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_ProdBufPosCalcFields.-- 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: PBUFPOSCFCREATE VIEW P_ProdBufPosCalcFields ASSELECT
Material,
Plant,
MRPArea,
MaterialBaseUnit,
cast( MRPType as dismm ) AS BufferedMRPType,
cast( MRPType as dismm ) AS NonBufferedMRPType,
cast(_Material.ProductType as producttype) AS MaterialType,
cast(_Material._ProductType._Text[1:Language = $session.system_language].MaterialTypeName as producttypename) AS MaterialTypeName,
cast (MaterialGroup as productgroup) AS MaterialGroup,
_ProductPlantMRPArea._MaterialGroupText[1:Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
cast( '' as md_supplier ) AS Supplier,
cast ('' as /iam/vendor_text) AS SupplierName,
cast( '' as ekorg_ll ) AS PurchasingOrganization,
cast('' as vkorg) AS SalesOrganization,
cast ('' as salesorganizationname) AS SalesOrganizationName,
cast( ' ' as mm_a_purg_org_name ) AS PurchasingOrganizationName,
casewhen _ProductPlantMRPArea.Plant <> _ProductPlantMRPArea.MRPArea then concat(_Material._Text[1:Language = $session.system_language].ProductName, concat_with_space(',', concat_with_space(_Plant.PlantName, concat('(', concat(_ProductPlantMRPArea.Plant, concat(')', concat_with_space(',', concat_with_space(_MRPArea.MRPAreaText, concat('(', concat(_ProductPlantMRPArea.MRPArea,')')), 2),2)))),2),2)) else concat(_Material._Text[1:Language = $session.system_language].ProductName, concat_with_space(',', concat_with_space(_Plant.PlantName, concat('(', concat(_ProductPlantMRPArea.Plant,')')),2),2)) endas PlantName2 AS Plant22endasPlantName2,
ProcurementType,
VariabilityCode,
ReplenishmentLeadTimeCode,
cast(cast(concat(ProcurementType,concat('-',concat(concat(VariabilityCode,'-'),ReplenishmentLeadTimeCode))) as abap.char( 80 )) as pph_materialbufferprofiletxt preserving type) AS ProposedMaterialBufferProfile
FROM I_ProdBufPositioning AS _ProductPlantMRPArea
LEFTOUTERJOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [1..1]LEFTOUTERJOIN I_MRPArea AS _MRPArea ON MRPArea = _MRPArea.MRPArea -- association [1..1]LEFTOUTERJOIN I_MaterialGroupText AS _MaterialGroupText ON MaterialGroup = _MaterialGroupText.MaterialGroup -- association [1..1]
;