P_ProdBufPosCalcFields

DDL: P_PRODBUFPOSCALCFIELDS SQL: PBUFPOSCF Type: view CONSUMPTION

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.

Data Sources (1)

SourceAliasJoin Type
I_ProdBufPositioning _ProductPlantMRPArea from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[1..1] I_MRPArea _MRPArea $projection.MRPArea = _MRPArea.MRPArea
[1..1] I_MaterialGroupText _MaterialGroupText $projection.MaterialGroup = _MaterialGroupText.MaterialGroup

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PBUFPOSCF view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
MaterialBaseUnit MaterialBaseUnit Valuation Unit
BufferedMRPType MRP Type
NonBufferedMRPType MRP Type
MaterialType
MaterialTypeName
MaterialGroup Product Group
MaterialGroupName
Supplier
SupplierName
PurchasingOrganization
SalesOrganization
SalesOrganizationName
PurchasingOrganizationName
Plant22endasPlantName2
ProcurementType ProcurementType Procurement
VariabilityCode VariabilityCode
ReplenishmentLeadTimeCode ReplenishmentLeadTimeCode
ProposedMaterialBufferProfile

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: PBUFPOSCF

CREATE VIEW P_ProdBufPosCalcFields AS
SELECT
  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,
  case when _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)) end as 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
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [1..1]
LEFT OUTER JOIN I_MRPArea AS _MRPArea ON MRPArea = _MRPArea.MRPArea  -- association [1..1]
LEFT OUTER JOIN I_MaterialGroupText AS _MaterialGroupText ON MaterialGroup = _MaterialGroupText.MaterialGroup  -- association [1..1]
;