Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

P_CmmdtyMtmValue_StatCurr

DDL: P_CMMDTYMTMVALUE_STATCURR SQL: PCPETVALSCURR Type: view COMPOSITE Package: LOG_CMM_RUNTIME_VALUATION_DEP

Basic MtM Values in Statistic Currency

P_CmmdtyMtmValue_StatCurr is a Composite CDS View that provides data about "Basic MtM Values in Statistic Currency" in SAP S/4HANA. It reads from 1 data source (P_CmmdtyMtmValue) and exposes 107 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType. Part of development package LOG_CMM_RUNTIME_VALUATION_DEP.

Data Sources (1)

SourceAliasJoin Type
P_CmmdtyMtmValue P_CmmdtyMtmValue from

Parameters (6)

NameTypeDefault
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)

NameValueLevelField
AbapCatalog.sqlViewName PCPETVALSCURR 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)

KeyFieldSource TableSource FieldDescription
KEY PricingKey mtmvalue PricingKey Pricing Key
KEY Version mtmvalue Version XML Vers.
KEY PricingDocumentItem mtmvalue PricingDocumentItem Item
KEY ConditionType mtmvalue ConditionType Condition type
KEY SubConditionType mtmvalue SubConditionType
KEY VersStockRecordUUID mtmvalue VersStockRecordUUID
KEY valuationDate mtmvalue valuationDate Valuation Date
KEY Scenario mtmvalue Scenario VAT Scenario
SnapshotDate0 mtmvalue SnapshotDate0
SnapshotDate1 mtmvalue SnapshotDate1
DataSelectionType mtmvalue DataSelectionType
MTMDataSourceType mtmvalue MTMDataSourceType Type of Data Record
ValidityStartDate mtmvalue ValidityStartDate Validity Start Date
ValidityStartDateTime mtmvalue ValidityStartDateTime Valid From Timestamp
EndOfDaySnapshotDate mtmvalue EndOfDaySnapshotDate
EndOfDayTimestampFrom mtmvalue EndOfDayTimestampFrom
EndOfDayTimestampTo mtmvalue EndOfDayTimestampTo
MaximumVersion mtmvalue MaximumVersion Highest Version
PreviousVersion mtmvalue PreviousVersion
PreviousSubConditionType mtmvalue PreviousSubConditionType
CompanyCode
SalesOrganization mtmvalue SalesOrganization Sales Organization
DistributionChannel mtmvalue DistributionChannel RefDistCh-Cust/Mat.
Division mtmvalue Division Internal Division ID
Creditor mtmvalue Creditor Supplier
SoldToParty mtmvalue SoldToParty Sold-to Party
Material mtmvalue Material Vehicle Model
PhysicalCommodity mtmvalue PhysicalCommodity
Plant mtmvalue Plant Valuation Area
StorageLocation mtmvalue StorageLocation StorageLocation
Batch mtmvalue Batch Lot No.
GoodsMovementType mtmvalue GoodsMovementType Movement Type
IncotermsClassification
IncotermsTransferLocation mtmvalue IncotermsTransferLocation Incoterms 2
ConditionApplication mtmvalue ConditionApplication Application
SourceDocument mtmvalue SourceDocument Document
SourceDocumentItem mtmvalue SourceDocumentItem
SourceDocumentBusObjType mtmvalue SourceDocumentBusObjType
OriginReferenceDocument mtmvalue OriginReferenceDocument Root Document
OriginReferenceDocBusObjType mtmvalue OriginReferenceDocBusObjType Root (BOR) Obj. Type
OriginReferenceDocumentItem mtmvalue OriginReferenceDocumentItem Root Document Item
ReferenceDocument mtmvalue ReferenceDocument Reference Document
ReferenceDocumentItem mtmvalue ReferenceDocumentItem Reference item
ReferenceDocBusObjType mtmvalue ReferenceDocBusObjType Pred(BOR) Object Typ
DeliveryDate mtmvalue DeliveryDate Delivery Date
DeliveryYear mtmvalue DeliveryYear
DeliveryMonth mtmvalue DeliveryMonth
ExpectedPaymentDate mtmvalue ExpectedPaymentDate
FXvaluationDate mtmvalue FXvaluationDate
FXvaluationDateDocToStstc mtmvalue FXvaluationDateDocToStstc
StatisticsCurrency mtmvalue StatisticsCurrency
DocumentCurrency mtmvalue DocumentCurrency Document Currency
ProfitCenter mtmvalue ProfitCenter Profit Center
BusinessArea mtmvalue BusinessArea Business Area
PurchasingOrganization mtmvalue PurchasingOrganization Purchasing Organization
MaterialGroup mtmvalue MaterialGroup Product Group
IsIntercompanyTransfer mtmvalue IsIntercompanyTransfer
dec318asConditionTermRate
MarketToDocExchrate mtmvalue MarketToDocExchrate
MarketToDocFrozenExchrate mtmvalue MarketToDocFrozenExchrate
MarketToDocExchrateDate mtmvalue MarketToDocExchrateDate
ConditionTermRateCurrency mtmvalue ConditionTermRateCurrency
ConditionTermRateQuantity mtmvalue ConditionTermRateQuantity
ConditionTermRateQuantityUnit mtmvalue ConditionTermRateQuantityUnit
ConditionTermValueInDocCrcy
dec208endendasDocToStatisticalExchRate
DocToStatisticalExchRateDate fx ExchangeRateValidFrom
QuotationPeriodReferenceDate
BasisID
BasisType mtmvalue BasisType Basis Type
DerivativeContrSpecification mtmvalue DerivativeContrSpecification DCS ID
MarketIdentifierCode mtmvalue MarketIdentifierCode MIC
MaturityKeyDate mtmvalue MaturityKeyDate Maturity Key Date
CommodityContractMaturityCode mtmvalue CommodityContractMaturityCode
QuotationPriceType mtmvalue QuotationPriceType Price Type
MarketCurrency mtmvalue MarketCurrency
OldestQuotationDate mtmvalue OldestQuotationDate
CommodityQuantity
CommodityQuantityInBaseUnit mtmvalue CommodityQuantityInBaseUnit
CommodityQuantityInTermUnit mtmvalue CommodityQuantityInTermUnit
CommodityUnit
MaterialBaseUnit mtmvalue MaterialBaseUnit Valuation Unit
MTMConditionGroupCategory mtmvalue MTMConditionGroupCategory
MTMConditionGroup mtmvalue MTMConditionGroup
MTMCalculationGroup mtmvalue MTMCalculationGroup
MTMAdjustmentType mtmvalue MTMAdjustmentType
MTMCalcGrpMarketPriceCondition mtmvalue MTMCalcGrpMarketPriceCondition
ConditionTermRateIsFixed mtmvalue ConditionTermRateIsFixed
ConditionTermExchRateIsFixed mtmvalue ConditionTermExchRateIsFixed
ConditionTermRateFixation mtmvalue ConditionTermRateFixation
PricingStatus mtmvalue PricingStatus
CndnTermRateFixationDate mtmvalue CndnTermRateFixationDate
CndnTermRateFixationTime mtmvalue CndnTermRateFixationTime
CndnTermExchRateFixationDate mtmvalue CndnTermExchRateFixationDate
CndnTermExchRateFixationTime mtmvalue CndnTermExchRateFixationTime
FixedExchRateDate mtmvalue FixedExchRateDate
ExchRateMaturityDate mtmvalue ExchRateMaturityDate
BsMktRefDrvtvContrMaturityCode mtmvalue BsMktRefDrvtvContrMaturityCode
BasisMarketRefRate mtmvalue BasisMarketRefRate
BasisMarketRefRateCurrency mtmvalue BasisMarketRefRateCurrency
BasisMarketRefKeyDate mtmvalue BasisMarketRefKeyDate
BasisMarketRefAdjustmentSpread mtmvalue BasisMarketRefAdjustmentSpread
PnLDataType
PrevVersionCommodityQuantity mtmvalue PrevVersionCommodityQuantity
PreviousVersionQuantitySign mtmvalue PreviousVersionQuantitySign
PrevVersCndnTermRateCurrency mtmvalue PrevVersCndnTermRateCurrency
PrevVersionConditionTermValue mtmvalue 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_StatCurr.
-- 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: PCPETVALSCURR
-- 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_StatCurr AS
SELECT
  mtmvalue.PricingKey AS PricingKey,
  mtmvalue.Version AS Version,
  mtmvalue.PricingDocumentItem AS PricingDocumentItem,
  mtmvalue.ConditionType AS ConditionType,
  mtmvalue.SubConditionType AS SubConditionType,
  mtmvalue.VersStockRecordUUID AS VersStockRecordUUID,
  mtmvalue.valuationDate AS valuationDate,
  mtmvalue.Scenario AS Scenario,
  mtmvalue.SnapshotDate0 AS SnapshotDate0,
  mtmvalue.SnapshotDate1 AS SnapshotDate1,
  mtmvalue.DataSelectionType AS DataSelectionType,
  mtmvalue.MTMDataSourceType AS MTMDataSourceType,
  mtmvalue.ValidityStartDate AS ValidityStartDate,
  mtmvalue.ValidityStartDateTime AS ValidityStartDateTime,
  mtmvalue.EndOfDaySnapshotDate AS EndOfDaySnapshotDate,
  mtmvalue.EndOfDayTimestampFrom AS EndOfDayTimestampFrom,
  mtmvalue.EndOfDayTimestampTo AS EndOfDayTimestampTo,
  mtmvalue.MaximumVersion AS MaximumVersion,
  mtmvalue.PreviousVersion AS PreviousVersion,
  mtmvalue.PreviousSubConditionType AS PreviousSubConditionType,
  mtmvalue.SalesOrganization AS SalesOrganization,
  mtmvalue.DistributionChannel AS DistributionChannel,
  mtmvalue.Division AS Division,
  mtmvalue.Creditor AS Creditor,
  mtmvalue.SoldToParty AS SoldToParty,
  mtmvalue.Material AS Material,
  mtmvalue.PhysicalCommodity AS PhysicalCommodity,
  mtmvalue.Plant AS Plant,
  mtmvalue.StorageLocation AS StorageLocation,
  mtmvalue.Batch AS Batch,
  mtmvalue.GoodsMovementType AS GoodsMovementType,
  mtmvalue.IncotermsTransferLocation AS IncotermsTransferLocation,
  mtmvalue.ConditionApplication AS ConditionApplication,
  mtmvalue.SourceDocument AS SourceDocument,
  mtmvalue.SourceDocumentItem AS SourceDocumentItem,
  mtmvalue.SourceDocumentBusObjType AS SourceDocumentBusObjType,
  mtmvalue.OriginReferenceDocument AS OriginReferenceDocument,
  mtmvalue.OriginReferenceDocBusObjType AS OriginReferenceDocBusObjType,
  mtmvalue.OriginReferenceDocumentItem AS OriginReferenceDocumentItem,
  mtmvalue.ReferenceDocument AS ReferenceDocument,
  mtmvalue.ReferenceDocumentItem AS ReferenceDocumentItem,
  mtmvalue.ReferenceDocBusObjType AS ReferenceDocBusObjType,
  mtmvalue.DeliveryDate AS DeliveryDate,
  mtmvalue.DeliveryYear AS DeliveryYear,
  mtmvalue.DeliveryMonth AS DeliveryMonth,
  mtmvalue.ExpectedPaymentDate AS ExpectedPaymentDate,
  mtmvalue.FXvaluationDate AS FXvaluationDate,
  mtmvalue.FXvaluationDateDocToStstc AS FXvaluationDateDocToStstc,
  mtmvalue.StatisticsCurrency AS StatisticsCurrency,
  mtmvalue.DocumentCurrency AS DocumentCurrency,
  mtmvalue.ProfitCenter AS ProfitCenter,
  mtmvalue.BusinessArea AS BusinessArea,
  mtmvalue.PurchasingOrganization AS PurchasingOrganization,
  mtmvalue.MaterialGroup AS MaterialGroup,
  mtmvalue.IsIntercompanyTransfer AS IsIntercompanyTransfer,
  mtmvalue.MarketToDocExchrate AS MarketToDocExchrate,
  mtmvalue.MarketToDocFrozenExchrate AS MarketToDocFrozenExchrate,
  mtmvalue.MarketToDocExchrateDate AS MarketToDocExchrateDate,
  mtmvalue.ConditionTermRateCurrency AS ConditionTermRateCurrency,
  mtmvalue.ConditionTermRateQuantity AS ConditionTermRateQuantity,
  mtmvalue.ConditionTermRateQuantityUnit AS ConditionTermRateQuantityUnit,
  cast (mtmvalue.ConditionTermValue as abap.dec(31,11)) AS ConditionTermValueInDocCrcy,
  case when mtmvalue.DocumentCurrency = mtmvalue.StatisticsCurrency then 1 when mtmvalue.DocumentCurrency <> mtmvalue.StatisticsCurrency then case when conv_curr.CurrencyConversionCalcType = ' ' and fx.ForwardExchangeRate is not null and fx.ForwardExchangeRate != 0 AS dec208endendasDocToStatisticalExchRate,
  fx.ExchangeRateValidFrom AS DocToStatisticalExchRateDate,
  mtmvalue.BasisType AS BasisType,
  mtmvalue.DerivativeContrSpecification AS DerivativeContrSpecification,
  mtmvalue.MarketIdentifierCode AS MarketIdentifierCode,
  mtmvalue.MaturityKeyDate AS MaturityKeyDate,
  mtmvalue.CommodityContractMaturityCode AS CommodityContractMaturityCode,
  mtmvalue.QuotationPriceType AS QuotationPriceType,
  mtmvalue.MarketCurrency AS MarketCurrency,
  mtmvalue.OldestQuotationDate AS OldestQuotationDate,
  mtmvalue.CommodityQuantityInBaseUnit AS CommodityQuantityInBaseUnit,
  mtmvalue.CommodityQuantityInTermUnit AS CommodityQuantityInTermUnit,
  mtmvalue.MaterialBaseUnit AS MaterialBaseUnit,
  mtmvalue.MTMConditionGroupCategory AS MTMConditionGroupCategory,
  mtmvalue.MTMConditionGroup AS MTMConditionGroup,
  mtmvalue.MTMCalculationGroup AS MTMCalculationGroup,
  mtmvalue.MTMAdjustmentType AS MTMAdjustmentType,
  mtmvalue.MTMCalcGrpMarketPriceCondition AS MTMCalcGrpMarketPriceCondition,
  mtmvalue.ConditionTermRateIsFixed AS ConditionTermRateIsFixed,
  mtmvalue.ConditionTermExchRateIsFixed AS ConditionTermExchRateIsFixed,
  mtmvalue.ConditionTermRateFixation AS ConditionTermRateFixation,
  mtmvalue.PricingStatus AS PricingStatus,
  mtmvalue.CndnTermRateFixationDate AS CndnTermRateFixationDate,
  mtmvalue.CndnTermRateFixationTime AS CndnTermRateFixationTime,
  mtmvalue.CndnTermExchRateFixationDate AS CndnTermExchRateFixationDate,
  mtmvalue.CndnTermExchRateFixationTime AS CndnTermExchRateFixationTime,
  mtmvalue.FixedExchRateDate AS FixedExchRateDate,
  mtmvalue.ExchRateMaturityDate AS ExchRateMaturityDate,
  mtmvalue.BsMktRefDrvtvContrMaturityCode AS BsMktRefDrvtvContrMaturityCode,
  mtmvalue.BasisMarketRefRate AS BasisMarketRefRate,
  mtmvalue.BasisMarketRefRateCurrency AS BasisMarketRefRateCurrency,
  mtmvalue.BasisMarketRefKeyDate AS BasisMarketRefKeyDate,
  mtmvalue.BasisMarketRefAdjustmentSpread AS BasisMarketRefAdjustmentSpread,
  mtmvalue.PrevVersionCommodityQuantity AS PrevVersionCommodityQuantity,
  mtmvalue.PreviousVersionQuantitySign AS PreviousVersionQuantitySign,
  mtmvalue.PrevVersCndnTermRateCurrency AS PrevVersCndnTermRateCurrency,
  mtmvalue.PrevVersionConditionTermValue AS PrevVersionConditionTermValue
FROM P_CmmdtyMtmValue
;