C_CmmdtyMTMEndOfDayQry
MtM End of Day Query
C_CmmdtyMTMEndOfDayQry (Consumption)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Cross Applications
C_CmmdtyMTMEndOfDayQry is a Consumption CDS View that provides data about "MtM End of Day Query" in SAP S/4HANA. It reads from 1 data source (I_CmmdtyMTMLogFinValCube) and exposes 110 fields with key fields PricingKey, Version, PricingDocumentItem, VersStockRecordUUID, CommodityPriceExposure.
SAP Help Documentation
| Category | CDS Views for Commodity Management |
|---|---|
| Data Category | Query |
| Status | Released |
This CDS view helps to retrieve end-of-day data for the Mark-to-Market Reporting of commodity derivatives.
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Cross Applications |
| Application Component | LO-CMM-BF |
| Capabilities | Analytical Query |
| Package | Cross Applications for SAP S/4HANA Cloud Private Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CmmdtyMTMLogFinValCube | I_CmmdtyMTMLogFinValCube | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_EndOfDaySnapshotFromDate | cds_evaluation_date | |
| P_DisplayUnitOfMeasure | cds_posrep_view_uom |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMTMPFEODQRY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| Analytics.query | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| EndUserText.label | MtM End of Day Query | view | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | C_CMMDTYMTMENDOFDAYQRY_2 | view |
Fields (110)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PricingKey | PricingKey | A key required to access versioned pricing data | |
| KEY | Version | Version | Version of an MtM Valuation Record | |
| KEY | PricingDocumentItem | PricingDocumentItem | Condition item number | |
| KEY | VersStockRecordUUID | VersStockRecordUUID | GUID assigned to the VlogP stock delta record | |
| KEY | CommodityPriceExposure | CommodityPriceExposure | Commodity Price Exposure ID | |
| KEY | CommodityExposureCategory | CommodityExposureCategory | Exposure Category | |
| KEY | CommodityPriceSubExposure | CommodityPriceSubExposure | Hash key | |
| TotalMtMGainLossCompanyCode | ||||
| ProfitCenter | ProfitCenter | Profit Center | ||
| Plant | Plant | Valuation Area | ||
| PhysicalCommodity | PhysicalCommodity | Commodity | ||
| Material | Material | Material Number | ||
| OriginReferenceDocument | OriginReferenceDocument | Root Document | ||
| SourceDocumentItem | SourceDocumentItem | Source Document Item | ||
| SourceDocumentBusObjType | SourceDocumentBusObjType | Source Document Business Object Type | ||
| EndOfDaySnapshotDate | EndOfDaySnapshotDate | Snapshot Date | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| IncotermsClassification | IncotermsClassification | Incoterms (Part 1) | ||
| IncotermsTransferLocation | IncotermsTransferLocation | Incoterms (Part 2) | ||
| ConditionApplication | ConditionApplication | Application | ||
| StatisticsCurrency | StatisticsCurrency | Statistics Currency | ||
| MTMCalculationGroup | MTMCalculationGroup | MtM Calculation Group | ||
| DerivativeContractMaturityCode | DerivativeContractMaturityCode | Contract Maturity Code | ||
| MaturityKeyDate | MaturityKeyDate | Maturity Key Date | ||
| BasisID | BasisID | Basis ID | ||
| DerivativeContrSpecification | DerivativeContrSpecification | Derivative Contract Specification ID | ||
| MarketIdentifierCode | MarketIdentifierCode | Market Identifier Code | ||
| PricingStatus | PricingStatus | Future/Basis Price Fixation Status | ||
| MTMAdjustmentType | MTMAdjustmentType | Type of adjustment for the MtM or TPL calculation | ||
| ConditionTermRateFixation | ConditionTermRateFixation | Fixation ID | ||
| QuotationPeriodReferenceDate | QuotationPeriodReferenceDate | Reference Date | ||
| ConditionType | ConditionType | Condition type | ||
| SubConditionType | SubConditionType | The key of a sub-condition type | ||
| ConditionTermValueInStstcCrcy | ConditionTermValueInStstcCrcy | Value in Statistical Currency | ||
| DocumentCurrency | DocumentCurrency | SD Document Currency | ||
| ConditionTermValueInDocCrcy | ConditionTermValueInDocCrcy | Value in Document Currency | ||
| ConditionTermRate | ConditionTermRate | Price | ||
| MarketToDocExchRate | MarketToDocExchRate | Exchange Rate: Market to Document Currency | ||
| ConditionTermRateCurrency | ConditionTermRateCurrency | Price Currency | ||
| DocToStatisticalExchRate | DocToStatisticalExchRate | Exchange Rate: Document to Statistics Currency | ||
| CommodityQuantity | CommodityQuantity | Commodity Quantity | ||
| CommodityQuantityInTermUnit | CommodityQuantityInTermUnit | Commodity Quantity in Price Unit | ||
| CommodityUnit | CommodityUnit | Unit of Measure for Commodity | ||
| SalesOrganization | SalesOrganization | Sales Organization | ||
| DistributionChannel | DistributionChannel | Distribution Channel | ||
| Division | Division | Internal Division ID | ||
| Creditor | Creditor | Account Number of Supplier | ||
| SoldToParty | SoldToParty | Customer Number | ||
| StorageLocation | StorageLocation | Storage Location | ||
| Batch | Batch | Batch Number | ||
| GoodsMovementType | GoodsMovementType | Movement Type (Inventory Management) | ||
| ReferenceDocument | ReferenceDocument | Predecessor Document | ||
| ReferenceDocumentItem | ReferenceDocumentItem | Predecessor Document Item | ||
| ReferenceDocBusObjType | ReferenceDocBusObjType | Ref (BOR) Object Type | ||
| ExpectedPaymentDate | ExpectedPaymentDate | Payment Date | ||
| ExchRateEvaluationDate | ExchRateEvaluationDate | Exchange Rate Evaluation Date | ||
| DocToStstcCrcyExchRateEvalDate | DocToStstcCrcyExchRateEvalDate | Document to Statistics Currency Evaluation Date | ||
| BusinessArea | BusinessArea | Business Area | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| MaterialGroup | MaterialGroup | Material Group | ||
| IsIntercompanyTransfer | IsIntercompanyTransfer | Intercompany Transfer | ||
| ConditionTermRateQuantity | ConditionTermRateQuantity | Price Unit | ||
| ConditionTermRateQuantityUnit | ConditionTermRateQuantityUnit | Price UoM | ||
| ConditionTermValueCurrency | ConditionTermValueCurrency | CPE Term - Currency | ||
| BasisType | BasisType | Basis Type | ||
| QuotationPriceType | QuotationPriceType | Type of Price Quotation | ||
| MarketPriceCurrency | MarketPriceCurrency | Market Price Currency | ||
| OldestQuotationDate | OldestQuotationDate | Oldest Quotation Date | ||
| MTMConditionGroup | MTMConditionGroup | MtM Condition Group | ||
| MTMCalcGrpMarketPriceCondition | MTMCalcGrpMarketPriceCondition | Market Price Condition within a calculation group | ||
| ConditionTermExchRateIsFixed | ConditionTermExchRateIsFixed | Indicates that the term is fixed | ||
| CndnTermRateFixationDate | CndnTermRateFixationDate | Rate Fixation Date | ||
| CndnTermRateFixationTime | CndnTermRateFixationTime | Rate Fixation Time | ||
| CndnTermExchRateFixationDate | CndnTermExchRateFixationDate | FX Fixation Date | ||
| CndnTermExchRateFixationTime | CndnTermExchRateFixationTime | FX Fixation Time | ||
| ExchRateMaturityDate | ExchRateMaturityDate | Maturity Date | ||
| BasisMarketRefRate | BasisMarketRefRate | Original Basis Market reference rate | ||
| BasisMarketRefAdjustmentSpread | BasisMarketRefAdjustmentSpread | Adjustment Value | ||
| MarketToDocFrozenExchRate | MarketToDocFrozenExchRate | Exchange Rate: Market to Document Currency at a Key Date | ||
| BsMktRefDrvtvContrMaturityCode | BsMktRefDrvtvContrMaturityCode | Basis Market Reference Contract Maturity Code | ||
| BasisMarketRefRateCurrency | BasisMarketRefRateCurrency | Adjustment Value Currency | ||
| BasisMarketRefKeyDate | BasisMarketRefKeyDate | Basis Market reference maturity keydate | ||
| ConditionTermFactor | ConditionTermFactor | CPE condition type term factor | ||
| ConditionTermRateIsFixed | ConditionTermRateIsFixed | Indicates that the term is fixed | ||
| MaximumVersion | MaximumVersion | Highest Version Number | ||
| ExposureDueDate | ExposureDueDate | Date on which the exposure is due and expires | ||
| ReportingDate | ReportingDate | Reporting Date | ||
| CashFlowDirection | CashFlowDirection | Transaction Flow Direction | ||
| TreasuryPositionLongShortCode | TreasuryPositionLongShortCode | Code: Long or Short Position | ||
| TimeToMaturity | TimeToMaturity | Time to Maturity | ||
| CmmdtyForwardIndexTiming | CmmdtyForwardIndexTiming | Timing/Periodicity of Commodity Forward Indexes | ||
| CmmdtyForwardIndexTimingText | CmmdtyForwardIndexTimingText | Short Text for Fixed Values | ||
| FinancialInstrProductCategory | FinancialInstrProductCategory | Product Category | ||
| FinancialAssetsMgmtProductType | FinancialAssetsMgmtProductType | Product Type | ||
| FinInstrTransactionCategory | FinInstrTransactionCategory | Transaction Category | ||
| FinancialInstrumentProductType | FinancialInstrumentProductType | Financial Transaction Type | ||
| FinancialInstrActivityCategory | FinancialInstrActivityCategory | Transaction Activity Category | ||
| EvaluationDate | EvaluationDate | |||
| MTMDataSourceType | MTMDataSourceType | Type of Data Record | ||
| OriginReferenceDocumentItem | OriginReferenceDocumentItem | Root Document Item | ||
| OriginReferenceDocBusObjType | OriginReferenceDocBusObjType | Root Document (BOR) Object Type | ||
| DeliveryDate | DeliveryDate | Delivery Date | ||
| DeliveryYear | DeliveryYear | Abjusted Reporting Year | ||
| DeliveryMonth | DeliveryMonth | Adjusted Reporting Month | ||
| ExternalKeyFigureValue | ExternalKeyFigureValue | External Key figures | ||
| OptionDeltaFactor | OptionDeltaFactor | Option Delta Factor Value | ||
| FinInstrExternalReference | FinInstrExternalReference | External Reference | ||
| HasError | HasError | Flag: Error occured | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| SystemMessageText | Message Text |
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 C_CmmdtyMTMEndOfDayQry.
-- 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: CMTMPFEODQRY
-- Parameters: P_EndOfDaySnapshotFromDate : cds_evaluation_date, P_DisplayUnitOfMeasure : cds_posrep_view_uom
CREATE VIEW C_CmmdtyMTMEndOfDayQry AS
SELECT
PricingKey,
Version,
PricingDocumentItem,
VersStockRecordUUID,
CommodityPriceExposure,
CommodityExposureCategory,
CommodityPriceSubExposure,
ProfitCenter,
Plant,
PhysicalCommodity,
Material,
OriginReferenceDocument,
SourceDocumentItem,
SourceDocumentBusObjType,
EndOfDaySnapshotDate,
ValidityStartDate,
IncotermsClassification,
IncotermsTransferLocation,
ConditionApplication,
StatisticsCurrency,
MTMCalculationGroup,
DerivativeContractMaturityCode,
MaturityKeyDate,
BasisID,
DerivativeContrSpecification,
MarketIdentifierCode,
PricingStatus,
MTMAdjustmentType,
ConditionTermRateFixation,
QuotationPeriodReferenceDate,
ConditionType,
SubConditionType,
ConditionTermValueInStstcCrcy,
DocumentCurrency,
ConditionTermValueInDocCrcy,
ConditionTermRate,
MarketToDocExchRate,
ConditionTermRateCurrency,
DocToStatisticalExchRate,
CommodityQuantity,
CommodityQuantityInTermUnit,
CommodityUnit,
SalesOrganization,
DistributionChannel,
Division,
Creditor,
SoldToParty,
StorageLocation,
Batch,
GoodsMovementType,
ReferenceDocument,
ReferenceDocumentItem,
ReferenceDocBusObjType,
ExpectedPaymentDate,
ExchRateEvaluationDate,
DocToStstcCrcyExchRateEvalDate,
BusinessArea,
PurchasingOrganization,
MaterialGroup,
IsIntercompanyTransfer,
ConditionTermRateQuantity,
ConditionTermRateQuantityUnit,
ConditionTermValueCurrency,
BasisType,
QuotationPriceType,
MarketPriceCurrency,
OldestQuotationDate,
MTMConditionGroup,
MTMCalcGrpMarketPriceCondition,
ConditionTermExchRateIsFixed,
CndnTermRateFixationDate,
CndnTermRateFixationTime,
CndnTermExchRateFixationDate,
CndnTermExchRateFixationTime,
ExchRateMaturityDate,
BasisMarketRefRate,
BasisMarketRefAdjustmentSpread,
MarketToDocFrozenExchRate,
BsMktRefDrvtvContrMaturityCode,
BasisMarketRefRateCurrency,
BasisMarketRefKeyDate,
ConditionTermFactor,
ConditionTermRateIsFixed,
MaximumVersion,
ExposureDueDate,
ReportingDate,
CashFlowDirection,
TreasuryPositionLongShortCode,
TimeToMaturity,
CmmdtyForwardIndexTiming,
CmmdtyForwardIndexTimingText,
FinancialInstrProductCategory,
FinancialAssetsMgmtProductType,
FinInstrTransactionCategory,
FinancialInstrumentProductType,
FinancialInstrActivityCategory,
EvaluationDate,
MTMDataSourceType,
OriginReferenceDocumentItem,
OriginReferenceDocBusObjType,
DeliveryDate,
DeliveryYear,
DeliveryMonth,
ExternalKeyFigureValue,
OptionDeltaFactor,
FinInstrExternalReference,
HasError,
ControllingArea,
_CmmdtyMtmMessage[1:Language = $session.system_language].SystemMessageText AS SystemMessageText
FROM I_CmmdtyMTMLogFinValCube
;
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