P_CmmdtyMtmValue
P_CmmdtyMtmValue is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_Cpe_T_Value_Rounded) and exposes 107 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_Cpe_T_Value_Rounded | P_Cpe_T_Value_Rounded | from |
Parameters (6)
| Name | Type | Default |
|---|---|---|
| P_consumption_type | cmm_vlogp_consumptiontype | |
| P_valuation_date0 | cmm_eval_keydate | |
| P_valuation_date1 | cmm_eval_keydate | |
| P_FX_valuation_date | cmm_eval_keydate | |
| P_snapshot_date0 | cmm_dend_cutdate | |
| P_snapshot_date1 | cmm_dend_cutdate |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCMMDTYMTMVALUE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (107)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PricingKey | termvalue | PricingKey | Pricing Key |
| KEY | Version | termvalue | Version | XML Vers. |
| KEY | PricingDocumentItem | termvalue | PricingDocumentItem | Item |
| KEY | ConditionType | termvalue | ConditionType | Condition type |
| KEY | SubConditionType | termvalue | SubConditionType | |
| KEY | VersStockRecordUUID | termvalue | VersStockRecordUUID | |
| KEY | valuationDate | termvalue | valuationDate | Valuation Date |
| KEY | FXvaluationDate | termvalue | FXvaluationDate | |
| KEY | FXvaluationDateDocToStstc | termvalue | FXvaluationDateDocToStstc | |
| KEY | Scenario | termvalue | Scenario | VAT Scenario |
| SnapshotDate0 | termvalue | SnapshotDate0 | ||
| SnapshotDate1 | termvalue | SnapshotDate1 | ||
| DataSelectionType | termvalue | DataSelectionType | ||
| MTMDataSourceType | termvalue | MTMDataSourceType | Type of Data Record | |
| ValidityStartDate | termvalue | ValidityStartDate | Validity Start Date | |
| ValidityStartDateTime | termvalue | ValidityStartDateTime | Valid From Timestamp | |
| EndOfDayTimestampFrom | termvalue | EndOfDayTimestampFrom | ||
| EndOfDayTimestampTo | termvalue | EndOfDayTimestampTo | ||
| EndOfDaySnapshotDate | termvalue | EndOfDaySnapshotDate | ||
| MaximumVersion | termvalue | MaximumVersion | Highest Version | |
| PreviousVersion | termvalue | PreviousVersion | ||
| PreviousSubConditionType | termvalue | PreviousSubConditionType | ||
| CompanyCode | ||||
| SalesOrganization | termvalue | SalesOrganization | Sales Organization | |
| DistributionChannel | termvalue | DistributionChannel | RefDistCh-Cust/Mat. | |
| Division | termvalue | Division | Internal Division ID | |
| Creditor | termvalue | Creditor | Supplier | |
| SoldToParty | termvalue | SoldToParty | Sold-to Party | |
| Material | termvalue | Material | Vehicle Model | |
| PhysicalCommodity | termvalue | PhysicalCommodity | ||
| Plant | termvalue | Plant | Valuation Area | |
| StorageLocation | termvalue | StorageLocation | StorageLocation | |
| Batch | termvalue | Batch | Lot No. | |
| GoodsMovementType | termvalue | GoodsMovementType | Movement Type | |
| IncotermsClassification | ||||
| IncotermsTransferLocation | termvalue | IncotermsTransferLocation | Incoterms 2 | |
| ConditionApplication | termvalue | ConditionApplication | Application | |
| SourceDocument | termvalue | SourceDocument | Document | |
| SourceDocumentItem | termvalue | SourceDocumentItem | ||
| SourceDocumentBusObjType | termvalue | SourceDocumentBusObjType | ||
| OriginReferenceDocument | termvalue | OriginReferenceDocument | Root Document | |
| OriginReferenceDocBusObjType | termvalue | OriginReferenceDocBusObjType | Root (BOR) Obj. Type | |
| OriginReferenceDocumentItem | termvalue | OriginReferenceDocumentItem | Root Document Item | |
| ReferenceDocument | termvalue | ReferenceDocument | Reference Document | |
| ReferenceDocumentItem | termvalue | ReferenceDocumentItem | Reference item | |
| ReferenceDocBusObjType | termvalue | ReferenceDocBusObjType | Pred(BOR) Object Typ | |
| DeliveryDate | termvalue | DeliveryDate | Delivery Date | |
| DeliveryYear | ||||
| DeliveryMonth | ||||
| ExpectedPaymentDate | termvalue | ExpectedPaymentDate | ||
| StatisticsCurrency | termvalue | StatisticsCurrency | ||
| DocumentCurrency | termvalue | DocumentCurrency | Document Currency | |
| ProfitCenter | termvalue | ProfitCenter | Profit Center | |
| BusinessArea | termvalue | BusinessArea | Business Area | |
| PurchasingOrganization | termvalue | PurchasingOrganization | Purchasing Organization | |
| MaterialGroup | termvalue | MaterialGroup | Product Group | |
| IsIntercompanyTransfer | termvalue | IsIntercompanyTransfer | ||
| ConditionTermRate | ||||
| MarketToDocExchrate | termvalue | MarketToDocExchrate | ||
| MarketToDocFrozenExchrate | termvalue | MarketToDocFrozenExchrate | ||
| MarketToDocExchrateDate | termvalue | MarketToDocExchrateDate | ||
| ConditionTermRateCurrency | termvalue | ConditionTermRateCurrency | ||
| ConditionTermRateQuantity | termvalue | ConditionTermRateQuantity | ||
| ConditionTermRateQuantityUnit | ||||
| dec318asConditionTermValue | ||||
| ConditionTermValueInMarketCurr | ||||
| ConditionTermValueCurrency | ||||
| QuotationPeriodReferenceDate | termvalue | QuotationPeriodReferenceDate | ||
| BasisID | ||||
| BasisType | termvalue | BasisType | Basis Type | |
| DerivativeContrSpecification | termvalue | DerivativeContrSpecification | DCS ID | |
| MarketIdentifierCode | termvalue | MarketIdentifierCode | MIC | |
| MaturityKeyDate | termvalue | MaturityKeyDate | Maturity Key Date | |
| CommodityContractMaturityCode | termvalue | CommodityContractMaturityCode | ||
| QuotationPriceType | termvalue | QuotationPriceType | Price Type | |
| QuotationCurrencyendendasMarketCurrency | ||||
| OldestQuotationDate | termvalue | OldestQuotationDate | ||
| SystemMessageNumber | termvalue | SystemMessageNumber | Message Number | |
| CommodityQuantityInBaseUnit | ||||
| CommodityQuantityInTermUnit | ||||
| CommodityUnit | termvalue | CommodityUnit | Order Unit | |
| MaterialBaseUnit | termvalue | MaterialBaseUnit | Valuation Unit | |
| MTMConditionGroupCategory | termvalue | MTMConditionGroupCategory | ||
| MTMConditionGroup | termvalue | MTMConditionGroup | ||
| MTMCalculationGroup | termvalue | MTMCalculationGroup | ||
| MTMAdjustmentType | termvalue | MTMAdjustmentType | ||
| MTMCalcGrpMarketPriceCondition | termvalue | MTMCalcGrpMarketPriceCondition | ||
| ConditionTermRateIsFixed | termvalue | ConditionTermRateIsFixed | ||
| ConditionTermExchRateIsFixed | termvalue | ConditionTermExchRateIsFixed | ||
| ConditionTermRateFixation | termvalue | ConditionTermRateFixation | ||
| PricingStatus | termvalue | PricingStatus | ||
| CndnTermRateFixationDate | termvalue | CndnTermRateFixationDate | ||
| CndnTermRateFixationTime | termvalue | CndnTermRateFixationTime | ||
| CndnTermExchRateFixationDate | termvalue | CndnTermExchRateFixationDate | ||
| CndnTermExchRateFixationTime | termvalue | CndnTermExchRateFixationTime | ||
| FixedExchRateDate | termvalue | FixedExchRateDate | ||
| ExchRateMaturityDate | termvalue | ExchRateMaturityDate | ||
| BsMktRefDrvtvContrMaturityCode | termvalue | BsMktRefDrvtvContrMaturityCode | ||
| BasisMarketRefRate | termvalue | BasisMarketRefRate | ||
| BasisMarketRefRateCurrency | termvalue | BasisMarketRefRateCurrency | ||
| BasisMarketRefKeyDate | termvalue | BasisMarketRefKeyDate | ||
| BasisMarketRefAdjustmentSpread | termvalue | BasisMarketRefAdjustmentSpread | ||
| PnLDataType | ||||
| PrevVersionCommodityQuantity | termvalue | PrevVersionCommodityQuantity | ||
| PreviousVersionQuantitySign | termvalue | PreviousVersionQuantitySign | ||
| PrevVersCndnTermRateCurrency | termvalue | PrevVersCndnTermRateCurrency | ||
| PrevVersionConditionTermValue | termvalue | PrevVersionConditionTermValue |
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_CmmdtyMtmValue.
-- 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: PCMMDTYMTMVALUE
-- Parameters: P_consumption_type : cmm_vlogp_consumptiontype, P_valuation_date0 : cmm_eval_keydate, P_valuation_date1 : cmm_eval_keydate, P_FX_valuation_date : cmm_eval_keydate, P_snapshot_date0 : cmm_dend_cutdate, P_snapshot_date1 : cmm_dend_cutdate
CREATE VIEW P_CmmdtyMtmValue AS
SELECT
termvalue.PricingKey AS PricingKey,
termvalue.Version AS Version,
termvalue.PricingDocumentItem AS PricingDocumentItem,
termvalue.ConditionType AS ConditionType,
termvalue.SubConditionType AS SubConditionType,
termvalue.VersStockRecordUUID AS VersStockRecordUUID,
termvalue.valuationDate AS valuationDate,
termvalue.FXvaluationDate AS FXvaluationDate,
termvalue.FXvaluationDateDocToStstc AS FXvaluationDateDocToStstc,
termvalue.Scenario AS Scenario,
termvalue.SnapshotDate0 AS SnapshotDate0,
termvalue.SnapshotDate1 AS SnapshotDate1,
termvalue.DataSelectionType AS DataSelectionType,
termvalue.MTMDataSourceType AS MTMDataSourceType,
termvalue.ValidityStartDate AS ValidityStartDate,
termvalue.ValidityStartDateTime AS ValidityStartDateTime,
termvalue.EndOfDayTimestampFrom AS EndOfDayTimestampFrom,
termvalue.EndOfDayTimestampTo AS EndOfDayTimestampTo,
termvalue.EndOfDaySnapshotDate AS EndOfDaySnapshotDate,
termvalue.MaximumVersion AS MaximumVersion,
termvalue.PreviousVersion AS PreviousVersion,
termvalue.PreviousSubConditionType AS PreviousSubConditionType,
termvalue.SalesOrganization AS SalesOrganization,
termvalue.DistributionChannel AS DistributionChannel,
termvalue.Division AS Division,
termvalue.Creditor AS Creditor,
termvalue.SoldToParty AS SoldToParty,
termvalue.Material AS Material,
termvalue.PhysicalCommodity AS PhysicalCommodity,
termvalue.Plant AS Plant,
termvalue.StorageLocation AS StorageLocation,
termvalue.Batch AS Batch,
termvalue.GoodsMovementType AS GoodsMovementType,
termvalue.IncotermsTransferLocation AS IncotermsTransferLocation,
termvalue.ConditionApplication AS ConditionApplication,
termvalue.SourceDocument AS SourceDocument,
termvalue.SourceDocumentItem AS SourceDocumentItem,
termvalue.SourceDocumentBusObjType AS SourceDocumentBusObjType,
termvalue.OriginReferenceDocument AS OriginReferenceDocument,
termvalue.OriginReferenceDocBusObjType AS OriginReferenceDocBusObjType,
termvalue.OriginReferenceDocumentItem AS OriginReferenceDocumentItem,
termvalue.ReferenceDocument AS ReferenceDocument,
termvalue.ReferenceDocumentItem AS ReferenceDocumentItem,
termvalue.ReferenceDocBusObjType AS ReferenceDocBusObjType,
termvalue.DeliveryDate AS DeliveryDate,
cast ( substring(termvalue.DeliveryDate, 1, 4) as cds_adjusted_reporting_year ) AS DeliveryYear,
cast ( substring(termvalue.DeliveryDate, 5, 2) as cds_adjusted_reporting_month ) AS DeliveryMonth,
termvalue.ExpectedPaymentDate AS ExpectedPaymentDate,
termvalue.StatisticsCurrency AS StatisticsCurrency,
termvalue.DocumentCurrency AS DocumentCurrency,
termvalue.ProfitCenter AS ProfitCenter,
termvalue.BusinessArea AS BusinessArea,
termvalue.PurchasingOrganization AS PurchasingOrganization,
termvalue.MaterialGroup AS MaterialGroup,
termvalue.IsIntercompanyTransfer AS IsIntercompanyTransfer,
termvalue.MarketToDocExchrate AS MarketToDocExchrate,
termvalue.MarketToDocFrozenExchrate AS MarketToDocFrozenExchrate,
termvalue.MarketToDocExchrateDate AS MarketToDocExchrateDate,
termvalue.ConditionTermRateCurrency AS ConditionTermRateCurrency,
termvalue.ConditionTermRateQuantity AS ConditionTermRateQuantity,
cast (termvalue.ConditionTermValueInMarketCurr * termvalue.ValueSign as abap.dec(24,11)) AS ConditionTermValueInMarketCurr,
termvalue.QuotationPeriodReferenceDate AS QuotationPeriodReferenceDate,
termvalue.BasisType AS BasisType,
termvalue.DerivativeContrSpecification AS DerivativeContrSpecification,
termvalue.MarketIdentifierCode AS MarketIdentifierCode,
termvalue.MaturityKeyDate AS MaturityKeyDate,
termvalue.CommodityContractMaturityCode AS CommodityContractMaturityCode,
termvalue.QuotationPriceType AS QuotationPriceType,
case termvalue.ConditionTermRateIsFixed when 'Y' then termvalue.QuotationCurrency when 'X' then case when termvalue.MTMAdjustmentType <> '10' then termvalue.QuotationCurrency end end as MarketCurrency AS QuotationCurrencyendendasMarketCurrency,
termvalue.OldestQuotationDate AS OldestQuotationDate,
termvalue.SystemMessageNumber AS SystemMessageNumber,
cast (cast (termvalue.CommodityQuantityInBaseUnit * termvalue.QuantitySign as abap.quan(17,3)) as cds_cmmdtyqty_in_baseuom) AS CommodityQuantityInBaseUnit,
cast (cast (termvalue.CommodityQuantityInTermUnit * termvalue.QuantitySign as abap.quan(17,3)) as cds_cmmdtyqty_in_termuom) AS CommodityQuantityInTermUnit,
termvalue.CommodityUnit AS CommodityUnit,
termvalue.MaterialBaseUnit AS MaterialBaseUnit,
termvalue.MTMConditionGroupCategory AS MTMConditionGroupCategory,
termvalue.MTMConditionGroup AS MTMConditionGroup,
termvalue.MTMCalculationGroup AS MTMCalculationGroup,
termvalue.MTMAdjustmentType AS MTMAdjustmentType,
termvalue.MTMCalcGrpMarketPriceCondition AS MTMCalcGrpMarketPriceCondition,
termvalue.ConditionTermRateIsFixed AS ConditionTermRateIsFixed,
termvalue.ConditionTermExchRateIsFixed AS ConditionTermExchRateIsFixed,
termvalue.ConditionTermRateFixation AS ConditionTermRateFixation,
termvalue.PricingStatus AS PricingStatus,
termvalue.CndnTermRateFixationDate AS CndnTermRateFixationDate,
termvalue.CndnTermRateFixationTime AS CndnTermRateFixationTime,
termvalue.CndnTermExchRateFixationDate AS CndnTermExchRateFixationDate,
termvalue.CndnTermExchRateFixationTime AS CndnTermExchRateFixationTime,
termvalue.FixedExchRateDate AS FixedExchRateDate,
termvalue.ExchRateMaturityDate AS ExchRateMaturityDate,
termvalue.BsMktRefDrvtvContrMaturityCode AS BsMktRefDrvtvContrMaturityCode,
termvalue.BasisMarketRefRate AS BasisMarketRefRate,
termvalue.BasisMarketRefRateCurrency AS BasisMarketRefRateCurrency,
termvalue.BasisMarketRefKeyDate AS BasisMarketRefKeyDate,
termvalue.BasisMarketRefAdjustmentSpread AS BasisMarketRefAdjustmentSpread,
termvalue.PrevVersionCommodityQuantity AS PrevVersionCommodityQuantity,
termvalue.PreviousVersionQuantitySign AS PreviousVersionQuantitySign,
termvalue.PrevVersCndnTermRateCurrency AS PrevVersCndnTermRateCurrency,
termvalue.PrevVersionConditionTermValue AS PrevVersionConditionTermValue
FROM P_Cpe_T_Value_Rounded
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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