P_UnionMTMPhyFin_2

DDL: P_UNIONMTMPHYFIN_2 SQL: PUNIONMTMPF2 Type: view COMPOSITE Package: LOG_CMM_RISK_REPORTING_MTM

MTM Physicals Financials Union

P_UnionMTMPhyFin_2 is a Composite CDS View that provides data about "MTM Physicals Financials Union" in SAP S/4HANA. It reads from 3 data sources (P_CmmdtyMtmValue_Final_2, P_CmmdtyStockValue_Final, P_DrvtvMTMBl) and exposes 404 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType. Part of development package LOG_CMM_RISK_REPORTING_MTM.

Data Sources (3)

SourceAliasJoin Type
P_CmmdtyMtmValue_Final_2 P_CmmdtyMtmValue_Final_2 from
P_CmmdtyStockValue_Final P_CmmdtyStockValue_Final union_all
P_DrvtvMTMBl P_DrvtvMTMBl union_all

Parameters (16)

NameTypeDefault
P_DisplayView cds_view_uom
P_EvaluationDate cds_evaluation_date
P_ExchRateEvaluationDate cmm_eval_keydate
P_EndOfDaySnapshotFromDate cmm_dend_cutdate
P_EndOfDaySnapshotToDate cmm_dend_cutdate
P_MTMDataSelectionType cmm_vlogp_consumptiontype
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 (9)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PUNIONMTMPF2 view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view

Fields (404)

KeyFieldSource TableSource FieldDescription
KEY PricingKey mtmphy PricingKey Pricing Key
KEY Version mtmphy Version Exposure Version
KEY PricingDocumentItem mtmphy PricingDocumentItem Item
KEY ConditionType mtmphy ConditionType Condition type
KEY SubConditionType mtmphy SubConditionType
keyVersStockRecordUUID
KEY EndOfDaySnapshotDate mtmphy EndOfDaySnapshotDate
KEY CompanyCode mtmphy CompanyCode Receiver Company Code
KEY CommodityPriceExposure Exposure ID
KEY CommodityExposureCategory
KEY CommodityPriceSubExposure
MTMDataSourceType mtmphy MTMDataSourceType Type of Data Record
EndOfDaySnapshotDateTimeFrom mtmphy EndOfDaySnapshotDateTimeFrom
EndOfDaySnapshotDateTimeTo mtmphy EndOfDaySnapshotDateTimeTo
SalesOrganization mtmphy SalesOrganization Sales Organization
DistributionChannel mtmphy DistributionChannel RefDistCh-Cust/Mat.
Division mtmphy Division Internal Division ID
Creditor mtmphy Creditor Supplier
SoldToParty mtmphy SoldToParty Sold-to Party
Material mtmphy Material Vehicle Model
Plant mtmphy Plant Valuation Area
StorageLocation mtmphy StorageLocation StorageLocation
Batch mtmphy Batch Lot No.
GoodsMovementType mtmphy GoodsMovementType Movement Type
IncotermsClassification mtmphy IncotermsClassification Incoterms
IncotermsTransferLocation mtmphy IncotermsTransferLocation Incoterms 2
ConditionApplication mtmphy ConditionApplication Application
ReferenceDocument mtmphy ReferenceDocument Reference Document
ReferenceDocumentItem mtmphy ReferenceDocumentItem Reference item
ReferenceDocBusObjType mtmphy ReferenceDocBusObjType Pred(BOR) Object Typ
ExpectedPaymentDate mtmphy ExpectedPaymentDate
ExchRateEvaluationDate mtmphy ExchRateEvaluationDate
DocToStstcCrcyExchRateEvalDate mtmphy DocToStstcCrcyExchRateEvalDate
QuotationPeriodReferenceDate mtmphy QuotationPeriodReferenceDate
ProfitCenter mtmphy ProfitCenter Profit Center
BusinessArea mtmphy BusinessArea Business Area
PurchasingOrganization mtmphy PurchasingOrganization Purchasing Organization
MaterialGroup mtmphy MaterialGroup Product Group
IsIntercompanyTransfer mtmphy IsIntercompanyTransfer
MarketToDocFrozenExchRate mtmphy MarketToDocFrozenExchRate
ConditionTermRateQuantity mtmphy ConditionTermRateQuantity
ConditionTermRateQuantityUnit mtmphy ConditionTermRateQuantityUnit
ConditionTermValueCurrency mtmphy ConditionTermValueCurrency
BasisID mtmphy BasisID Basis ID
BasisType mtmphy BasisType Basis Type
QuotationPriceType mtmphy QuotationPriceType Price Type
MarketPriceCurrency mtmphy MarketPriceCurrency Market Price Crcy
OldestQuotationDate mtmphy OldestQuotationDate
SystemMessageNumber mtmphy SystemMessageNumber Message Number
MTMConditionGroupCategory mtmphy MTMConditionGroupCategory
MTMConditionGroup mtmphy MTMConditionGroup
MTMCalculationGroup mtmphy MTMCalculationGroup
MTMAdjustmentType mtmphy MTMAdjustmentType
MTMCalcGrpMarketPriceCondition mtmphy MTMCalcGrpMarketPriceCondition
ConditionTermExchRateIsFixed mtmphy ConditionTermExchRateIsFixed
ConditionTermRateFixation mtmphy ConditionTermRateFixation
PricingStatus mtmphy PricingStatus
CndnTermRateFixationDate mtmphy CndnTermRateFixationDate
CndnTermRateFixationTime mtmphy CndnTermRateFixationTime
CndnTermExchRateFixationDate mtmphy CndnTermExchRateFixationDate
CndnTermExchRateFixationTime mtmphy CndnTermExchRateFixationTime
ExchRateMaturityDate mtmphy ExchRateMaturityDate
BsMktRefDrvtvContrMaturityCode mtmphy BsMktRefDrvtvContrMaturityCode
BasisMarketRefRate mtmphy BasisMarketRefRate
BasisMarketRefRateCurrency mtmphy BasisMarketRefRateCurrency
BasisMarketRefKeyDate mtmphy BasisMarketRefKeyDate
BasisMarketRefAdjustmentSpread mtmphy BasisMarketRefAdjustmentSpread
ConditionTermFactor mtmphy ConditionTermFactor
ConditionTermRateIsFixed mtmphy ConditionTermRateIsFixed
ValidityStartDateTime Valid From Timestamp
ValidityEndDateTime Valid To Timestamp
ValidityStartTime Valid From Time
ValidityEndDate ValidTo
ValidityEndTime Valid To Time
MaximumVersion Highest Version
ExposureDueDate
ReportingDate
CashFlowDirection
TimeToMaturity Time to Maturity
CmmdtyForwardIndexTiming cmmdtyforwardindextiming
FinancialInstrProductCategory
FinancialAssetsMgmtProductType
FinInstrTransactionCategory
FinancialInstrumentProductType
FinancialInstrActivityCategory
FinancialObject
PnLEventType
TermStartDate
TermEndDate
NumberOfCommodityContracts
TreasuryPositionAccount
DerivativeContract
OptionStrikePrice
OptionStrikeCurrency
OptionPutCallCode
OptionExerciseType
ExternalKeyFigureValue
OptionDeltaFactorKeyFigure
OptionDeltaFactor
EvaluationDate
MTMDataSelectionType
FinInstrExternalReference
DisplayView
HasErrorDescription
PhysicalCommodity mtmphy PhysicalCommodity Commodity Code
ValidityStartDate mtmphy ValidityStartDate Validity Start Date
SourceDocumentShortNumber mtmphy SourceDocumentShortNumber
SourceDocument mtmphy SourceDocument Document
SourceDocumentItem mtmphy SourceDocumentItem
SourceDocumentBusObjType mtmphy SourceDocumentBusObjType
OrignRefDocumentShortNumber mtmphy OrignRefDocumentShortNumber
OriginReferenceDocument mtmphy OriginReferenceDocument Root Document
OriginReferenceDocumentItem mtmphy OriginReferenceDocumentItem Root Document Item
OriginReferenceDocBusObjType mtmphy OriginReferenceDocBusObjType Root (BOR) Obj. Type
DeliveryDate mtmphy DeliveryDate Delivery Date
DeliveryYear mtmphy DeliveryYear
DeliveryMonth mtmphy DeliveryMonth
DerivativeContrSpecification mtmphy DerivativeContrSpecification DCS ID
MarketIdentifierCode mtmphy MarketIdentifierCode MIC
MaturityKeyDate mtmphy MaturityKeyDate Maturity Key Date
DerivativeContractMaturityCode mtmphy DerivativeContractMaturityCode Contr. Maturity Code
HasError mtmphy HasError TRUE
StatisticsCurrency mtmphy StatisticsCurrency
ConditionTermValueInStstcCrcy mtmphy ConditionTermValueInStstcCrcy
DocumentCurrency mtmphy DocumentCurrency Payment Currency
ConditionTermValueInDocCrcy mtmphy ConditionTermValueInDocCrcy
QuotationCurrency
RiskAnalyzerKeyFigInQtanCrcy
ConditionTermRate mtmphy ConditionTermRate
MarketToDocExchRate mtmphy MarketToDocExchRate
ConditionTermRateCurrency mtmphy ConditionTermRateCurrency
DocToStatisticalExchRate mtmphy DocToStatisticalExchRate
CommodityQuantityInTermUnit mtmphy CommodityQuantityInTermUnit
P_valuation_date0P_EvaluationDate
P_valuation_date1P_EvaluationDate
P_snapshot_date1P_EndOfDaySnapshotToDate
PricingKey Pricing Key
KEY Version mtmphy Version Exposure Version
KEY PricingDocumentItem mtmphy PricingDocumentItem Item
KEY ConditionType mtmphy ConditionType Condition type
KEY SubConditionType mtmphy SubConditionType
keyVersStockRecordUUID
KEY EndOfDaySnapshotDate mtmphy EndOfDaySnapshotDate
KEY CompanyCode mtmphy CompanyCode Receiver Company Code
KEY CommodityPriceExposure Exposure ID
KEY CommodityExposureCategory
KEY CommodityPriceSubExposure
MTMDataSourceType mtmphy MTMDataSourceType Type of Data Record
EndOfDaySnapshotDateTimeFrom mtmphy EndOfDaySnapshotDateTimeFrom
EndOfDaySnapshotDateTimeTo mtmphy EndOfDaySnapshotDateTimeTo
SalesOrganization mtmphy SalesOrganization Sales Organization
DistributionChannel mtmphy DistributionChannel RefDistCh-Cust/Mat.
Division mtmphy Division Internal Division ID
Creditor mtmphy Creditor Supplier
SoldToParty mtmphy SoldToParty Sold-to Party
Material mtmphy Material Vehicle Model
Plant mtmphy Plant Valuation Area
StorageLocation mtmphy StorageLocation StorageLocation
Batch mtmphy Batch Lot No.
GoodsMovementType mtmphy GoodsMovementType Movement Type
IncotermsClassification mtmphy IncotermsClassification Incoterms
IncotermsTransferLocation mtmphy IncotermsTransferLocation Incoterms 2
ConditionApplication mtmphy ConditionApplication Application
ReferenceDocument mtmphy ReferenceDocument Reference Document
ReferenceDocumentItem mtmphy ReferenceDocumentItem Reference item
ReferenceDocBusObjType mtmphy ReferenceDocBusObjType Pred(BOR) Object Typ
ExpectedPaymentDate mtmphy ExpectedPaymentDate
ExchRateEvaluationDate mtmphy ExchRateEvaluationDate
DocToStstcCrcyExchRateEvalDate mtmphy DocToStstcCrcyExchRateEvalDate
QuotationPeriodReferenceDate mtmphy QuotationPeriodReferenceDate
ProfitCenter mtmphy ProfitCenter Profit Center
BusinessArea mtmphy BusinessArea Business Area
PurchasingOrganization mtmphy PurchasingOrganization Purchasing Organization
MaterialGroup mtmphy MaterialGroup Product Group
IsIntercompanyTransfer mtmphy IsIntercompanyTransfer
MarketToDocFrozenExchRate mtmphy MarketToDocFrozenExchRate
ConditionTermRateQuantity mtmphy ConditionTermRateQuantity
ConditionTermRateQuantityUnit mtmphy ConditionTermRateQuantityUnit
ConditionTermValueCurrency mtmphy ConditionTermValueCurrency
BasisID mtmphy BasisID Basis ID
BasisType mtmphy BasisType Basis Type
QuotationPriceType mtmphy QuotationPriceType Price Type
MarketPriceCurrency mtmphy MarketPriceCurrency Market Price Crcy
OldestQuotationDate mtmphy OldestQuotationDate
SystemMessageNumber mtmphy SystemMessageNumber Message Number
MTMConditionGroupCategory mtmphy MTMConditionGroupCategory
MTMConditionGroup mtmphy MTMConditionGroup
MTMCalculationGroup mtmphy MTMCalculationGroup
MTMAdjustmentType mtmphy MTMAdjustmentType
MTMCalcGrpMarketPriceCondition mtmphy MTMCalcGrpMarketPriceCondition
ConditionTermExchRateIsFixed mtmphy ConditionTermExchRateIsFixed
ConditionTermRateFixation mtmphy ConditionTermRateFixation
PricingStatus mtmphy PricingStatus
CndnTermRateFixationDate mtmphy CndnTermRateFixationDate
CndnTermRateFixationTime mtmphy CndnTermRateFixationTime
CndnTermExchRateFixationDate mtmphy CndnTermExchRateFixationDate
CndnTermExchRateFixationTime mtmphy CndnTermExchRateFixationTime
ExchRateMaturityDate mtmphy ExchRateMaturityDate
BsMktRefDrvtvContrMaturityCode mtmphy BsMktRefDrvtvContrMaturityCode
BasisMarketRefRate mtmphy BasisMarketRefRate
BasisMarketRefRateCurrency mtmphy BasisMarketRefRateCurrency
BasisMarketRefKeyDate mtmphy BasisMarketRefKeyDate
BasisMarketRefAdjustmentSpread mtmphy BasisMarketRefAdjustmentSpread
ConditionTermFactor mtmphy ConditionTermFactor
ConditionTermRateIsFixed mtmphy ConditionTermRateIsFixed
ValidityStartDateTime Valid From Timestamp
ValidityEndDateTime Valid To Timestamp
ValidityStartTime Valid From Time
ValidityEndDate ValidTo
ValidityEndTime Valid To Time
MaximumVersion Highest Version
ExposureDueDate
ReportingDate
CashFlowDirection
TimeToMaturity Time to Maturity
CmmdtyForwardIndexTiming cmmdtyforwardindextiming
FinancialInstrProductCategory
FinancialAssetsMgmtProductType
FinInstrTransactionCategory
FinancialInstrumentProductType
FinancialInstrActivityCategory
FinancialObject
PnLEventType
TermStartDate
TermEndDate
NumberOfCommodityContracts
TreasuryPositionAccount
DerivativeContract
OptionStrikePrice
OptionStrikeCurrency
OptionPutCallCode
OptionExerciseType
ExternalKeyFigureValue
OptionDeltaFactorKeyFigure
OptionDeltaFactor
EvaluationDate
MTMDataSelectionType
FinInstrExternalReference
DisplayView
HasErrorDescription
PhysicalCommodity mtmphy PhysicalCommodity Commodity Code
ValidityStartDate mtmphy ValidityStartDate Validity Start Date
SourceDocumentShortNumber mtmphy SourceDocumentShortNumber
SourceDocument mtmphy SourceDocument Document
SourceDocumentItem mtmphy SourceDocumentItem
SourceDocumentBusObjType mtmphy SourceDocumentBusObjType
OrignRefDocumentShortNumber mtmphy OrignRefDocumentShortNumber
OriginReferenceDocument mtmphy OriginReferenceDocument Root Document
OriginReferenceDocumentItem mtmphy OriginReferenceDocumentItem Root Document Item
OriginReferenceDocBusObjType mtmphy OriginReferenceDocBusObjType Root (BOR) Obj. Type
DeliveryDate mtmphy DeliveryDate Delivery Date
DeliveryYear mtmphy DeliveryYear
DeliveryMonth mtmphy DeliveryMonth
DerivativeContrSpecification mtmphy DerivativeContrSpecification DCS ID
MarketIdentifierCode mtmphy MarketIdentifierCode MIC
MaturityKeyDate mtmphy MaturityKeyDate Maturity Key Date
DerivativeContractMaturityCode mtmphy DerivativeContractMaturityCode Contr. Maturity Code
HasError mtmphy HasError TRUE
StatisticsCurrency mtmphy StatisticsCurrency
ConditionTermValueInStstcCrcy mtmphy ConditionTermValueInStstcCrcy
DocumentCurrency mtmphy DocumentCurrency Payment Currency
ConditionTermValueInDocCrcy mtmphy ConditionTermValueInDocCrcy
QuotationCurrency
RiskAnalyzerKeyFigInQtanCrcy
ConditionTermRate mtmphy ConditionTermRate
MarketToDocExchRate mtmphy MarketToDocExchRate
ConditionTermRateCurrency mtmphy ConditionTermRateCurrency
DocToStatisticalExchRate mtmphy DocToStatisticalExchRate
CommodityQuantityInTermUnit mtmphy CommodityQuantityInTermUnit
P_DisplayView
P_EndOfDaySnapshotToDate
P_EvaluationDate
P_EndOfDaySnapshotFromDate
P_EndOfDaySnapshotToDate
KEY Version Exposure Version
KEY PricingDocumentItem Item
KEY ConditionType Condition type
KEY SubConditionType
VersStockRecordUUID
KEY EndOfDaySnapshotDate
KEY CompanyCode mtmfin CompanyCode Receiver Company Code
KEY CommodityPriceExposure mtmfin CommodityPriceExposure Exposure ID
KEY CommodityExposureCategory mtmfin CommodityExposureCategory
KEY CommodityPriceSubExposure mtmfin CommodityPriceSubExposure
MTMDataSourceType Type of Data Record
EndOfDaySnapshotDateTimeFrom
EndOfDaySnapshotDateTimeTo
SalesOrganization Sales Organization
DistributionChannel RefDistCh-Cust/Mat.
Division Internal Division ID
Creditor Supplier
SoldToParty Sold-to Party
Material Vehicle Model
Plant Valuation Area
StorageLocation StorageLocation
Batch Lot No.
GoodsMovementType Movement Type
IncotermsClassification Incoterms
IncotermsTransferLocation Incoterms 2
ReferenceDocument Reference Document
ReferenceDocumentItem Reference item
ReferenceDocBusObjType Pred(BOR) Object Typ
ExpectedPaymentDate
ExchRateEvaluationDate
DocToStstcCrcyExchRateEvalDate
QuotationPeriodReferenceDate
ProfitCenter Profit Center
BusinessArea Business Area
PurchasingOrganization Purchasing Organization
MaterialGroup Product Group
IsIntercompanyTransfer
MarketToDocFrozenExchRate
ConditionTermRateQuantity
ConditionTermRateQuantityUnit
ConditionTermValueCurrency
BasisID Basis ID
BasisType Basis Type
QuotationPriceType mtmfin QuotationPriceType Price Type
MarketPriceCurrency Market Price Crcy
OldestQuotationDate
SystemMessageNumber mtmfin SystemMessageNumber Message Number
MTMConditionGroup
MTMCalculationGroup
MTMAdjustmentType
MTMCalcGrpMarketPriceCondition
ConditionTermExchRateIsFixed
ConditionTermRateFixation
PricingStatus
CndnTermRateFixationDate
CndnTermRateFixationTime
CndnTermExchRateFixationDate
CndnTermExchRateFixationTime
ExchRateMaturityDate
BsMktRefDrvtvContrMaturityCode
BasisMarketRefRate
BasisMarketRefRateCurrency
BasisMarketRefKeyDate
BasisMarketRefAdjustmentSpread
ConditionTermFactor
ConditionTermRateIsFixed
ValidityStartDateTime mtmfin ValidityStartDateTime Valid From Timestamp
ValidityEndDateTime mtmfin ValidityEndDateTime Valid To Timestamp
ValidityStartTime mtmfin ValidityStartTime Valid From Time
ValidityEndDate mtmfin ValidityEndDate ValidTo
ValidityEndTime mtmfin ValidityEndTime Valid To Time
MaximumVersion mtmfin MaximumVersion Highest Version
ExposureDueDate mtmfin ExposureDueDate
ReportingDate mtmfin ReportingDate
CashFlowDirection mtmfin CashFlowDirection
TreasuryPositionLongShortCode mtmfin TreasuryPositionLongShortCode
TimeToMaturity mtmfin TimeToMaturity Time to Maturity
CmmdtyForwardIndexTiming mtmfin CmmdtyForwardIndexTiming
FinancialInstrProductCategory mtmfin FinancialInstrProductCategory
FinancialAssetsMgmtProductType mtmfin FinancialAssetsMgmtProductType
FinInstrTransactionCategory mtmfin FinInstrTransactionCategory
FinancialInstrumentProductType mtmfin FinancialInstrumentProductType
FinancialInstrActivityCategory mtmfin FinancialInstrActivityCategory
FinancialObject mtmfin FinancialObject
PnLEventType mtmfin PnLEventType
TermStartDate mtmfin TermStartDate
TermEndDate mtmfin TermEndDate
NumberOfCommodityContracts mtmfin NumberOfCommodityContracts
TreasuryPositionAccount mtmfin TreasuryPositionAccount
DerivativeContract mtmfin DerivativeContract
OptionStrikePrice
OptionStrikeCurrency mtmfin OptionStrikeCurrency
OptionPutCallCode mtmfin OptionPutCallCode
OptionExerciseType mtmfin OptionExerciseType
ExternalKeyFigureValue
OptionDeltaFactorKeyFigure
OptionDeltaFactor
EvaluationDate mtmfin EvaluationDate
MTMDataSelectionType mtmfin MTMDataSelectionType
FinInstrExternalReference mtmfin FinInstrExternalReference
DisplayView mtmfin DisplayView
HasErrorDescription mtmfin HasErrorDescription
PhysicalCommodity mtmfin Commodity Commodity Code
ValidityStartDate mtmfin ValidityStartDate Validity Start Date
SourceDocumentShortNumber
SourceDocument Document
SourceDocumentItem
OrignRefDocumentShortNumber
OriginReferenceDocument Root Document
OriginReferenceDocumentItem Root Document Item
DeliveryDate mtmfin DeliveryDate Delivery Date
DeliveryYear
DeliveryMonth
DerivativeContrSpecification mtmfin DerivativeContrSpecification DCS ID
MarketIdentifierCode mtmfin MarketIdentifierCode MIC
MaturityKeyDate mtmfin MaturityKeyDate Maturity Key Date
DerivativeContractMaturityCode mtmfin DerivativeContractMaturityCode Contr. Maturity Code
HasError mtmfin HasError TRUE
StatisticsCurrency mtmfin StatisticsCurrency
ConditionTermValueInStstcCrcy mtmfin RiskAnalyzerKeyFigInStstcCrcy
DocumentCurrency mtmfin PaymentCurrency Payment Currency
ConditionTermValueInDocCrcy mtmfin RiskAnalyzerKeyFigInPaytCrcy
QuotationCurrency mtmfin QuotationCurrency
RiskAnalyzerKeyFigInQtanCrcy mtmfin RiskAnalyzerKeyFigInQtanCrcy
MarketToDocExchRate
ConditionTermRateCurrency
DocToStatisticalExchRate
CommodityQuantity mtmfin CommodityPriceExposureQuantity
CommodityQuantityInTermUnit
CommodityUnit mtmfin CommodityPriceExposureUnit

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_UnionMTMPhyFin_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: PUNIONMTMPF2
-- Parameters: P_DisplayView : cds_view_uom, P_EvaluationDate : cds_evaluation_date, P_ExchRateEvaluationDate : cmm_eval_keydate, P_EndOfDaySnapshotFromDate : cmm_dend_cutdate, P_EndOfDaySnapshotToDate : cmm_dend_cutdate, P_MTMDataSelectionType : cmm_vlogp_consumptiontype, 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_UnionMTMPhyFin_2 AS
SELECT
  mtmphy.PricingKey AS PricingKey,
  mtmphy.Version AS Version,
  mtmphy.PricingDocumentItem AS PricingDocumentItem,
  mtmphy.ConditionType AS ConditionType,
  mtmphy.SubConditionType AS SubConditionType,
  mtmphy.EndOfDaySnapshotDate AS EndOfDaySnapshotDate,
  mtmphy.CompanyCode AS CompanyCode,
  cast(' ' as ftr_cty_expos_id) AS CommodityPriceExposure,
  cast(' ' as cmm_vfind_exposure_cat) AS CommodityExposureCategory,
  cast(' ' as cmm_vfind_exposure_subkey) AS CommodityPriceSubExposure,
  mtmphy.MTMDataSourceType AS MTMDataSourceType,
  mtmphy.EndOfDaySnapshotDateTimeFrom AS EndOfDaySnapshotDateTimeFrom,
  mtmphy.EndOfDaySnapshotDateTimeTo AS EndOfDaySnapshotDateTimeTo,
  mtmphy.SalesOrganization AS SalesOrganization,
  mtmphy.DistributionChannel AS DistributionChannel,
  mtmphy.Division AS Division,
  mtmphy.Creditor AS Creditor,
  mtmphy.SoldToParty AS SoldToParty,
  mtmphy.Material AS Material,
  mtmphy.Plant AS Plant,
  mtmphy.StorageLocation AS StorageLocation,
  mtmphy.Batch AS Batch,
  mtmphy.GoodsMovementType AS GoodsMovementType,
  mtmphy.IncotermsClassification AS IncotermsClassification,
  mtmphy.IncotermsTransferLocation AS IncotermsTransferLocation,
  mtmphy.ConditionApplication AS ConditionApplication,
  mtmphy.ReferenceDocument AS ReferenceDocument,
  mtmphy.ReferenceDocumentItem AS ReferenceDocumentItem,
  mtmphy.ReferenceDocBusObjType AS ReferenceDocBusObjType,
  mtmphy.ExpectedPaymentDate AS ExpectedPaymentDate,
  mtmphy.ExchRateEvaluationDate AS ExchRateEvaluationDate,
  mtmphy.DocToStstcCrcyExchRateEvalDate AS DocToStstcCrcyExchRateEvalDate,
  mtmphy.QuotationPeriodReferenceDate AS QuotationPeriodReferenceDate,
  mtmphy.ProfitCenter AS ProfitCenter,
  mtmphy.BusinessArea AS BusinessArea,
  mtmphy.PurchasingOrganization AS PurchasingOrganization,
  mtmphy.MaterialGroup AS MaterialGroup,
  mtmphy.IsIntercompanyTransfer AS IsIntercompanyTransfer,
  mtmphy.MarketToDocFrozenExchRate AS MarketToDocFrozenExchRate,
  mtmphy.ConditionTermRateQuantity AS ConditionTermRateQuantity,
  mtmphy.ConditionTermRateQuantityUnit AS ConditionTermRateQuantityUnit,
  mtmphy.ConditionTermValueCurrency AS ConditionTermValueCurrency,
  mtmphy.BasisID AS BasisID,
  mtmphy.BasisType AS BasisType,
  mtmphy.QuotationPriceType AS QuotationPriceType,
  mtmphy.MarketPriceCurrency AS MarketPriceCurrency,
  mtmphy.OldestQuotationDate AS OldestQuotationDate,
  mtmphy.SystemMessageNumber AS SystemMessageNumber,
  mtmphy.MTMConditionGroupCategory AS MTMConditionGroupCategory,
  mtmphy.MTMConditionGroup AS MTMConditionGroup,
  mtmphy.MTMCalculationGroup AS MTMCalculationGroup,
  mtmphy.MTMAdjustmentType AS MTMAdjustmentType,
  mtmphy.MTMCalcGrpMarketPriceCondition AS MTMCalcGrpMarketPriceCondition,
  mtmphy.ConditionTermExchRateIsFixed AS ConditionTermExchRateIsFixed,
  mtmphy.ConditionTermRateFixation AS ConditionTermRateFixation,
  mtmphy.PricingStatus AS PricingStatus,
  mtmphy.CndnTermRateFixationDate AS CndnTermRateFixationDate,
  mtmphy.CndnTermRateFixationTime AS CndnTermRateFixationTime,
  mtmphy.CndnTermExchRateFixationDate AS CndnTermExchRateFixationDate,
  mtmphy.CndnTermExchRateFixationTime AS CndnTermExchRateFixationTime,
  mtmphy.ExchRateMaturityDate AS ExchRateMaturityDate,
  mtmphy.BsMktRefDrvtvContrMaturityCode AS BsMktRefDrvtvContrMaturityCode,
  mtmphy.BasisMarketRefRate AS BasisMarketRefRate,
  mtmphy.BasisMarketRefRateCurrency AS BasisMarketRefRateCurrency,
  mtmphy.BasisMarketRefKeyDate AS BasisMarketRefKeyDate,
  mtmphy.BasisMarketRefAdjustmentSpread AS BasisMarketRefAdjustmentSpread,
  mtmphy.ConditionTermFactor AS ConditionTermFactor,
  mtmphy.ConditionTermRateIsFixed AS ConditionTermRateIsFixed,
  cast(0 as ftr_valid_from_stmp) AS ValidityStartDateTime,
  cast(0 as ftr_valid_to_stmp) AS ValidityEndDateTime,
  cast('' as ftr_valid_from_time) AS ValidityStartTime,
  cast('' as ftr_valid_to) AS ValidityEndDate,
  cast('' as ftr_valid_to_time) AS ValidityEndTime,
  cast('' as cmm_mtm_version_max) AS MaximumVersion,
  cast (' ' as ftr_exposure_date) AS ExposureDueDate,
  cast('' as ftr_reporting_date) AS ReportingDate,
  cast (' ' as cmm_side) AS CashFlowDirection,
  cast (' ' as tba_tenor) AS TimeToMaturity,
  CmmdtyForwardIndexTiming,
  cast (' ' as sanlf) AS FinancialInstrProductCategory,
  cast (' ' as vvsart) AS FinancialAssetsMgmtProductType,
  cast (' ' as tb_sfgtyp) AS FinInstrTransactionCategory,
  cast (' ' as tb_sfhaart) AS FinancialInstrumentProductType,
  cast (' ' as tb_sfgzuty) AS FinancialInstrActivityCategory,
  cast (' ' as ftr_objnr) AS FinancialObject,
  cast(' ' as cmm_event) AS PnLEventType,
  cast (' ' as tb_dblfz) AS TermStartDate,
  cast (' ' as tb_delfz) AS TermEndDate,
  cast ( 0 as tb_contracts_number) AS NumberOfCommodityContracts,
  cast (' ' as tpm_pos_account_fut) AS TreasuryPositionAccount,
  cast (' ' as ftr_derivative_contract_id) AS DerivativeContract,
  cast ( 0 as tb_cty_strike_price) AS OptionStrikePrice,
  cast (' ' as ti_ofwaers) AS OptionStrikeCurrency,
  cast (' ' as ti_sputcal) AS OptionPutCallCode,
  cast('' as soptaus) AS OptionExerciseType,
  cast (' ' as cds_external_key_figures) AS ExternalKeyFigureValue,
  cast('0' as cmm_eval_option_delta_factor ) AS OptionDeltaFactorKeyFigure,
  cast(' ' as cds_option_delta_factor) AS OptionDeltaFactor,
  $parameters.P_EvaluationDate AS EvaluationDate,
  $parameters.P_MTMDataSelectionType AS MTMDataSelectionType,
  cast( '' as tb_nordext ) AS FinInstrExternalReference,
  $parameters.P_DisplayView AS DisplayView,
  cast('' as cds_error_description) AS HasErrorDescription,
  mtmphy.PhysicalCommodity AS PhysicalCommodity,
  mtmphy.ValidityStartDate AS ValidityStartDate,
  mtmphy.SourceDocumentShortNumber AS SourceDocumentShortNumber,
  mtmphy.SourceDocument AS SourceDocument,
  mtmphy.SourceDocumentItem AS SourceDocumentItem,
  mtmphy.SourceDocumentBusObjType AS SourceDocumentBusObjType,
  mtmphy.OrignRefDocumentShortNumber AS OrignRefDocumentShortNumber,
  mtmphy.OriginReferenceDocument AS OriginReferenceDocument,
  mtmphy.OriginReferenceDocumentItem AS OriginReferenceDocumentItem,
  mtmphy.OriginReferenceDocBusObjType AS OriginReferenceDocBusObjType,
  mtmphy.DeliveryDate AS DeliveryDate,
  mtmphy.DeliveryYear AS DeliveryYear,
  mtmphy.DeliveryMonth AS DeliveryMonth,
  mtmphy.DerivativeContrSpecification AS DerivativeContrSpecification,
  mtmphy.MarketIdentifierCode AS MarketIdentifierCode,
  mtmphy.MaturityKeyDate AS MaturityKeyDate,
  mtmphy.DerivativeContractMaturityCode AS DerivativeContractMaturityCode,
  mtmphy.HasError AS HasError,
  mtmphy.StatisticsCurrency AS StatisticsCurrency,
  mtmphy.ConditionTermValueInStstcCrcy AS ConditionTermValueInStstcCrcy,
  mtmphy.DocumentCurrency AS DocumentCurrency,
  mtmphy.ConditionTermValueInDocCrcy AS ConditionTermValueInDocCrcy,
  cast(' ' as cmm_eval_quot_curr) AS QuotationCurrency,
  cast(0 as cmm_eval_cv_quot_curr) AS RiskAnalyzerKeyFigInQtanCrcy,
  mtmphy.ConditionTermRate AS ConditionTermRate,
  mtmphy.MarketToDocExchRate AS MarketToDocExchRate,
  mtmphy.ConditionTermRateCurrency AS ConditionTermRateCurrency,
  mtmphy.DocToStatisticalExchRate AS DocToStatisticalExchRate,
  mtmphy.CommodityQuantityInTermUnit AS CommodityQuantityInTermUnit,
  P_valuation_date0 : :P_EvaluationDate AS P_valuation_date0P_EvaluationDate,
  P_valuation_date1 : :P_EvaluationDate AS P_valuation_date1P_EvaluationDate,
  P_snapshot_date1 : :P_EndOfDaySnapshotToDate AS P_snapshot_date1P_EndOfDaySnapshotToDate,
  cast ( case $parameters.P_DisplayView when ( 'P' ) then ( mtmphy.CommodityUnit ) when ( 'M' ) then ( mtmphy.CmmdtyPriceExpsrMassUnit ) when ( 'V' ) then ( mtmphy.CmmdtyPriceExpsrVolumeUnit ) else mtmphy.CommodityUnit end as cmm_mtm_quan_commuom ) as CommodityUnit AS P_DisplayView,
  P_EvaluationDate :$parameters.P_EndOfDaySnapshotToDate AS P_EndOfDaySnapshotToDate,
  P_ComparisonDate :$parameters.P_EndOfDaySnapshotFromDate AS P_EndOfDaySnapshotFromDate,
  mtmfin.TreasuryPositionLongShortCode AS TreasuryPositionLongShortCode,
  mtmfin.CommodityPriceExposureQuantity AS CommodityQuantity,
  mtmfin.CommodityPriceExposureUnit AS CommodityUnit
FROM P_CmmdtyMtmValue_Final_2
-- UNION ALL with additional select branch(es): P_CmmdtyStockValue_Final, P_DrvtvMTMBl
;