I_DerivativeCmmdtyExpsr
Drvtv Basic Layer Select data from VFIND
I_DerivativeCmmdtyExpsr (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Financial Operations
I_DerivativeCmmdtyExpsr is a Basic CDS View (Dimension) that provides data about "Drvtv Basic Layer Select data from VFIND" in SAP S/4HANA. It reads from 1 data source (cmm_vfind) and exposes 76 fields with key fields SAPClient, CompanyCode, CommodityPriceExposure, CommodityExposureCategory, CommodityPriceSubExposure. It has 7 associations to related views.
SAP Help Documentation
| Category | CDS Views for Commodity Management |
|---|---|
| Status | Released |
This CDS helps to retrieve records from database table CMM_VFIND ( CMM Versioned Financial Transactions Data ) for the commodity risk reporting of derivative transactions. CMM_VFIND provides consistent source data enabling an almost real time reporting. This table allows the following queries for Commodity Position Reporting, Mark-to-Market Reporting, and P/L Reporting: Current Date Query Day-over-Day Query End-Of-Day Query
Prerequisites
To use this view, you must have activated the business function FIN_TRM_COMM_RM .
Structure
Some important measures and attributes are: Derivative Contract: Derivative contract specification ID of a listed option or commodity future traded at the exchange Fixation Status: The status shows whether the price of an commodity exposure is floated (only relevant for floating priced commodity risk exposures) or fixated
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Financial Operations |
| Application Component | FIN-FSCM-CMM-RSK |
| Capabilities | Data Source in SQL Select, Data Provider for Analytical Queries, Data Source for Defining CDS Entities |
| Package | Financial Operations 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 |
|---|---|---|
| cmm_vfind | cmm_vfind | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_DerivativeContrSpec | _DerivativeContrSpecification | $projection.DerivativeContrSpecification = _DerivativeContrSpecification.DerivativeContrSpecification |
| [0..1] | I_MarketIdentCode | _MarketIdentifierCode | $projection.MarketIdentifierCode = _MarketIdentifierCode.MarketIdentifierCode |
| [0..1] | I_Cmmdty | _PhysicalCommodity | $projection.Commodity = _PhysicalCommodity.Commodity |
| [0..1] | I_CmmdtyPriceFixationStatus | _CommodityPriceFixationStatus | $projection.CommodityPriceFixationStatus = _CommodityPriceFixationStatus.CommodityPriceFixationStatus |
| [0..1] | I_FinAssetsMgntProductType | _FinAssetsMgmtProductType | $projection.FinancialAssetsMgmtProductType = _FinAssetsMgmtProductType.FinancialAssetsMgmtProductType |
| [0..1] | I_UnitOfMeasure | _UnitOfMeasure | $projection.CommodityPriceExposureUnit = _UnitOfMeasure.UnitOfMeasure |
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Drvtv Basic Layer Select data from VFIND | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Metadata.allowExtensions | true | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AbapCatalog.sqlViewName | IVFINDDB | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AbapCatalog.preserveKey | true | view |
Fields (76)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SAPClient | mandt | Editing Client | |
| KEY | CompanyCode | company_code | Company Code | |
| KEY | CommodityPriceExposure | exposure_id | Commodity Price Exposure ID | |
| KEY | CommodityExposureCategory | exposure_cat | Exposure Category | |
| KEY | CommodityPriceSubExposure | exposure_subkey | Expo Subkey | |
| KEY | CommodityPriceExposureVersion | version | Version of a Commodity Price Exposure | |
| ValidityStartDateTime | valid_from_tst | Valid-From Timestamp of Commodity Derivative | ||
| ValidityEndDateTime | valid_to_tst | Valid-To Timestamp of Commodity Derivative | ||
| ValidityStartDate | valid_from_date | Valid-From Date of Exposure | ||
| ValidityStartTime | valid_from_time | Valid-From Time of Commodity Derivative | ||
| ValidityEndDate | valid_to_date | Valid-To Date of Commodity Derivative | ||
| ValidityEndTime | valid_to_time | Valid-To Time of Commodity Derivative | ||
| MaximumVersion | version_max | Highest Version Number | ||
| RiskAnalyzerVersionUUID | version_guid | CMM_VFIND Version GUID | ||
| ExposureDueDate | expos_due_date | Date on which the exposure is due and expires | ||
| ReportingDate | reporting_date | Reporting Date | ||
| Commodity | phys_comm_id | Commodity | ||
| CashFlowDirection | side | Transaction Flow Direction | ||
| TreasuryPositionLongShortCode | direction | Indicates whether it is a long or a short position | ||
| DerivativeContrSpecification | dcs | Derivative Contract Specification ID | ||
| MarketIdentifierCode | mic | Market Identifier Code | ||
| QuotationPriceType | price_type | Type of Price Quotation | ||
| TimeToMaturity | tenor | Time to Maturity | ||
| CmmdtyForwardIndexTiming | timing | Timing/Periodicity of Commodity Forward Indexes | ||
| MaturityKeyDate | keydate | Maturity Key Date | ||
| DerivativeContractMaturityCode | contract_code | Contract Maturity Code | ||
| FinancialInstrProductCategory | product_cat | Product Category | ||
| FinancialAssetsMgmtProductType | product_type | Product Type | ||
| FinInstrTransactionCategory | f_trans_cat | Transaction Category | ||
| FinancialInstrumentProductType | trans_type | Financial Transaction Type | ||
| FinancialInstrActivityCategory | trans_act_type | Transaction Activity Category | ||
| FinancialObject | objnr | Financial Object Number | ||
| PnLEventType | event_type | Profit and Loss Event Type | ||
| HasError | has_error | Error Flag for Data Record of Commodity Risk Analytics | ||
| IsNotRelevantForMTMRisk | is_not_relevant | Indicates whether derivative entry is reporting relevant | ||
| CalculationPeriodStartDate | calc_start_date | Start Date of Calculation Period | ||
| CalculationPeriodEndDate | calc_end_date | End Date of Calculation Period | ||
| TermStartDate | start_term | Term Start | ||
| TermEndDate | end_term | Term End | ||
| DeliveryDate | delivery_date | Delivery Date of a Commodity Derivative | ||
| NumberOfCommodityContracts | number_of_contracts | Number of Contracts | ||
| CommodityPriceExposureUnit | unit_of_measure | Unit of Measure for the Commodity | ||
| CommodityPriceExposureBaseUnit | base_uom | Base Unit of Measure for the Commodity | ||
| CmmdtyPriceExpsrMassUnit | Mass Unit of Measure | |||
| CmmdtyPriceExpsrVolumeUnit | Volume Unit of Measure | |||
| CommodityPriceExposureQuantity | quantity | Quantity | ||
| CommodityPriceExposureBaseQty | base_quantity | Base Quantity | ||
| CmmdtyPriceExpsrQtyInMassUnit | Quantity in Mass Unit of Measure | |||
| CmmdtyPriceExpsrQtyInVolUnit | Quantity in Volume Unit of Measure | |||
| CmmdtyPriceExpsrPaymentAmount | amount | Contract Amount in Payment Currency | ||
| CommodityPriceFixationStatus | Future/Basis Price Fixation Status | |||
| TreasuryPositionAccount | futures_account | Futures Account for Listed Options and Futures | ||
| DerivativeContract | derivative_contract_id | Contract for Listed Options and Futures | ||
| QuotationCurrency | quot_currency | Evaluation in Quotation Currency | ||
| PaymentCurrency | payt_currency | Evaluation in Payment Currency | ||
| OptionStrikePrice | cty_strike_price | Strike price for commodity listed options | ||
| OptionStrikeCurrency | cty_strike_curr_unit | Currency Unit of the Rate | ||
| OptionPutCallCode | option_direction | Put/Call Indicator | ||
| OptionExerciseType | exercise_type | Exercise Type (American or European) | ||
| EndOfDayBusinessEntityKey | entity_key | Key of an Business Entity requiring an End-of-day snapshot | ||
| ReportingMonth | Reporting Month | |||
| ReportingYear | Reporting Year | |||
| FinInstrExternalReference | external_reference | External Reference | ||
| TradedDrvtvContrSpecification | traded_dcs | Traded Derivative Contract Specification ID | ||
| ParDrvtvContractSpecification | parent_dcs | Parent Derivative Contract Specification ID | ||
| RiskViewIsNotRelevant | ignr_rsk_view | Ignore for Risk View | ||
| FinancialTransactionPortfolio | portfolio | Portfolio | ||
| CmmdtyHdgPlanExposureHedgeBook | hedge_book | Commodity Hedge Book | ||
| CommodityHedgePlanExposureID | plan_exposure_id | Plan Exposure ID | ||
| _DerivativeContrSpecification | _DerivativeContrSpecification | |||
| _MarketIdentifierCode | _MarketIdentifierCode | |||
| _PhysicalCommodity | _PhysicalCommodity | |||
| _CommodityPriceFixationStatus | _CommodityPriceFixationStatus | |||
| _FinAssetsMgmtProductType | _FinAssetsMgmtProductType | |||
| _UnitOfMeasure | _UnitOfMeasure | |||
| _CompanyCode | _CompanyCode |
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 I_DerivativeCmmdtyExpsr.
-- 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: IVFINDDB
CREATE VIEW I_DerivativeCmmdtyExpsr AS
SELECT
mandt AS SAPClient,
company_code AS CompanyCode,
exposure_id AS CommodityPriceExposure,
exposure_cat AS CommodityExposureCategory,
exposure_subkey AS CommodityPriceSubExposure,
version AS CommodityPriceExposureVersion,
valid_from_tst AS ValidityStartDateTime,
valid_to_tst AS ValidityEndDateTime,
valid_from_date AS ValidityStartDate,
valid_from_time AS ValidityStartTime,
valid_to_date AS ValidityEndDate,
valid_to_time AS ValidityEndTime,
version_max AS MaximumVersion,
version_guid AS RiskAnalyzerVersionUUID,
expos_due_date AS ExposureDueDate,
reporting_date AS ReportingDate,
phys_comm_id AS Commodity,
side AS CashFlowDirection,
direction AS TreasuryPositionLongShortCode,
dcs AS DerivativeContrSpecification,
mic AS MarketIdentifierCode,
price_type AS QuotationPriceType,
tenor AS TimeToMaturity,
timing AS CmmdtyForwardIndexTiming,
keydate AS MaturityKeyDate,
contract_code AS DerivativeContractMaturityCode,
product_cat AS FinancialInstrProductCategory,
product_type AS FinancialAssetsMgmtProductType,
f_trans_cat AS FinInstrTransactionCategory,
trans_type AS FinancialInstrumentProductType,
trans_act_type AS FinancialInstrActivityCategory,
objnr AS FinancialObject,
event_type AS PnLEventType,
has_error AS HasError,
is_not_relevant AS IsNotRelevantForMTMRisk,
calc_start_date AS CalculationPeriodStartDate,
calc_end_date AS CalculationPeriodEndDate,
start_term AS TermStartDate,
end_term AS TermEndDate,
delivery_date AS DeliveryDate,
number_of_contracts AS NumberOfCommodityContracts,
unit_of_measure AS CommodityPriceExposureUnit,
base_uom AS CommodityPriceExposureBaseUnit,
cast ( mass_uom as cds_mass_uom ) AS CmmdtyPriceExpsrMassUnit,
cast ( volume_uom as cds_volume_uom ) AS CmmdtyPriceExpsrVolumeUnit,
quantity AS CommodityPriceExposureQuantity,
base_quantity AS CommodityPriceExposureBaseQty,
cast ( mass_quantity as cds_qty_in_mass_uom ) AS CmmdtyPriceExpsrQtyInMassUnit,
cast ( volume_quantity as cds_qty_in_volume_uom ) AS CmmdtyPriceExpsrQtyInVolUnit,
amount AS CmmdtyPriceExpsrPaymentAmount,
cast ( fixing_status as cmm_fbfix_status ) AS CommodityPriceFixationStatus,
futures_account AS TreasuryPositionAccount,
derivative_contract_id AS DerivativeContract,
quot_currency AS QuotationCurrency,
payt_currency AS PaymentCurrency,
cty_strike_price AS OptionStrikePrice,
cty_strike_curr_unit AS OptionStrikeCurrency,
option_direction AS OptionPutCallCode,
exercise_type AS OptionExerciseType,
entity_key AS EndOfDayBusinessEntityKey,
cast(substring(reporting_date, 5, 2) as cds_reporting_month) AS ReportingMonth,
cast(substring(reporting_date, 1, 4) as cds_reporting_year) AS ReportingYear,
external_reference AS FinInstrExternalReference,
traded_dcs AS TradedDrvtvContrSpecification,
parent_dcs AS ParDrvtvContractSpecification,
ignr_rsk_view AS RiskViewIsNotRelevant,
portfolio AS FinancialTransactionPortfolio,
hedge_book AS CmmdtyHdgPlanExposureHedgeBook,
plan_exposure_id AS CommodityHedgePlanExposureID
FROM cmm_vfind
LEFT OUTER JOIN I_DerivativeContrSpec AS _DerivativeContrSpecification ON DerivativeContrSpecification = _DerivativeContrSpecification.DerivativeContrSpecification -- association [0..1]
LEFT OUTER JOIN I_MarketIdentCode AS _MarketIdentifierCode ON MarketIdentifierCode = _MarketIdentifierCode.MarketIdentifierCode -- association [0..1]
LEFT OUTER JOIN I_Cmmdty AS _PhysicalCommodity ON Commodity = _PhysicalCommodity.Commodity -- association [0..1]
LEFT OUTER JOIN I_CmmdtyPriceFixationStatus AS _CommodityPriceFixationStatus ON CommodityPriceFixationStatus = _CommodityPriceFixationStatus.CommodityPriceFixationStatus -- association [0..1]
LEFT OUTER JOIN I_FinAssetsMgntProductType AS _FinAssetsMgmtProductType ON FinancialAssetsMgmtProductType = _FinAssetsMgmtProductType.FinancialAssetsMgmtProductType -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON CommodityPriceExposureUnit = _UnitOfMeasure.UnitOfMeasure -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
;
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