C_DspMatlActlCostgRsltByKeyDte

DDL: C_DSPMATLACTLCOSTGRSLTBYKEYDTE Type: view_entity CONSUMPTION Package: ODATA_ML_ACR_DISP

F6073 Material Master with inv prices

C_DspMatlActlCostgRsltByKeyDte is a Consumption CDS View that provides data about "F6073 Material Master with inv prices" in SAP S/4HANA. It reads from 1 data source (C_DspMatlActlCostgRsltCostgRun) and exposes 43 fields with key fields CostEstimate, CurrencyRole. It has 4 associations to related views. Part of development package ODATA_ML_ACR_DISP.

Data Sources (1)

SourceAliasJoin Type
C_DspMatlActlCostgRsltCostgRun C_DspMatlActlCostgRsltCostgRun from

Parameters (3)

NameTypeDefault
P_CalendarDate calendardate
P_CurrencyRole fins_curtype
P_Ledger fins_ledger

Associations (4)

CardinalityTargetAliasCondition
[0..1] P_DACRMaterialInventory _BeginningInventory $projection.CostEstimate = _BeginningInventory.CostEstimate and $projection.CurrencyRole = _BeginningInventory.CurrencyRole and $projection.Ledger = _BeginningInventory.Ledger and $projection.FiscalYearPeriod = _BeginningInventory.FiscalYearPeriod and $projection.BaseUnit = _BeginningInventory.BaseUnit and _BeginningInventory.ValuationPriceCategory = 'AB'
[0..1] P_DACRMaterialInventory _EndingInventory $projection.CostEstimate = _EndingInventory.CostEstimate and $projection.CurrencyRole = _EndingInventory.CurrencyRole and $projection.Ledger = _EndingInventory.Ledger and $projection.FiscalYearPeriod = _EndingInventory.FiscalYearPeriod and $projection.BaseUnit = _EndingInventory.BaseUnit and _EndingInventory.ValuationPriceCategory = 'EB'
[0..1] P_DACRReceipts _Receipts $projection.CostEstimate = _Receipts.CostEstimate and $projection.CurrencyRole = _Receipts.LedgerValuationCurrencyRole and $projection.Ledger = _Receipts.Ledger and $projection.FiscalYearPeriod = _Receipts.FiscalYearPeriod and $projection.BaseUnit = _Receipts.ValuationQuantityUnit
[0..1] P_DACRConsumptions _Consumptions $projection.CostEstimate = _Consumptions.CostEstimate and $projection.CurrencyRole = _Consumptions.LedgerValuationCurrencyRole and $projection.Ledger = _Consumptions.Ledger and $projection.FiscalYearPeriod = _Consumptions.FiscalYearPeriod and $projection.BaseUnit = _Consumptions.ValuationQuantityUnit

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label F6073 Material Master with inv prices view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.representativeKey CostEstimate view
VDM.viewType #CONSUMPTION view

Fields (43)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate _CostingRun CostEstimate Cost EstimateNo
KEY CurrencyRole _CostingRun CurrencyRole Curr./Val. Type
Ledger _CostingRun Ledger Ledger
ValuationArea _CostingRun ValuationArea Valuation Area
CompanyCode _CostingRun CompanyCode Receiver Company Code
CompanyCodeName _CostingRun CompanyCodeName Company Name
ControllingArea _CostingRun ControllingArea Controlling Area
ControllingAreaName _CostingRun ControllingAreaName Long Text
Plant _CostingRun Plant Valuation Area
PlantName _CostingRun PlantName Plant Name
FiscalYear _CostingRun FiscalYear G/L Fiscal Year
FiscalPeriod _CostingRun FiscalPeriod Tax period
FiscalYearPeriod _CostingRun FiscalYearPeriod Period/Year
Material _CostingRun Material Vehicle Model
MaterialName _CostingRun MaterialName Material Description
InventoryValuationType _CostingRun InventoryValuationType Valuation Type
Currency _CostingRun Currency Valuation Crcy
InventoryPrice _CostingRun InventoryPrice Price
StandardPrice _CostingRun StandardPrice Standard price
BaseUnit _CostingRun BaseUnit Unit of Measure
MaterialPriceUnitQty _CostingRun MaterialPriceUnitQty Price unit
SalesOrder _CostingRun SalesOrder SD Document
SalesOrderItem _CostingRun SalesOrderItem Sales Order Item
WBSElementInternalID _CostingRun WBSElementInternalID WBS Internal ID
Supplier _CostingRun Supplier Supplier
BeginningInventoryAmount
BeginningInventoryQuantity
EndingInventoryAmount
EndingInventoryQuantity
MatlReceiptValuationQuantity
MatlCnsmpnValuationQuantity
dec112endasMatlLdgrPrThresholdInPercent
MatlLdgrPriceDifferenceAmount
CostingRunStatus _CostingRun CostingRunStatus
CostingRunStatusName _CostingRun CostingRunStatusName
MaterialPriceControl _CostingRun MaterialPriceControl Price Control
CostingRunType _CostingRun CostingRunType
CostingRunTypeName _CostingRun CostingRunTypeName
_Plant _Plant
_Material _Material
_WBSElementBasicData _WBSElementBasicData
_CurrencyRole _CurrencyRole
_Ledger _CostingRun _Ledger

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 C_DspMatlActlCostgRsltByKeyDte.
-- 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.
-- Parameters: P_CalendarDate : calendardate, P_CurrencyRole : fins_curtype, P_Ledger : fins_ledger

CREATE VIEW C_DspMatlActlCostgRsltByKeyDte AS
SELECT
  _CostingRun.CostEstimate AS CostEstimate,
  _CostingRun.CurrencyRole AS CurrencyRole,
  _CostingRun.Ledger AS Ledger,
  _CostingRun.ValuationArea AS ValuationArea,
  _CostingRun.CompanyCode AS CompanyCode,
  _CostingRun.CompanyCodeName AS CompanyCodeName,
  _CostingRun.ControllingArea AS ControllingArea,
  _CostingRun.ControllingAreaName AS ControllingAreaName,
  _CostingRun.Plant AS Plant,
  _CostingRun.PlantName AS PlantName,
  _CostingRun.FiscalYear AS FiscalYear,
  _CostingRun.FiscalPeriod AS FiscalPeriod,
  _CostingRun.FiscalYearPeriod AS FiscalYearPeriod,
  _CostingRun.Material AS Material,
  _CostingRun.MaterialName AS MaterialName,
  _CostingRun.InventoryValuationType AS InventoryValuationType,
  _CostingRun.Currency AS Currency,
  _CostingRun.InventoryPrice AS InventoryPrice,
  _CostingRun.StandardPrice AS StandardPrice,
  _CostingRun.BaseUnit AS BaseUnit,
  _CostingRun.MaterialPriceUnitQty AS MaterialPriceUnitQty,
  _CostingRun.SalesOrder AS SalesOrder,
  _CostingRun.SalesOrderItem AS SalesOrderItem,
  _CostingRun.WBSElementInternalID AS WBSElementInternalID,
  _CostingRun.Supplier AS Supplier,
  cast ( _BeginningInventory.InventoryPrice as fml_dmvc_begin_invtry_value ) AS BeginningInventoryAmount,
  cast( _BeginningInventory.MaterialPriceUnitQty as fml_dmvc_begin_invtry_qty ) AS BeginningInventoryQuantity,
  cast( _EndingInventory.InventoryPrice as fml_dmvc_ending_invtry_value ) AS EndingInventoryAmount,
  cast( _EndingInventory.MaterialPriceUnitQty as fml_dmvc_ending_invtry_qty ) AS EndingInventoryQuantity,
  cast( _Receipts.ValuationQuantity as fml_dacr_receipts_qty) AS MatlReceiptValuationQuantity,
  cast( -1 * (_Consumptions.ValuationQuantity) as fml_dacr_consumptions_qty) AS MatlCnsmpnValuationQuantity,
  case _CostingRun.StandardPrice when 0 then 0 else cast( (division(cast( (_CostingRun.StandardPrice - _CostingRun.InventoryPrice) as abap.dec( 23, 2 ) ) , cast(_CostingRun.StandardPrice as abap.dec( 23, 2 ) ), 4 ) * 100 ) as abap.dec( 11, 2 )) end as MatlLdgrPrThresholdInPercent AS dec112endasMatlLdgrPrThresholdInPercent,
  cast(_CostingRun.StandardPrice - _CostingRun.InventoryPrice as fml_difference_price) AS MatlLdgrPriceDifferenceAmount,
  _CostingRun.CostingRunStatus AS CostingRunStatus,
  _CostingRun.CostingRunStatusName AS CostingRunStatusName,
  _CostingRun.MaterialPriceControl AS MaterialPriceControl,
  _CostingRun.CostingRunType AS CostingRunType,
  _CostingRun.CostingRunTypeName AS CostingRunTypeName,
  _CostingRun._Ledger AS _Ledger
FROM C_DspMatlActlCostgRsltCostgRun
LEFT OUTER JOIN P_DACRMaterialInventory AS _BeginningInventory ON CostEstimate = _BeginningInventory.CostEstimate AND CurrencyRole = _BeginningInventory.CurrencyRole AND Ledger = _BeginningInventory.Ledger AND FiscalYearPeriod = _BeginningInventory.FiscalYearPeriod AND BaseUnit = _BeginningInventory.BaseUnit AND _BeginningInventory.ValuationPriceCategory = 'AB'  -- association [0..1]
LEFT OUTER JOIN P_DACRMaterialInventory AS _EndingInventory ON CostEstimate = _EndingInventory.CostEstimate AND CurrencyRole = _EndingInventory.CurrencyRole AND Ledger = _EndingInventory.Ledger AND FiscalYearPeriod = _EndingInventory.FiscalYearPeriod AND BaseUnit = _EndingInventory.BaseUnit AND _EndingInventory.ValuationPriceCategory = 'EB'  -- association [0..1]
LEFT OUTER JOIN P_DACRReceipts AS _Receipts ON CostEstimate = _Receipts.CostEstimate AND CurrencyRole = _Receipts.LedgerValuationCurrencyRole AND Ledger = _Receipts.Ledger AND FiscalYearPeriod = _Receipts.FiscalYearPeriod AND BaseUnit = _Receipts.ValuationQuantityUnit  -- association [0..1]
LEFT OUTER JOIN P_DACRConsumptions AS _Consumptions ON CostEstimate = _Consumptions.CostEstimate AND CurrencyRole = _Consumptions.LedgerValuationCurrencyRole AND Ledger = _Consumptions.Ledger AND FiscalYearPeriod = _Consumptions.FiscalYearPeriod AND BaseUnit = _Consumptions.ValuationQuantityUnit  -- association [0..1]
;