P_CntrlPurContrWthPriceHist

DDL: P_CNTRLPURCONTRWTHPRICEHIST SQL: PCNTRLWTHPRCHST Type: view CONSUMPTION Package: ODATA_MM_PUR_CCTR_ANALYTICS

Central Contract Price History

P_CntrlPurContrWthPriceHist is a Consumption CDS View that provides data about "Central Contract Price History" in SAP S/4HANA. It reads from 3 data sources (R_CentralPurchaseContract, R_CntrlPurchaseContractItem, I_CntrlPurContrWthPriceHist) and exposes 37 fields with key fields ActivePurchasingDocument, PurchasingDocumentVersion, CentralPurchaseContractItem, ProcmtHubPlantUniqueID, ProcmtHubContrValidityUUID. Part of development package ODATA_MM_PUR_CCTR_ANALYTICS.

Data Sources (3)

SourceAliasJoin Type
R_CentralPurchaseContract CentralContract inner
R_CntrlPurchaseContractItem CentralContractItem inner
I_CntrlPurContrWthPriceHist PriceHistory from

Parameters (2)

NameTypeDefault
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PCNTRLWTHPRCHST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
VDM.private true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Central Contract Price History view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY ActivePurchasingDocument I_CntrlPurContrWthPriceHist ActivePurchasingDocument Active Purchase Doc
KEY PurchasingDocumentVersion I_CntrlPurContrWthPriceHist PurchasingDocumentVersion Version
KEY CentralPurchaseContractItem I_CntrlPurContrWthPriceHist CentralPurchaseContractItem Item in Central Purchase Contract
KEY ProcmtHubPlantUniqueID ProcmtHubPlantUniqueID Plant Unique ID
KEY ProcmtHubContrValidityUUID ProcmtHubContrValidityUUID Validity ID
KEY ProcmtHubContrIsCurrentVersion ProcmtHubContrIsCurrentVersion True
PurchaseContractItemText PurchaseContractItemText Short Text
PurchaseContractType I_CntrlPurContrWthPriceHist PurchaseContractType Order Type
ConditionValidityStartDate ConditionValidityStartDate Valid From
ConditionValidityEndDate ConditionValidityEndDate Valid To
NetPriceAmount NetPriceAmount Net Price
NetPriceInReportingCurrency NetPriceInReportingCurrency NET PRICE
NetPriceInReportingCurrency2 NetPriceInReportingCurrency2 NET PRICE
NetAmount NetAmount Stated Amount
NetAmountInReportingCurrency NetAmountInReportingCurrency NET PRICE
NetAmountInReportingCurrency2 NetAmountInReportingCurrency2 NET PRICE
ProcmtHubContrBasePrDocCrcyAmt ProcmtHubContrBasePrDocCrcyAmt NET PRICE
ProcmtHubContrBasePrCrcy1Amt ProcmtHubContrBasePrCrcy1Amt NET PRICE
ProcmtHubContrBasePrCrcy2Amt ProcmtHubContrBasePrCrcy2Amt NET PRICE
DocumentCurrency I_CntrlPurContrWthPriceHist DocumentCurrency Document Currency
AnalyticalReportingCurrency AnalyticalReportingCurrency Reporting Currency 1
AnalyticalReportingCurrency2 AnalyticalReportingCurrency2 Reporting Currency 2
CreationDate I_CntrlPurContrWthPriceHist CreationDate Time Stamp
Supplier I_CntrlPurContrWthPriceHist Supplier Supplier
CompanyCode I_CntrlPurContrWthPriceHist CompanyCode Receiver Company Code
PurchasingGroup I_CntrlPurContrWthPriceHist PurchasingGroup Purchasing Group
PurchasingOrganization I_CntrlPurContrWthPriceHist PurchasingOrganization Purchasing Organization
Material I_CntrlPurContrWthPriceHist Material Vehicle Model
MaterialGroup I_CntrlPurContrWthPriceHist MaterialGroup Product Group
ChangeReasonIsRelevantForVers ChangeReasonIsRelevantForVers TRUE
OrderQuantityUnit I_CntrlPurContrWthPriceHist OrderQuantityUnit Sales Unit
CreatedByUser I_CntrlPurContrWthPriceHist CreatedByUser User Name
ProcmtHubIncotermsClassfctn ProcmtHubIncotermsClassfctn Incoterms
ProcmtHubIncoterms2Classfctn ProcmtHubIncoterms2Classfctn Incoterms 2
PaymentTerms I_CntrlPurContrWthPriceHist PaymentTerms Pyt Terms
ShippingCondition ShippingCondition Shipping Conditions
ProcmtHubCompanyCodeGroupingID I_CntrlPurContrWthPriceHist ProcmtHubCompanyCodeGroupingID Grouping ID

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_CntrlPurContrWthPriceHist.
-- 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: PCNTRLWTHPRCHST
-- Parameters: P_StartDate : vdm_validitystart, P_EndDate : vdm_validityend

CREATE VIEW P_CntrlPurContrWthPriceHist AS
SELECT
  PriceHistory.ActivePurchasingDocument AS ActivePurchasingDocument,
  PriceHistory.PurchasingDocumentVersion AS PurchasingDocumentVersion,
  PriceHistory.CentralPurchaseContractItem AS CentralPurchaseContractItem,
  ProcmtHubPlantUniqueID,
  ProcmtHubContrValidityUUID,
  ProcmtHubContrIsCurrentVersion,
  PurchaseContractItemText,
  PriceHistory.PurchaseContractType AS PurchaseContractType,
  ConditionValidityStartDate,
  ConditionValidityEndDate,
  NetPriceAmount,
  NetPriceInReportingCurrency,
  NetPriceInReportingCurrency2,
  NetAmount,
  NetAmountInReportingCurrency,
  NetAmountInReportingCurrency2,
  ProcmtHubContrBasePrDocCrcyAmt,
  ProcmtHubContrBasePrCrcy1Amt,
  ProcmtHubContrBasePrCrcy2Amt,
  PriceHistory.DocumentCurrency AS DocumentCurrency,
  AnalyticalReportingCurrency,
  AnalyticalReportingCurrency2,
  PriceHistory.CreationDate AS CreationDate,
  PriceHistory.Supplier AS Supplier,
  PriceHistory.CompanyCode AS CompanyCode,
  PriceHistory.PurchasingGroup AS PurchasingGroup,
  PriceHistory.PurchasingOrganization AS PurchasingOrganization,
  PriceHistory.Material AS Material,
  PriceHistory.MaterialGroup AS MaterialGroup,
  ChangeReasonIsRelevantForVers,
  PriceHistory.OrderQuantityUnit AS OrderQuantityUnit,
  PriceHistory.CreatedByUser AS CreatedByUser,
  ProcmtHubIncotermsClassfctn,
  ProcmtHubIncoterms2Classfctn,
  PriceHistory.PaymentTerms AS PaymentTerms,
  ShippingCondition,
  PriceHistory.ProcmtHubCompanyCodeGroupingID AS ProcmtHubCompanyCodeGroupingID
FROM I_CntrlPurContrWthPriceHist AS PriceHistory
INNER JOIN R_CentralPurchaseContract AS CentralContract ON /* join condition not captured in parsed metadata */
INNER JOIN R_CntrlPurchaseContractItem AS CentralContractItem ON /* join condition not captured in parsed metadata */
;