P_CmmdtyMtmDodValue_2

DDL: P_CMMDTYMTMDODVALUE_2 SQL: PCMMDTYMTMDODV2 Type: view COMPOSITE Package: LOG_CMM_RISK_REPORTING_MTM

Basic MtM Values with Day over Day logic

P_CmmdtyMtmDodValue_2 is a Composite CDS View that provides data about "Basic MtM Values with Day over Day logic" in SAP S/4HANA. It reads from 1 data source (P_Cmm_Cpe_Term_Value_2) and exposes 131 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType. Part of development package LOG_CMM_RISK_REPORTING_MTM.

Data Sources (1)

SourceAliasJoin Type
P_Cmm_Cpe_Term_Value_2 P_Cmm_Cpe_Term_Value_2 from

Parameters (16)

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
P_MinEndOfDayFromDateTime cmm_min_eod_from_datetime
P_MaxEndOfDayToDateTime cmm_max_eod_to_datetime
P_MinPriceQuotationDate cmm_min_price_quotation_date
P_MaxPriceQuotationDate cmm_max_price_quotation_date
P_MinSubstnPrcQtanDate cmm_min_sub_price_quote_date
P_MaxSubstnPrcQtanDate cmm_max_sub_price_quote_date
P_MinExchRateMttyDate cmm_min_ex_rate_maturity_date
P_MaxExchRateMttyDate cmm_max_ex_rate_maturity_date
P_MinFwdQuotationDate cmm_min_fwd_quotation_date
P_MaxFwdQuotationDate cmm_max_fwd_quotation_date

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PCMMDTYMTMDODV2 view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (131)

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
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
EndOfDayTimestampFrom mtmvalue EndOfDayTimestampFrom
EndOfDayTimestampTo mtmvalue EndOfDayTimestampTo
EndOfDaySnapshotDate mtmvalue EndOfDaySnapshotDate
EndOfDayBusinessEntityKey mtmvalue EndOfDayBusinessEntityKey
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.
IncotermsClassification
IncotermsTransferLocation mtmvalue IncotermsTransferLocation Incoterms 2
ConditionApplication mtmvalue ConditionApplication Application
SourceDocumentShortNumber mtmvalue SourceDocumentShortNumber
SourceDocument mtmvalue SourceDocument Document
SourceDocumentItem mtmvalue SourceDocumentItem
SourceDocumentBusObjType mtmvalue SourceDocumentBusObjType
OrignRefDocumentShortNumber mtmvalue OrignRefDocumentShortNumber
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
CmmdtyRootDocExternalNumber mtmvalue CmmdtyRootDocExternalNumber
CmmdtyDocumentExternalNumber mtmvalue CmmdtyDocumentExternalNumber
ReferenceDocBusObjType mtmvalue ReferenceDocBusObjType Pred(BOR) Object Typ
DeliveryDate mtmvalue DeliveryDate Delivery Date
DeliveryYear mtmvalue DeliveryYear
DeliveryMonth mtmvalue DeliveryMonth
ExpectedPaymentDate mtmvalue ExpectedPaymentDate
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
MarketToDocFrozenExchrate mtmvalue MarketToDocFrozenExchrate
MarketToDocExchRateDate mtmvalue MarketToDocExchrateDate
ConditionTermRateCurrency mtmvalue ConditionTermRateCurrency
ConditionTermRateQuantity mtmvalue ConditionTermRateQuantity
ConditionTermRateQuantityUnit mtmvalue ConditionTermRateQuantityUnit
DocToStatisticalExchRateDate mtmvalue DocToStatisticalExchRateDate
ConditionTermValueCurrency mtmvalue ConditionTermValueCurrency
QuotationPeriodReferenceDate mtmvalue QuotationPeriodReferenceDate
BasisID
BasisType mtmvalue BasisType Basis Type
DerivativeContrSpecification mtmvalue DerivativeContrSpecification DCS ID
MarketIdentifierCode mtmvalue MarketIdentifierCode MIC
MaturityKeyDate mtmvalue MaturityKeyDate Maturity Key Date
QuotationPriceType mtmvalue QuotationPriceType Price Type
MarketCurrency mtmvalue MarketCurrency
OldestQuotationDate mtmvalue OldestQuotationDate
SystemMessageNumber mtmvalue SystemMessageNumber Message Number
HasError mtmvalue HasError TRUE
CommodityQuantityendasCommodityQuantity
CommodityUnit
MaterialBaseUnit
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
CmmdtyPriceExpsrMassUnit mtmvalue CmmdtyPriceExpsrMassUnit
CmmdtyPriceExpsrQtyInMassUnit mtmvalue CmmdtyPriceExpsrQtyInMassUnit
CmmdtyPriceExpsrVolumeUnit mtmvalue CmmdtyPriceExpsrVolumeUnit
CmmdtyPriceExpsrQtyInVolUnit mtmvalue CmmdtyPriceExpsrQtyInVolUnit
PricedContractQuantity mtmvalue PricedContractQuantity
UnpricedContractQuantity mtmvalue UnpricedContractQuantity
TodayPricedQuantity mtmvalue TodayPricedQuantity
PricedContractQuantityInMass mtmvalue PricedContractQuantityInMass
UnpricedContractQuantityInMass mtmvalue UnpricedContractQuantityInMass
TodayPricedQuantityInMass mtmvalue TodayPricedQuantityInMass
PricedContractQuantityInVol mtmvalue PricedContractQuantityInVol
UnpricedContractQuantityInVol mtmvalue UnpricedContractQuantityInVol
TodayPricedQuantityInVol mtmvalue TodayPricedQuantityInVol
ContrPriceExposureIsExecuted mtmvalue ContrPriceExposureIsExecuted
PricedDays mtmvalue PricedDays
UnpricedDays mtmvalue UnpricedDays
TodayDays mtmvalue TodayDays
MarketToTermExchangeRateType mtmvalue MarketToTermExchangeRateType
CndnToStstcExchangeRateType mtmvalue CndnToStstcExchangeRateType
ConditionToDocExchangeRateType mtmvalue ConditionToDocExchangeRateType
DocToStstcExchangeRateType mtmvalue DocToStstcExchangeRateType
PriceSettingMethod mtmvalue PriceSettingMethod
PriceSettingMethodStatus mtmvalue PriceSettingMethodStatus
ValidToDateTime mtmvalue ValidToDateTime Time Stamp
PricingProcedure mtmvalue PricingProcedure Procedure
PricingConditionTerm mtmvalue PricingConditionTerm Term Number

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_CmmdtyMtmDodValue_2.
-- 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: PCMMDTYMTMDODV2
-- 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, P_MinEndOfDayFromDateTime : cmm_min_eod_from_datetime, P_MaxEndOfDayToDateTime : cmm_max_eod_to_datetime, P_MinPriceQuotationDate : cmm_min_price_quotation_date, P_MaxPriceQuotationDate : cmm_max_price_quotation_date, P_MinSubstnPrcQtanDate : cmm_min_sub_price_quote_date, P_MaxSubstnPrcQtanDate : cmm_max_sub_price_quote_date, P_MinExchRateMttyDate : cmm_min_ex_rate_maturity_date, P_MaxExchRateMttyDate : cmm_max_ex_rate_maturity_date, P_MinFwdQuotationDate : cmm_min_fwd_quotation_date, P_MaxFwdQuotationDate : cmm_max_fwd_quotation_date

CREATE VIEW P_CmmdtyMtmDodValue_2 AS
SELECT
  mtmvalue.PricingKey AS PricingKey,
  mtmvalue.Version AS Version,
  mtmvalue.PricingDocumentItem AS PricingDocumentItem,
  mtmvalue.ConditionType AS ConditionType,
  mtmvalue.SubConditionType AS SubConditionType,
  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.EndOfDayTimestampFrom AS EndOfDayTimestampFrom,
  mtmvalue.EndOfDayTimestampTo AS EndOfDayTimestampTo,
  mtmvalue.EndOfDaySnapshotDate AS EndOfDaySnapshotDate,
  mtmvalue.EndOfDayBusinessEntityKey AS EndOfDayBusinessEntityKey,
  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.IncotermsTransferLocation AS IncotermsTransferLocation,
  mtmvalue.ConditionApplication AS ConditionApplication,
  mtmvalue.SourceDocumentShortNumber AS SourceDocumentShortNumber,
  mtmvalue.SourceDocument AS SourceDocument,
  mtmvalue.SourceDocumentItem AS SourceDocumentItem,
  mtmvalue.SourceDocumentBusObjType AS SourceDocumentBusObjType,
  mtmvalue.OrignRefDocumentShortNumber AS OrignRefDocumentShortNumber,
  mtmvalue.OriginReferenceDocument AS OriginReferenceDocument,
  mtmvalue.OriginReferenceDocBusObjType AS OriginReferenceDocBusObjType,
  mtmvalue.OriginReferenceDocumentItem AS OriginReferenceDocumentItem,
  mtmvalue.ReferenceDocument AS ReferenceDocument,
  mtmvalue.ReferenceDocumentItem AS ReferenceDocumentItem,
  mtmvalue.CmmdtyRootDocExternalNumber AS CmmdtyRootDocExternalNumber,
  mtmvalue.CmmdtyDocumentExternalNumber AS CmmdtyDocumentExternalNumber,
  mtmvalue.ReferenceDocBusObjType AS ReferenceDocBusObjType,
  mtmvalue.DeliveryDate AS DeliveryDate,
  mtmvalue.DeliveryYear AS DeliveryYear,
  mtmvalue.DeliveryMonth AS DeliveryMonth,
  mtmvalue.ExpectedPaymentDate AS ExpectedPaymentDate,
  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.MarketToDocFrozenExchrate AS MarketToDocFrozenExchrate,
  mtmvalue.MarketToDocExchrateDate AS MarketToDocExchRateDate,
  mtmvalue.ConditionTermRateCurrency AS ConditionTermRateCurrency,
  mtmvalue.ConditionTermRateQuantity AS ConditionTermRateQuantity,
  mtmvalue.ConditionTermRateQuantityUnit AS ConditionTermRateQuantityUnit,
  mtmvalue.DocToStatisticalExchRateDate AS DocToStatisticalExchRateDate,
  mtmvalue.ConditionTermValueCurrency AS ConditionTermValueCurrency,
  mtmvalue.QuotationPeriodReferenceDate AS QuotationPeriodReferenceDate,
  mtmvalue.BasisType AS BasisType,
  mtmvalue.DerivativeContrSpecification AS DerivativeContrSpecification,
  mtmvalue.MarketIdentifierCode AS MarketIdentifierCode,
  mtmvalue.MaturityKeyDate AS MaturityKeyDate,
  mtmvalue.QuotationPriceType AS QuotationPriceType,
  mtmvalue.MarketCurrency AS MarketCurrency,
  mtmvalue.OldestQuotationDate AS OldestQuotationDate,
  mtmvalue.SystemMessageNumber AS SystemMessageNumber,
  mtmvalue.HasError AS HasError,
  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,
  mtmvalue.CmmdtyPriceExpsrMassUnit AS CmmdtyPriceExpsrMassUnit,
  mtmvalue.CmmdtyPriceExpsrQtyInMassUnit AS CmmdtyPriceExpsrQtyInMassUnit,
  mtmvalue.CmmdtyPriceExpsrVolumeUnit AS CmmdtyPriceExpsrVolumeUnit,
  mtmvalue.CmmdtyPriceExpsrQtyInVolUnit AS CmmdtyPriceExpsrQtyInVolUnit,
  mtmvalue.PricedContractQuantity AS PricedContractQuantity,
  mtmvalue.UnpricedContractQuantity AS UnpricedContractQuantity,
  mtmvalue.TodayPricedQuantity AS TodayPricedQuantity,
  mtmvalue.PricedContractQuantityInMass AS PricedContractQuantityInMass,
  mtmvalue.UnpricedContractQuantityInMass AS UnpricedContractQuantityInMass,
  mtmvalue.TodayPricedQuantityInMass AS TodayPricedQuantityInMass,
  mtmvalue.PricedContractQuantityInVol AS PricedContractQuantityInVol,
  mtmvalue.UnpricedContractQuantityInVol AS UnpricedContractQuantityInVol,
  mtmvalue.TodayPricedQuantityInVol AS TodayPricedQuantityInVol,
  mtmvalue.ContrPriceExposureIsExecuted AS ContrPriceExposureIsExecuted,
  mtmvalue.PricedDays AS PricedDays,
  mtmvalue.UnpricedDays AS UnpricedDays,
  mtmvalue.TodayDays AS TodayDays,
  mtmvalue.MarketToTermExchangeRateType AS MarketToTermExchangeRateType,
  mtmvalue.CndnToStstcExchangeRateType AS CndnToStstcExchangeRateType,
  mtmvalue.ConditionToDocExchangeRateType AS ConditionToDocExchangeRateType,
  mtmvalue.DocToStstcExchangeRateType AS DocToStstcExchangeRateType,
  mtmvalue.PriceSettingMethod AS PriceSettingMethod,
  mtmvalue.PriceSettingMethodStatus AS PriceSettingMethodStatus,
  mtmvalue.ValidToDateTime AS ValidToDateTime,
  mtmvalue.PricingProcedure AS PricingProcedure,
  mtmvalue.PricingConditionTerm AS PricingConditionTerm
FROM P_Cmm_Cpe_Term_Value_2
;