P_PURGMATPRICECHGNETPRICE
Price Change Net Price calc
P_PURGMATPRICECHGNETPRICE is a Consumption CDS View that provides data about "Price Change Net Price calc" in SAP S/4HANA. It reads from 1 data source (P_PurgMatlPriceChg2) and exposes 29 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber, MaterialDocumentYear, Invoice. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PurgMatlPriceChg2 | P_PurgMatlPriceChg2 | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | budat | |
| P_EndDate | budat |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_PurOrdAccountAssignment | AccountAssignment | MatPrice2.PurchaseOrder = AccountAssignment.PurchaseOrder and MatPrice2.PurchaseOrderItem = AccountAssignment.PurchaseOrderItem and MatPrice2.AccountAssignmentNumber = AccountAssignment.AccountAssignmentNumber |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AbapCatalog.sqlViewName | PMMMATLPRC3NTPRC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Price Change Net Price calc | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (29)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | Purchasing Document | |
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| KEY | AccountAssignmentNumber | AccountAssignmentNumber | Account Assgmt No. | |
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| KEY | Invoice | |||
| KEY | MaterialDocumentItem | MaterialDocumentItem | Material Document Item | |
| InvoiceDate | ||||
| PurchasingOrganization | Purchasing Organization | |||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| Supplier | Supplier | |||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Plant | Plant | Valuation Area | ||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| MultipleAcctAssgmtDistribution | MultipleAcctAssgmtDistribution | Distribution | ||
| IsReturnItemValue | IsReturnItemValue | |||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| NetAmount | NetAmount | Stated Amount | ||
| NetPriceAmount | NetPriceAmount | Net Price | ||
| DisplayCurrency | ||||
| BaseUnit | BaseUnit | Unit of Measure | ||
| InvoiceAmtInDisplayCurrency | ||||
| QuantityInBaseUnit | ||||
| curr182endasNetPriceInvoiceAmtInBaseUnit |
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_PURGMATPRICECHGNETPRICE.
-- 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: PMMMATLPRC3NTPRC
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : budat, P_EndDate : budat
CREATE VIEW P_PURGMATPRICECHGNETPRICE AS
SELECT
PurchaseOrder,
PurchaseOrderItem,
AccountAssignmentNumber,
MaterialDocumentYear,
cast( MatPrice2.MaterialDocument as fikz_reginv_invoice ) AS Invoice,
MaterialDocumentItem,
cast( MatPrice2.PostingDate as invdt ) AS InvoiceDate,
cast( PurchasingOrganization as mm_a_purg_org ) AS PurchasingOrganization,
PurchasingGroup,
PurchaseOrderType,
CompanyCode,
cast ( Supplier as odata_lifnr ) AS Supplier,
Material,
MaterialGroup,
Plant,
PurchaseOrderQuantityUnit,
PurchaseOrderDate,
DocumentCurrency,
AccountAssignmentCategory,
MultipleAcctAssgmtDistribution,
IsReturnItemValue,
NetPriceQuantity,
NetAmount,
NetPriceAmount,
cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
BaseUnit,
cast( InvoiceAmtInDisplayCurrency as mm_pur_ana_de_invoice_amount) AS InvoiceAmtInDisplayCurrency,
cast(MatPrice2.QuantityInBaseUnit as abap.dec(13,3) ) AS QuantityInBaseUnit,
case when QuantityInBaseUnit = 0 then 0 else cast ( division( MatPrice2.InvoiceAmtInDisplayCurrency, MatPrice2.QuantityInBaseUnit, 3 ) as abap.curr(18,2) ) end as NetPriceInvoiceAmtInBaseUnit AS curr182endasNetPriceInvoiceAmtInBaseUnit
FROM P_PurgMatlPriceChg2
LEFT OUTER JOIN I_PurOrdAccountAssignment AS AccountAssignment ON MatPrice2.PurchaseOrder = AccountAssignment.PurchaseOrder AND MatPrice2.PurchaseOrderItem = AccountAssignment.PurchaseOrderItem AND MatPrice2.AccountAssignmentNumber = AccountAssignment.AccountAssignmentNumber -- association [1..1]
;
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