P_InvtryTurnoverAvgStock

DDL: P_INVTRYTURNOVERAVGSTOCK Type: view_entity CONSUMPTION Package: ODATA_MM_IM_INV_TURNOVR_ANLYS

Average Stock per Day

P_InvtryTurnoverAvgStock is a Consumption CDS View that provides data about "Average Stock per Day" in SAP S/4HANA. It reads from 1 data source (I_MatlDocWeightedStock) and exposes 9 fields with key fields Material, Plant, InventoryValuationType, MaterialBaseUnit, ValuationArea. Part of development package ODATA_MM_IM_INV_TURNOVR_ANLYS.

Data Sources (1)

SourceAliasJoin Type
I_MatlDocWeightedStock I_MatlDocWeightedStock from

Parameters (2)

NameTypeDefault
P_StartDate vdm_v_start_date
P_EndDate vdm_v_end_date

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Average Stock per Day view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY Material StockIdentifyingMaterial
KEY Plant Plant Valuation Area
KEY InventoryValuationType InventoryValuationType Valuation Type
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
KEY ValuationArea ValuationArea Valuation Area
KEY CostEstimate CostEstimate Cost EstimateNo
KEY CompanyCode CompanyCode Receiver Company Code
AvgPeriodStkQtyInBaseUnit
_CompanyCode _CompanyCode

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_InvtryTurnoverAvgStock.
-- 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.
-- Parameters: P_StartDate : vdm_v_start_date, P_EndDate : vdm_v_end_date

CREATE VIEW P_InvtryTurnoverAvgStock AS
SELECT
  StockIdentifyingMaterial AS Material,
  Plant,
  InventoryValuationType,
  MaterialBaseUnit,
  ValuationArea,
  CostEstimate,
  CompanyCode,
  sum(matdoc.WgtdPerdStkChgQtyInBaseUnit) AS AvgPeriodStkQtyInBaseUnit
FROM I_MatlDocWeightedStock
;