P_PurgMatlPriceChg2
Material Price Change 2
P_PurgMatlPriceChg2 is a Consumption CDS View that provides data about "Material Price Change 2" in SAP S/4HANA. It reads from 1 data source (P_PurgMatlPriceChg1) and exposes 28 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber, MaterialDocumentYear, MaterialDocument. Part of development package ODATA_MM_ANALYTICS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PurgMatlPriceChg1 | P_PurgMatlPriceChg1 | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | budat | |
| P_EndDate | budat |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMMATLPRC2 | view | |
| EndUserText.label | Material Price Change 2 | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | MatPriceChange | PurchaseOrder | Purchasing Document |
| KEY | PurchaseOrderItem | MatPriceChange | PurchaseOrderItem | Purchasing Document Item |
| KEY | AccountAssignmentNumber | MatPriceChange | AccountAssignmentNumber | Account Assgmt No. |
| KEY | MaterialDocumentYear | MatPriceChange | MaterialDocumentYear | Material Document Year |
| KEY | MaterialDocument | MatPriceChange | MaterialDocument | Material Doc. |
| KEY | MaterialDocumentItem | MatPriceChange | MaterialDocumentItem | Material Document Item |
| PostingDate | MatPriceChange | PostingDate | Posting Date for GR | |
| PurchasingOrganization | Purchasing Organization | |||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| CompanyCode | MatPriceChange | CompanyCode | Receiver Company Code | |
| Supplier | Supplier | |||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Plant | Plant | Valuation Area | ||
| NetPriceAmount | NetPriceAmount | Net Price | ||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| MultipleAcctAssgmtDistribution | MultipleAcctAssgmtDistribution | Distribution | ||
| IsReturnsItem | IsReturnsItem | Returns Item | ||
| IsReturnItemValue | ||||
| NetAmount | NetAmount | Stated Amount | ||
| DisplayCurrency | ||||
| BaseUnit | BaseUnit | Unit of Measure | ||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| QuantityendendasQuantityInBaseUnit |
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_PurgMatlPriceChg2.
-- 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: PMMMATLPRC2
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : budat, P_EndDate : budat
CREATE VIEW P_PurgMatlPriceChg2 AS
SELECT
MatPriceChange.PurchaseOrder AS PurchaseOrder,
MatPriceChange.PurchaseOrderItem AS PurchaseOrderItem,
MatPriceChange.AccountAssignmentNumber AS AccountAssignmentNumber,
MatPriceChange.MaterialDocumentYear AS MaterialDocumentYear,
MatPriceChange.MaterialDocument AS MaterialDocument,
MatPriceChange.MaterialDocumentItem AS MaterialDocumentItem,
MatPriceChange.PostingDate AS PostingDate,
cast( PurchasingOrganization as mm_a_purg_org ) AS PurchasingOrganization,
PurchasingGroup,
PurchaseOrderType,
MatPriceChange.CompanyCode AS CompanyCode,
cast ( Supplier as odata_lifnr ) AS Supplier,
Material,
MaterialGroup,
Plant,
NetPriceAmount,
PurchaseOrderQuantityUnit,
PurchaseOrderDate,
DocumentCurrency,
AccountAssignmentCategory,
MultipleAcctAssgmtDistribution,
IsReturnsItem,
cast( case when IsReturnsItem = 'X' then -1 else 1 end as int2 ) AS IsReturnItemValue,
NetAmount,
cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
BaseUnit,
NetPriceQuantity,
case when BaseUnit = '' then MatPriceChange.Quantity else case when OrderItemQtyToBaseQtyDnmntr = 0 then 0 else DIVISION(OrderItemQtyToBaseQtyNmrtr, OrderItemQtyToBaseQtyDnmntr, 3 ) * MatPriceChange.Quantity end end as QuantityInBaseUnit AS QuantityendendasQuantityInBaseUnit
FROM P_PurgMatlPriceChg1
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA