C_MarkToMarketStockFinancial
ACM MtM for Contract, Stock & CM Fins
C_MarkToMarketStockFinancial (Consumption)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Sales
C_MarkToMarketStockFinancial is a Consumption CDS View that provides data about "ACM MtM for Contract, Stock & CM Fins" in SAP S/4HANA. It reads from 1 data source (I_MarkToMarketStockFinancial) and exposes 108 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType.
SAP Help Documentation
| Category | Union Views for Mark-to-Market Stock Financial Reports |
|---|---|
| Status | Released |
| Corresponding DataSource | 2CCMTMSTOCKFIN |
This CDS view provides the union view for the following mark-to-market scenarios in Agricultural Contract Management (ACM): Physical Contract Stock Commodity Management Financial Derivative Physical Contract Mark-to-Market This feature allows you to: Value your logistics documents against one or multiple components, for example, a commodity future curve, or commodity future and basis Group the components against which you value your contracts, to allow you to produce separate mark-to-market reports for them, for example, mark-to-market for futures and mark-to-market for basis Include future price spreads in your mark-to-market calculations, if you value your logistics documents against distinct commodity futures To calculate the mark-to-market value, the system valuates the root document, which is the application document in ACM. It then refines the valuation for each subsequent document in the document chain. When you post a contract, for example, the system valuates it by performing a pricing simulation based on the current values. The mark-to-market value of each contract is then reported separately, and the value is subtracted from the mark-to-market value of the undelivered quantities in the order. Each logistics document is versioned so that the system can determine a snapshot for any given time. Stock Mark-to-Market Stock mark-to-market represents the availability of stock at a given point of time. Quantities with fixed pricing are considered by the system. As soon as a quantity belonging to a logistics document is realized, it reduces or adds to the stock inventory. Entries updated in stock MtM report are goods movement entries. Goods movements entries are of two types: 02 and 05 (Unrealized Goods Receipts), and 06 (Unrealized Goods Issues). These entries are updated through the orchestration engine, which is selected at runtime for a scenario (for example, Purchase TTO, Sales TTD, and so on). The orchestration engine triggers the process for populating the application entries. Application entries are created if an analysis quantity needs to be adjusted with an LDC quantity. Commodity Management Financial Derivative Mark-to-Market If a financial transaction is created or changed, the system adds a new version to the CMM_VFIND table (for versioned financial transaction data). Each version stores the respective profit or loss event type, depending upon the activities performed on the financial transaction, such as creation of or change in the quantity, price, DCS, transaction data, realization, price fixation, or price removal. The versioned financial transaction data is recorded in save tables to be used for the market risk analyzer (MRA) calculation. For each change in or creation of financial transaction data, a new data record is added. If an error occurs, either in the VFIND or in the save table, the system does not perform an MRA evaluation. The financial transaction record type can be viewed as 10 in the union view. Note The current day reports are used to display a real time snapshot of the current data at the time of report execution. The current day report has view variant as P (default) as mandatory parameter. If the cut-off time on the current day has been reached, the report displays end-of-day data for the current day. If not, the report shows current data for current date.
Prerequisites
Users who want to run reports using this CDS view must have a role based on the business role template listed in the table above. In this role, the following restriction types must be set to read access: CMM_VLOGP FTR_VFIND Users who want to run reports using this CDS view must have the authorization to display the following data: Agricultural Contract Management Physical Contract Mark-to-Market Report Commodity Management Derivative Mark-to-Market Report The following authorization objects are required: Logistics Authorizations: CMM_VLOGP Financial Authorizations: FTR_VFIND
Structure
Object types This view relate
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Sales |
| Application Component | LO-AGR-CM |
| Capabilities | Analytical Query |
| Package | Sales 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 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_MarkToMarketStockFinancial | I_MarkToMarketStockFinancial | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_Language | spras | |
| P_EndOfDaySnapshotFromDate | cds_evaluation_date | |
| P_DisplayUnitOfMeasure | cds_view_uom |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMTMSTOCKFIN | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| Analytics.query | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| EndUserText.label | ACM MtM for Contract, Stock & CM Fins | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.supportedCapabilities | #ANALYTICAL_QUERY | view |
Fields (108)
| 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 | ConditionType | ConditionType | Condition type | |
| KEY | SubConditionType | SubConditionType | The key of a sub-condition type | |
| KEY | VersStockRecordUUID | VersStockRecordUUID | GUID assigned to the VlogP stock delta record | |
| KEY | EndOfDaySnapshotDate | EndOfDaySnapshotDate | Snapshot Date | |
| TotalMtMGainLosskeyCompanyCode | ||||
| KEY | CommodityPriceExposure | CommodityPriceExposure | Commodity Price Exposure ID | |
| KEY | CommodityExposureCategory | CommodityExposureCategory | Exposure Category | |
| KEY | CommodityPriceSubExposure | CommodityPriceSubExposure | Hash key | |
| TotalMtMGainLossProfitCenter | ||||
| Plant | Plant | Valuation Area | ||
| PhysicalCommodity | PhysicalCommodity | Physical Commodity | ||
| Material | Material | Material Number | ||
| OriginReferenceDocument | OriginReferenceDocument | Root Document | ||
| SourceDocumentBusObjType | SourceDocumentBusObjType | Source Document Business Object Type | ||
| SourceDocumentItem | SourceDocumentItem | Source Document Item | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| IncotermsClassification | IncotermsClassification | Incoterms (Part 1) | ||
| IncotermsTransferLocation | IncotermsTransferLocation | Incoterms (Part 2) | ||
| ConditionApplication | ConditionApplication | Application | ||
| 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 | ||
| StatisticsCurrency | StatisticsCurrency | Statistics Currency | ||
| ConditionTermValueInStstcCrcy | ConditionTermValueInStstcCrcy | Value in Statistical Currency | ||
| DocumentCurrency | DocumentCurrency | SD Document Currency | ||
| ConditionTermValueInDocCrcy | ConditionTermValueInDocCrcy | Value in Document Currency | ||
| ConditionTermRate | ConditionTermRate | Price | ||
| ConditionTermRateCurrency | ConditionTermRateCurrency | Price Currency | ||
| CommodityQuantity | CommodityQuantity | Commodity Quantity | ||
| CommodityUnit | CommodityUnit | Unit of Measure for Commodity | ||
| QuotationCurrency | QuotationCurrency | Evaluation in Quotation Currency | ||
| RiskAnalyzerKeyFigInQtanCrcy | RiskAnalyzerKeyFigInQtanCrcy | ContractVvalue (CV) in Quotation Currency | ||
| MarketToDocExchRate | MarketToDocExchRate | Exchange Rate: Market to Document Currency | ||
| DocToStatisticalExchRate | DocToStatisticalExchRate | Exchange Rate: Document to Statistics Currency | ||
| CommodityQuantityInTermUnit | CommodityQuantityInTermUnit | Stk Qty in PriceUnit | ||
| ConditionTermFactor | ConditionTermFactor | CPE condition type term factor | ||
| 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 | ||
| MarketPriceCurrency | MarketPriceCurrency | Market Price Currency | ||
| OldestQuotationDate | OldestQuotationDate | Oldest Quotation Date | ||
| MTMConditionGroup | MTMConditionGroup | MtM Condition 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 | ||
| 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 | ||
| HasError | HasError | Flag: Error occured | ||
| SystemMessageText | Message Text | |||
| ACMSnapshotDate | ACMSnapshotDate | Snapshot Date | ||
| Trader | Trader | Responsible Trader 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 C_MarkToMarketStockFinancial.
-- 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: CMTMSTOCKFIN
-- Parameters: P_Language : spras, P_EndOfDaySnapshotFromDate : cds_evaluation_date, P_DisplayUnitOfMeasure : cds_view_uom
CREATE VIEW C_MarkToMarketStockFinancial AS
SELECT
PricingKey,
Version,
PricingDocumentItem,
ConditionType,
SubConditionType,
VersStockRecordUUID,
EndOfDaySnapshotDate,
CommodityPriceExposure,
CommodityExposureCategory,
CommodityPriceSubExposure,
Plant,
PhysicalCommodity,
Material,
OriginReferenceDocument,
SourceDocumentBusObjType,
SourceDocumentItem,
ValidityStartDate,
IncotermsClassification,
IncotermsTransferLocation,
ConditionApplication,
MTMCalculationGroup,
DerivativeContractMaturityCode,
MaturityKeyDate,
BasisID,
DerivativeContrSpecification,
MarketIdentifierCode,
PricingStatus,
MTMAdjustmentType,
ConditionTermRateFixation,
QuotationPeriodReferenceDate,
StatisticsCurrency,
ConditionTermValueInStstcCrcy,
DocumentCurrency,
ConditionTermValueInDocCrcy,
ConditionTermRate,
ConditionTermRateCurrency,
CommodityQuantity,
CommodityUnit,
QuotationCurrency,
RiskAnalyzerKeyFigInQtanCrcy,
MarketToDocExchRate,
DocToStatisticalExchRate,
CommodityQuantityInTermUnit,
ConditionTermFactor,
SalesOrganization,
DistributionChannel,
Division,
Creditor,
SoldToParty,
StorageLocation,
Batch,
GoodsMovementType,
ReferenceDocument,
ReferenceDocumentItem,
ReferenceDocBusObjType,
ExpectedPaymentDate,
ExchRateEvaluationDate,
DocToStstcCrcyExchRateEvalDate,
BusinessArea,
PurchasingOrganization,
MaterialGroup,
IsIntercompanyTransfer,
ConditionTermRateQuantity,
ConditionTermRateQuantityUnit,
MarketPriceCurrency,
OldestQuotationDate,
MTMConditionGroup,
ConditionTermExchRateIsFixed,
CndnTermRateFixationDate,
CndnTermRateFixationTime,
CndnTermExchRateFixationDate,
CndnTermExchRateFixationTime,
ExchRateMaturityDate,
BasisMarketRefRate,
BasisMarketRefAdjustmentSpread,
MarketToDocFrozenExchRate,
BsMktRefDrvtvContrMaturityCode,
BasisMarketRefRateCurrency,
BasisMarketRefKeyDate,
ConditionTermRateIsFixed,
MaximumVersion,
ExposureDueDate,
ReportingDate,
CashFlowDirection,
TreasuryPositionLongShortCode,
TimeToMaturity,
CmmdtyForwardIndexTiming,
CmmdtyForwardIndexTimingText,
FinancialInstrProductCategory,
FinancialAssetsMgmtProductType,
FinInstrTransactionCategory,
FinancialInstrumentProductType,
FinancialInstrActivityCategory,
EvaluationDate,
MTMDataSourceType,
OriginReferenceDocumentItem,
OriginReferenceDocBusObjType,
DeliveryDate,
DeliveryYear,
DeliveryMonth,
ExternalKeyFigureValue,
OptionDeltaFactor,
HasError,
_DiscPremMTMMessage[1:Language = $session.system_language].SystemMessageText AS SystemMessageText,
ACMSnapshotDate,
Trader
FROM I_MarkToMarketStockFinancial
;
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