P_CmmdtyMtmValue_Final

DDL: P_CMMDTYMTMVALUE_FINAL SQL: PCMMDTYMTMVALUEF Type: view COMPOSITE

P_CmmdtyMtmValue_Final is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_CmmdtyMtmDodValue) and exposes 129 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType.

Data Sources (1)

SourceAliasJoin Type
P_CmmdtyMtmDodValue P_CmmdtyMtmDodValue 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 PCMMDTYMTMVALUEF view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (129)

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 EndOfDaySnapshotDate mtmvalue EndOfDaySnapshotDate
EndOfDayBusinessEntityKey mtmvalue EndOfDayBusinessEntityKey
MTMDataSourceType mtmvalue MTMDataSourceType Type of Data Record
MaximumVersion mtmvalue MaximumVersion Highest Version
PreviousVersion mtmvalue PreviousVersion
PrevVersionSubConditionType mtmvalue PreviousSubConditionType
EndOfDaySnapshotDateTimeFrom mtmvalue EndOfDayTimestampFrom
EndOfDaySnapshotDateTimeTo mtmvalue EndOfDayTimestampTo
DataSelectionType mtmvalue DataSelectionType
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
IncotermsClassification
IncotermsTransferLocation mtmvalue IncotermsTransferLocation Incoterms 2
ConditionApplication mtmvalue ConditionApplication Application
ValidityStartDate
ValidityStartDateTime mtmvalue ValidityStartDateTime Valid From Timestamp
SourceDocument
SourceDocumentItem
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
ExchRateEvaluationDate
DocToStstcCrcyExchRateEvalDate
StatisticsCurrency
DocumentCurrency mtmvalue DocumentCurrency Document Currency
QuotationPeriodReferenceDate mtmvalue QuotationPeriodReferenceDate
ProfitCenter mtmvalue ProfitCenter Profit Center
BusinessArea mtmvalue BusinessArea Business Area
PurchasingOrganization mtmvalue PurchasingOrganization Purchasing Organization
MaterialGroup mtmvalue MaterialGroup Product Group
IsIntercompanyTransfer mtmvalue IsIntercompanyTransfer
ConditionTermRate
MarketToDocExchRate
MarketToDocFrozenExchRate
ConditionTermRateCurrency
ConditionTermRateQuantity
ConditionTermRateQuantityUnit
ConditionTermValueInDocCrcy
ConditionTermValueInStstcCrcy
DocToStatisticalExchRate
ConditionTermValueCurrency mtmvalue ConditionTermValueCurrency
BasisIDastbac_basis_idasBasisID
BasisType
DerivativeContrSpecification
MarketIdentifierCode
MaturityKeyDate
DerivativeContractMaturityCode
QuotationPriceType mtmvalue QuotationPriceType Price Type
MarketPriceCurrency
OldestQuotationDate
SystemMessageNumber
HasError TRUE
CommodityQuantityInTermUnit
CommodityUnit
MTMConditionGroupCategory mtmvalue MTMConditionGroupCategory
MTMConditionGroup mtmvalue MTMConditionGroup
MTMCalculationGroup mtmvalue MTMCalculationGroup
MTMAdjustmentType mtmvalue MTMAdjustmentType
MTMCalcGrpMarketPriceCondition mtmvalue MTMCalcGrpMarketPriceCondition
ConditionTermRateIsFixed mtmvalue ConditionTermRateIsFixed
ConditionTermExchRateIsFixed mtmvalue ConditionTermExchRateIsFixed
ConditionTermRateFixation
PricingStatus mtmvalue PricingStatus
CndnTermRateFixationDate mtmvalue CndnTermRateFixationDate
CndnTermRateFixationTime mtmvalue CndnTermRateFixationTime
CndnTermExchRateFixationDate mtmvalue CndnTermExchRateFixationDate
CndnTermExchRateFixationTime mtmvalue CndnTermExchRateFixationTime
FixedExchRateDate mtmvalue FixedExchRateDate
ExchRateMaturityDate
BsMktRefDrvtvContrMaturityCode mtmvalue BsMktRefDrvtvContrMaturityCode
BasisMarketRefRate mtmvalue BasisMarketRefRate
BasisMarketRefRateCurrency mtmvalue BasisMarketRefRateCurrency
BasisMarketRefKeyDate mtmvalue BasisMarketRefKeyDate
BasisMarketRefAdjustmentSpread mtmvalue BasisMarketRefAdjustmentSpread
ConditionTermFactor mtmvalue ConditionTermFactor
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
PriceSettingMethod mtmvalue PriceSettingMethod
PriceSettingMethodStatus mtmvalue PriceSettingMethodStatus
ValidToDateTime mtmvalue ValidToDateTime Time Stamp
PricingProcedure mtmvalue PricingProcedure Procedure
PricingConditionTerm mtmvalue PricingConditionTerm Term Number
CmmdtyRootDocExternalNumber mtmvalue CmmdtyRootDocExternalNumber
CmmdtyDocumentExternalNumber mtmvalue CmmdtyDocumentExternalNumber

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_Final.
-- 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: PCMMDTYMTMVALUEF
-- 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_Final 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.EndOfDaySnapshotDate AS EndOfDaySnapshotDate,
  mtmvalue.EndOfDayBusinessEntityKey AS EndOfDayBusinessEntityKey,
  mtmvalue.MTMDataSourceType AS MTMDataSourceType,
  mtmvalue.MaximumVersion AS MaximumVersion,
  mtmvalue.PreviousVersion AS PreviousVersion,
  mtmvalue.PreviousSubConditionType AS PrevVersionSubConditionType,
  mtmvalue.EndOfDayTimestampFrom AS EndOfDaySnapshotDateTimeFrom,
  mtmvalue.EndOfDayTimestampTo AS EndOfDaySnapshotDateTimeTo,
  mtmvalue.DataSelectionType AS DataSelectionType,
  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,
  cast (mtmvalue.GoodsMovementType as bwart) AS GoodsMovementType,
  mtmvalue.IncotermsTransferLocation AS IncotermsTransferLocation,
  mtmvalue.ConditionApplication AS ConditionApplication,
  cast (mtmvalue.ValidityStartDate as cds_lastchanged_date) AS ValidityStartDate,
  mtmvalue.ValidityStartDateTime AS ValidityStartDateTime,
  cast (mtmvalue.SourceDocument as cds_source_document) AS SourceDocument,
  cast (mtmvalue.SourceDocumentItem as cds_source_document_item) AS SourceDocumentItem,
  cast (mtmvalue.SourceDocumentBusObjType as cds_source_document_bor_type) 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,
  cast (mtmvalue.ExpectedPaymentDate as cmm_mtm_date_pymnt) AS ExpectedPaymentDate,
  cast (mtmvalue.fxvaluationdate as cmm_reporting_fxsnapdate) AS ExchRateEvaluationDate,
  cast (mtmvalue.fxvaluationdatedoctoststc as cds_doc_to_stat_fx_snap_date) AS DocToStstcCrcyExchRateEvalDate,
  cast( mtmvalue.StatisticsCurrency as cds_statistics_currency) AS StatisticsCurrency,
  mtmvalue.DocumentCurrency AS DocumentCurrency,
  mtmvalue.QuotationPeriodReferenceDate AS QuotationPeriodReferenceDate,
  mtmvalue.ProfitCenter AS ProfitCenter,
  mtmvalue.BusinessArea AS BusinessArea,
  mtmvalue.PurchasingOrganization AS PurchasingOrganization,
  mtmvalue.MaterialGroup AS MaterialGroup,
  mtmvalue.IsIntercompanyTransfer AS IsIntercompanyTransfer,
  cast( cast( mtmvalue.ConditionTermRate as abap.curr(31,8)) as cmm_reporting_price_crur ) AS ConditionTermRate,
  cast (mtmvalue.MarketToDocExchrate as cmm_reporting_exchrate_market) AS MarketToDocExchRate,
  cast (mtmvalue.MarketToDocFrozenExchrate as cds_marktodoc_frozen_exchrate) AS MarketToDocFrozenExchRate,
  cast (mtmvalue.ConditionTermRateCurrency as cds_pricecurrency) AS ConditionTermRateCurrency,
  cast (mtmvalue.ConditionTermRateQuantity as cmm_reporting_priceunit) AS ConditionTermRateQuantity,
  cast (mtmvalue.ConditionTermRateQuantityUnit as cds_priceuom) AS ConditionTermRateQuantityUnit,
  cast ( mtmvalue.ConditionTermValueInDocCrcy as cds_value_in_doccur) AS ConditionTermValueInDocCrcy,
  cast ( cast( mtmvalue.ConditionTermValueInStstcCrcy as abap.curr(31,11) ) as cds_value_in_statcur_curr) AS ConditionTermValueInStstcCrcy,
  cast( mtmvalue.DocToStatisticalExchRate as cmm_reporting_exchrate_func) AS DocToStatisticalExchRate,
  mtmvalue.ConditionTermValueCurrency AS ConditionTermValueCurrency,
  cast (mtmvalue.BasisType as tbac_basis_type) AS BasisType,
  cast (mtmvalue.DerivativeContrSpecification as tba_dcsid) AS DerivativeContrSpecification,
  cast (mtmvalue.MarketIdentifierCode as tba_mic) AS MarketIdentifierCode,
  cast (mtmvalue.MaturityKeyDate as tba_keydate) AS MaturityKeyDate,
  cast (mtmvalue.commoditycontractmaturitycode as tba_contract_code) AS DerivativeContractMaturityCode,
  mtmvalue.QuotationPriceType AS QuotationPriceType,
  cast (mtmvalue.MarketCurrency as cds_marketprice_currency) AS MarketPriceCurrency,
  cast (mtmvalue.OldestQuotationDate as cds_oldestquotdate) AS OldestQuotationDate,
  cast (substring(cast (mtmvalue.SystemMessageNumber as abap.char(4)), 2, 3) as cds_systemmessagenumber) AS SystemMessageNumber,
  cast( HasError as cmm_error_occured) AS HasError,
  cast (mtmvalue.CommodityQuantityInTermUnit as cds_cmmdtyqty_in_termuom) AS CommodityQuantityInTermUnit,
  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,
  cast (mtmvalue.ConditionTermRateFixation as cds_fixation_id) 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,
  cast (mtmvalue.ExchRateMaturityDate as cmm_fx_maturity_date) AS ExchRateMaturityDate,
  mtmvalue.BsMktRefDrvtvContrMaturityCode AS BsMktRefDrvtvContrMaturityCode,
  mtmvalue.BasisMarketRefRate AS BasisMarketRefRate,
  mtmvalue.BasisMarketRefRateCurrency AS BasisMarketRefRateCurrency,
  mtmvalue.BasisMarketRefKeyDate AS BasisMarketRefKeyDate,
  mtmvalue.BasisMarketRefAdjustmentSpread AS BasisMarketRefAdjustmentSpread,
  mtmvalue.ConditionTermFactor AS ConditionTermFactor,
  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.PriceSettingMethod AS PriceSettingMethod,
  mtmvalue.PriceSettingMethodStatus AS PriceSettingMethodStatus,
  mtmvalue.ValidToDateTime AS ValidToDateTime,
  mtmvalue.PricingProcedure AS PricingProcedure,
  mtmvalue.PricingConditionTerm AS PricingConditionTerm,
  mtmvalue.CmmdtyRootDocExternalNumber AS CmmdtyRootDocExternalNumber,
  mtmvalue.CmmdtyDocumentExternalNumber AS CmmdtyDocumentExternalNumber
FROM P_CmmdtyMtmDodValue
;