C_PH_InventoryQuery

DDL: C_PH_INVENTORYQUERY SQL: CPHINVENTORYQRY Type: view CONSUMPTION Package: GLO_FIN_IS_PH

Ph Inventory Query Philippines

C_PH_InventoryQuery is a Consumption CDS View that provides data about "Ph Inventory Query Philippines" in SAP S/4HANA. It reads from 4 data sources (C_PH_StockQuery, I_Material, I_MaterialText, I_ProductValuation) and exposes 17 fields with key fields Plant, Material, ValuationType, CompanyCode, FiscalYearCurrentPeriod. Part of development package GLO_FIN_IS_PH.

Data Sources (4)

SourceAliasJoin Type
C_PH_StockQuery C_PH_StockQuery from
I_Material I_Material inner
I_MaterialText I_MaterialText inner
I_ProductValuation I_ProductValuation inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CPHINVENTORYQRY view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #AUTOMATED view
EndUserText.label Ph Inventory Query Philippines view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY Plant C_PH_StockQuery Plant Valuation Area
KEY Material C_PH_StockQuery Material Vehicle Model
KEY ValuationType C_PH_StockQuery ValuationType Valuation Type
KEY CompanyCode I_ProductValuation CompanyCode Receiver Company Code
KEY FiscalYearCurrentPeriod C_PH_StockQuery FiscalYearCurrentPeriod Year cur.period
KEY IsCurrentFiscalPeriod C_PH_StockQuery IsCurrentFiscalPeriod Current Period
MovingAveragePrice C_PH_StockQuery MovingAveragePrice Per. Unit Price
StandardPrice C_PH_StockQuery StandardPrice Standard price
ProductPriceControl C_PH_StockQuery ProductPriceControl Price control
TotalValStockQuantity C_PH_StockQuery TotalValStockQuantity Total Stock
TotalValStockValue C_PH_StockQuery TotalValStockValue Tot. Val. Stock
StandardPriceendasItemPrice
Currency I_ProductValuation Currency Valuation Crcy
ValuationClass C_PH_StockQuery ValuationClass Valuation Class
MaterialType I_Material MaterialType Material Type
MaterialBaseUnit I_Material MaterialBaseUnit Valuation Unit
MaterialName

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_PH_InventoryQuery.
-- 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: CPHINVENTORYQRY

CREATE VIEW C_PH_InventoryQuery AS
SELECT
  C_PH_StockQuery.Plant AS Plant,
  C_PH_StockQuery.Material AS Material,
  C_PH_StockQuery.ValuationType AS ValuationType,
  I_ProductValuation.CompanyCode AS CompanyCode,
  C_PH_StockQuery.FiscalYearCurrentPeriod AS FiscalYearCurrentPeriod,
  C_PH_StockQuery.IsCurrentFiscalPeriod AS IsCurrentFiscalPeriod,
  C_PH_StockQuery.MovingAveragePrice AS MovingAveragePrice,
  C_PH_StockQuery.StandardPrice AS StandardPrice,
  C_PH_StockQuery.ProductPriceControl AS ProductPriceControl,
  C_PH_StockQuery.TotalValStockQuantity AS TotalValStockQuantity,
  C_PH_StockQuery.TotalValStockValue AS TotalValStockValue,
  case when C_PH_StockQuery.ProductPriceControl = 'S' then C_PH_StockQuery.StandardPrice when C_PH_StockQuery.ProductPriceControl = 'V' then C_PH_StockQuery.MovingAveragePrice else C_PH_StockQuery.StandardPrice end as ItemPrice AS StandardPriceendasItemPrice,
  I_ProductValuation.Currency AS Currency,
  C_PH_StockQuery.ValuationClass AS ValuationClass,
  I_Material.MaterialType AS MaterialType,
  I_Material.MaterialBaseUnit AS MaterialBaseUnit,
  concat('"', concat(replace(I_MaterialText.MaterialName,'"','""'), '"')) AS MaterialName
FROM C_PH_StockQuery
INNER JOIN I_Material ON /* join condition not captured in parsed metadata */
INNER JOIN I_MaterialText ON /* join condition not captured in parsed metadata */
INNER JOIN I_ProductValuation ON /* join condition not captured in parsed metadata */
;