P_MaterialKPIPhysInvtryDiff

DDL: P_MATERIALKPIPHYSINVTRYDIFF Type: view_entity COMPOSITE Package: ODATA_MM_IM_PI_CYC_MAINT

Physical Inv Differences for materials

P_MaterialKPIPhysInvtryDiff is a Composite CDS View that provides data about "Physical Inv Differences for materials" in SAP S/4HANA. It reads from 1 data source (P_PhysInvtryDocItemPerYear) and exposes 7 fields with key fields Material, Plant. Part of development package ODATA_MM_IM_PI_CYC_MAINT.

Data Sources (1)

SourceAliasJoin Type
P_PhysInvtryDocItemPerYear P_PhysInvtryDocItemPerYear from

Parameters (1)

NameTypeDefault
P_KeyDate vdm_v_start_date

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
Currency Currency Valuation Crcy
MaterialBaseUnit MaterialBaseUnit Valuation Unit
DifferenceAmtPerYrInCoCodeCrcy
PInvDiffQtyPerYearInBaseUnit
NumberOfPInvAdjustmentsPerYear

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_MaterialKPIPhysInvtryDiff.
-- 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_KeyDate : vdm_v_start_date

CREATE VIEW P_MaterialKPIPhysInvtryDiff AS
SELECT
  Material,
  Plant,
  Currency,
  MaterialBaseUnit,
  sum(DifferenceAmtPerYrInCoCodeCrcy) AS DifferenceAmtPerYrInCoCodeCrcy,
  sum(PInvDiffQtyPerYearInBaseUnit) AS PInvDiffQtyPerYearInBaseUnit,
  sum(NumberOfPInvAdjustmentsPerYear) AS NumberOfPInvAdjustmentsPerYear
FROM P_PhysInvtryDocItemPerYear
;