P_MaterialInfo

DDL: P_MATERIALINFO SQL: P_MATINFO Type: view BASIC

P_MaterialInfo is a Basic CDS View in SAP S/4HANA. It reads from 5 data sources (a304, konp, mara, marm, Mbv_Mbew) and exposes 12 fields.

Data Sources (5)

SourceAliasJoin Type
a304 a304 left_outer
konp konp left_outer
mara mara from
marm marm inner
Mbv_Mbew mbvmbew left_outer

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName P_MATINFO view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MASTER view

Fields (12)

KeyFieldSource TableSource FieldDescription
Material mara matnr Vehicle Model
MaterialType mara mtart Product Type
mhdhbelse100endasTotalSLDays
kbetrelse1endasPrice
PriceUnit konp konwa Cond. Currency
Costprice
MaterialPriceInCoCodeCurrency Mbv_Mbew verpr Moving price
Umrez marm umrez Numerator
BaseUnitOfMeasure mara meins Valuation Unit
datab a304 datab Validity period
datbi a304 datbi Validity period
todaysdate

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_MaterialInfo.
-- 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: P_MATINFO

CREATE VIEW P_MaterialInfo AS
SELECT
  mara.matnr AS Material,
  mara.mtart AS MaterialType,
  case when mara.mhdhb <> 0 then mara.mhdhb else 100 end as TotalSLDays AS mhdhbelse100endasTotalSLDays,
  case when konp.kbetr <> 0 then konp.kbetr else 1 end as Price AS kbetrelse1endasPrice,
  konp.konwa AS PriceUnit,
  avg (mbvmbew.stprs) AS Costprice,
  mbvmbew.verpr AS MaterialPriceInCoCodeCurrency,
  marm.umrez AS Umrez,
  mara.meins AS BaseUnitOfMeasure,
  a304.datab AS datab,
  a304.datbi AS datbi,
  $session.system_date AS todaysdate
FROM mara
LEFT OUTER JOIN a304 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN konp ON /* join condition not captured in parsed metadata */
INNER JOIN marm ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN Mbv_Mbew AS mbvmbew ON /* join condition not captured in parsed metadata */
;