P_CCTRPriceHistoryVersion

DDL: P_CCTRPRICEHISTORYVERSION SQL: PCCTRPRCHISTV Type: view CONSUMPTION Package: ODATA_MM_PUR_CCTR_ANALYTICS

CCTR Price History Version for Fragment

P_CCTRPriceHistoryVersion is a Consumption CDS View that provides data about "CCTR Price History Version for Fragment" in SAP S/4HANA. It reads from 3 data sources (I_CntrlPurContrWthPriceHist, I_CntrlPurContrWthPriceHist, I_CntrlPurContrWthPriceHist) and exposes 32 fields with key fields ActivePurchasingDocument, PurchasingDocumentVersion, CentralPurchaseContractItem, ProcmtHubContrValidityUUID, ProcmtHubPlantUniqueID. Part of development package ODATA_MM_PUR_CCTR_ANALYTICS.

Data Sources (3)

SourceAliasJoin Type
I_CntrlPurContrWthPriceHist I_CntrlPurContrWthPriceHist from
I_CntrlPurContrWthPriceHist I_CntrlPurContrWthPriceHist union_all
I_CntrlPurContrWthPriceHist I_CntrlPurContrWthPriceHist union_all

Parameters (1)

NameTypeDefault
P_DisplayCurrency displaycurrency

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PCCTRPRCHISTV view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey 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
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY ActivePurchasingDocument ActivePurchasingDocument Active Purchase Doc
KEY PurchasingDocumentVersion PurchasingDocumentVersion Version
KEY CentralPurchaseContractItem CentralPurchaseContractItem Item in Central Purchase Contract
KEY ProcmtHubContrValidityUUID ProcmtHubContrValidityUUID Validity ID
KEY ProcmtHubPlantUniqueID ProcmtHubPlantUniqueID Plant Unique ID
CreationDate CreationDate Time Stamp
ConditionValidityStartDate ConditionValidityStartDate Valid From
ConditionValidityEndDate ConditionValidityEndDate Valid To
NetPriceAmount NetPriceInReportingCurrency NET PRICE
NetAmount NetAmountInReportingCurrency NET PRICE
ProcmtHubContrBasePrDocCrcyAmt ProcmtHubContrBasePrCrcy1Amt NET PRICE
DocumentCurrency DocumentCurrency Document Currency
KEY PurchasingDocumentVersion PurchasingDocumentVersion Version
KEY CentralPurchaseContractItem CentralPurchaseContractItem Item in Central Purchase Contract
KEY ProcmtHubContrValidityUUID ProcmtHubContrValidityUUID Validity ID
KEY ProcmtHubPlantUniqueID ProcmtHubPlantUniqueID Plant Unique ID
CreationDate CreationDate Time Stamp
ConditionValidityStartDate ConditionValidityStartDate Valid From
ConditionValidityEndDate ConditionValidityEndDate Valid To
NetPriceAmount NetPriceInReportingCurrency2 NET PRICE
NetAmount NetAmountInReportingCurrency2 NET PRICE
ProcmtHubContrBasePrDocCrcyAmt ProcmtHubContrBasePrCrcy2Amt NET PRICE
DocumentCurrency DocumentCurrency Document Currency
KEY PurchasingDocumentVersion PurchasingDocumentVersion Version
KEY CentralPurchaseContractItem CentralPurchaseContractItem Item in Central Purchase Contract
KEY ProcmtHubContrValidityUUID ProcmtHubContrValidityUUID Validity ID
KEY ProcmtHubPlantUniqueID ProcmtHubPlantUniqueID Plant Unique ID
CreationDate CreationDate Time Stamp
ConditionValidityStartDate ConditionValidityStartDate Valid From
ConditionValidityEndDate ConditionValidityEndDate Valid To
DocumentCurrency DocumentCurrency Document Currency
DisplayCurrency

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_CCTRPriceHistoryVersion.
-- 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: PCCTRPRCHISTV
-- Parameters: P_DisplayCurrency : displaycurrency

CREATE VIEW P_CCTRPriceHistoryVersion AS
SELECT
  ActivePurchasingDocument,
  PurchasingDocumentVersion,
  CentralPurchaseContractItem,
  ProcmtHubContrValidityUUID,
  ProcmtHubPlantUniqueID,
  CreationDate,
  ConditionValidityStartDate,
  ConditionValidityEndDate,
  NetPriceInReportingCurrency AS NetPriceAmount,
  NetAmountInReportingCurrency AS NetAmount,
  ProcmtHubContrBasePrCrcy1Amt AS ProcmtHubContrBasePrDocCrcyAmt,
  DocumentCurrency,
  :P_DisplayCurrency AS DisplayCurrency
FROM I_CntrlPurContrWthPriceHist
-- UNION ALL with additional select branch(es): I_CntrlPurContrWthPriceHist
;