P_CURRENTMATLVALNPRICE
Material Valuation Prices - Current/Previous/PrevYear Period
P_CURRENTMATLVALNPRICE is a CDS View in S/4HANA. Material Valuation Prices - Current/Previous/PrevYear Period. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_CurrentMatlValnPrice | view_entity | from | COMPOSITE | Current Material Valuation Price |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_CURRENTMATLVALNPRICE
as select from I_MaterialLedgerPrice as invprice
inner join I_MatlValnSemKeyMappg as hd on hd.CostEstimate = invprice.CostEstimate
left outer join I_WBSElementBasicData as ps on ps.WBSElementInternalID = hd.WBSElementInternalID
association [0..1] to R_MatlLedgerValnCrcyRole as _MLCurrencyInfo on _MLCurrencyInfo.CurrencyRole = invprice.CurrencyRole
and _MLCurrencyInfo.Ledger = invprice.Ledger
and _MLCurrencyInfo.CompanyCode = invprice.CompanyCode
association [0..1] to I_MaterialLedgerPrice as _StandardPrice on _StandardPrice.CostEstimate = invprice.CostEstimate
and _StandardPrice.Ledger = invprice.Ledger
and _StandardPrice.CurrencyRole = invprice.CurrencyRole
and _StandardPrice.MaterialPriceType = 'STDPR'
and _StandardPrice.MaterialPriceSubtype = ' '
and _StandardPrice.MaterialPriceValidityEndDate = '99991231'
association [0..1] to I_MaterialLedgerPrice as _ActualPrice on _ActualPrice.CostEstimate = invprice.CostEstimate
and _ActualPrice.Ledger = invprice.Ledger
and _ActualPrice.CurrencyRole = invprice.CurrencyRole
and _ActualPrice.MaterialPriceType = 'ACT'
and _ActualPrice.MaterialPriceSubtype = 'ACT'
and _ActualPrice.MaterialPriceValidityEndDate = '99991231'
association [0..1] to I_MaterialLedgerPrice as _MvgAvgPrice on _MvgAvgPrice.CostEstimate = invprice.CostEstimate
and _MvgAvgPrice.Ledger = invprice.Ledger
and _MvgAvgPrice.CurrencyRole = invprice.CurrencyRole
and _MvgAvgPrice.MaterialPriceType = 'MAP'
and _MvgAvgPrice.MaterialPriceSubtype = ' '
and _MvgAvgPrice.MaterialPriceValidityEndDate = '99991231'
association [0..1] to I_MaterialLedgerPrice as _FuturePrice on _FuturePrice.CostEstimate = invprice.CostEstimate
and _FuturePrice.Ledger = invprice.Ledger
and _FuturePrice.CurrencyRole = invprice.CurrencyRole
and _FuturePrice.MaterialPriceType = 'FUTURE'
and _FuturePrice.MaterialPriceSubtype = ' '
association [0..1] to I_MLPrExtRefCostEstimate as _FutureStdPrice on _FutureStdPrice.CostEstimate = invprice.CostEstimate
and _FutureStdPrice.Ledger = invprice.Ledger
and _FutureStdPrice.CurrencyRole = invprice.CurrencyRole
and _FutureStdPrice.MaterialPriceType = 'FSTDCE'
and _FutureStdPrice.MaterialPriceSubtype = ' '
{
key invprice.CostEstimate,
key invprice.Ledger,
key invprice.CurrencyRole,
hd.Material,
hd.ValuationArea,
hd.InventoryValuationType,
hd.SalesOrder,
hd.SalesOrderItem,
hd.Supplier,
hd.WBSElementInternalID,
ps.WBSElementExternalID as WBSElementExternalID,
hd.InventorySpecialStockType as InvtryValnSpecialStockType,
hd.InventorySpecialStockValnType,
hd.IsSupplierStockValuation,
hd.PriceDeterminationControl,
invprice.CompanyCode,
invprice.MaterialPriceControl as MaterialPriceControl,
invprice.MaterialPriceUnitQty as MaterialPriceUnitQty,
invprice.Currency as Currency,
@Semantics.amount.currencyCode: 'Currency'
cast(
case invprice.MaterialPriceControl
when 'S'
then case hd.PriceDeterminationControl
when '2' then _MvgAvgPrice.MaterialPrice
when '3' then _ActualPrice.MaterialPrice
else cast ( 0 as ck_stprs_1 )
end
else //when 'V'
invprice.MaterialPrice
end as ck_pvprs_1 ) as MovingAveragePrice,
@Semantics.amount.currencyCode: 'Currency'
cast(
case invprice.MaterialPriceControl
when 'S' then invprice.MaterialPrice
else _StandardPrice.MaterialPrice
end as ck_stprs_1 ) as StandardPrice,
@Semantics.amount.currencyCode: 'Currency'
invprice.MaterialPrice as InventoryPrice,
@Semantics.amount.currencyCode: 'Currency'
cast( _FuturePrice.MaterialPrice as dzkprs ) as FuturePrice,
_FuturePrice.MaterialPriceValidityStartDate as FuturePriceValidityStartDate,
@Semantics.amount.currencyCode: 'Currency'
cast( _FutureStdPrice.MaterialPrice as fml_plpr) as PlannedPrice,
_FutureStdPrice.ValuationVariant as FutrCostEstValuationVariant,
_FutureStdPrice.MatlPrcValidityStartFiscalYear as FutureCostEstFiscalYear,
_FutureStdPrice.MatlPrcValdtyStartFiscalPeriod as FutureCostEstimateFiscalPeriod,
_FutureStdPrice.CostingVersion as FutureCostEstCostingVersion,
//pr.zbwst as FutrPlanProjSlsOrdValnStrategy,
@Semantics.amount.currencyCode: 'Currency'
_FutureStdPrice.FixedPortionOfMaterialPrice as FixedPortionOfPlannedPrice,
_MLCurrencyInfo.LedgerName as LedgerName,
_MLCurrencyInfo.CurrencyRoleName as CurrencyRoleName,
// _CurrencyInfo.LegalCurrencyRole as LegalCurrencyRole,
// _CurrencyInfo.LegalCurrencyRoleName as LegalCurrencyRoleName,
// cast(_CurrencyInfo.AccountingValuationView as fins_valutyp) as AccountingValuationView,
// _CurrencyInfo.AcctgValnVwSubviewCombinedName as AcctgValnVwSubviewCombinedName,
_MLCurrencyInfo.LedgerValnCrcyRoleIsUsedInLogs as LedgerValnCrcyRoleIsUsedInLogs
}
where
invprice.MaterialPriceType = 'INVPR'
and invprice.MaterialPriceSubtype = ' '
and invprice.MaterialPriceValidityEndDate = '99991231'