P_DMVCECCostEstimateHead

DDL: P_DMVCECCOSTESTIMATEHEAD Type: view_entity BASIC Package: ODATA_ML_DMVC_EC

Cost Estimate Head (KEKO) with unit costing from CKHS

P_DMVCECCostEstimateHead is a Basic CDS View that provides data about "Cost Estimate Head (KEKO) with unit costing from CKHS" in SAP S/4HANA. It reads from 1 data source (I_ProductCostEstimate) and exposes 27 fields with key fields CostingReferenceObject, ProdCostEstNumber, CostingType, CostingDate, CostingVersion. It has 4 associations to related views. Part of development package ODATA_ML_DMVC_EC.

Data Sources (1)

SourceAliasJoin Type
I_ProductCostEstimate I_ProductCostEstimate from

Associations (4)

CardinalityTargetAliasCondition
[0..1] P_CKHS _UnitCosting $projection.CostingReferenceObject = _UnitCosting.CostingReferenceObject and $projection.ProdCostEstNumber = _UnitCosting.ProdCostEstNumber and $projection.CostingType = _UnitCosting.CostingType and $projection.CostingDate = _UnitCosting.CostingDate and $projection.CostingVersion = _UnitCosting.CostingVersion and $projection.ValuationVariant = _UnitCosting.ValuationVariant and $projection.CostIsEnteredManually = _UnitCosting.CostIsEnteredManually and _UnitCosting.lednr = '00'
[0..*] I_MaterialText _Materialtext $projection.Material = _Materialtext.Material
[0..1] I_ProductionVersion _ProductionVersion $projection.Material = _ProductionVersion.Material and $projection.Plant = _ProductionVersion.Plant and $projection.ProductionVersion = _ProductionVersion.ProductionVersion
[0..1] P_ProcurementAlternative _ProcurementAlternative $projection.ProdCostEstNumber = _ProcurementAlternative.ProcurementAlternative

Annotations (4)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY CostingReferenceObject CostingReferenceObject
KEY ProdCostEstNumber CostEstimate Cost EstimateNo
KEY CostingType CostingType
KEY CostingDate CostingDate
KEY CostingVersion CostingVersion
KEY ValuationVariant ValuationVariant
KEY CostIsEnteredManually CostIsEnteredManually
CostEstimateCostingLevel CostEstimateCostingLevel
Material Product Product Sold
MaterialName
Plant Plant Valuation Area
ValuationArea ValuationArea Valuation Area
ValuationType ValuationType Valuation Type
ControllingArea ControllingArea Controlling Area
CompanyCode CompanyCode Receiver Company Code
CostEstimateValidityStartDate CostEstimateValidityStartDate
CostEstimateValidityEndDate CostEstimateValidityEndDate
TaskListGroupCounter TaskListGroupCounter Group Counter
CostingVariant CostingVariant
CostingLotSize _UnitCosting CostingLotSize
ValuationQuantityUnitInternal _UnitCosting ValuationQuantityUnit
ValuationQuantityUnit
TotalAmountInCoCodeCrcy
CompanyCodeCurrency _UnitCosting CompanyCodeCurrency Local Currency
TotalAmountInGroupCrcy
GroupCurrency _UnitCosting GroupCurrency Ledger curr.
ProcessCategory _ProcurementAlternative ProcessCategory

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_DMVCECCostEstimateHead.
-- 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.

CREATE VIEW P_DMVCECCostEstimateHead AS
SELECT
  CostingReferenceObject,
  CostEstimate AS ProdCostEstNumber,
  CostingType,
  CostingDate,
  CostingVersion,
  ValuationVariant,
  CostIsEnteredManually,
  CostEstimateCostingLevel,
  Product AS Material,
  _Materialtext[1: Language = $session.system_language].MaterialName AS MaterialName,
  Plant,
  ValuationArea,
  ValuationType,
  ControllingArea,
  CompanyCode,
  CostEstimateValidityStartDate,
  CostEstimateValidityEndDate,
  TaskListGroupCounter,
  CostingVariant,
  _UnitCosting.CostingLotSize AS CostingLotSize,
  _UnitCosting.ValuationQuantityUnit AS ValuationQuantityUnitInternal,
  _UnitCosting._UnitOfMeasure.UnitOfMeasure_E AS ValuationQuantityUnit,
  cast( _UnitCosting.TotalAmountInCoCodeCrcy as fml_dmvcec_total_costs ) AS TotalAmountInCoCodeCrcy,
  _UnitCosting.CompanyCodeCurrency AS CompanyCodeCurrency,
  cast( _UnitCosting.TotalAmountInGroupCrcy as fml_dmvcec_total_costs ) AS TotalAmountInGroupCrcy,
  _UnitCosting.GroupCurrency AS GroupCurrency,
  _ProcurementAlternative.ProcessCategory AS ProcessCategory
FROM I_ProductCostEstimate
LEFT OUTER JOIN P_CKHS AS _UnitCosting ON CostingReferenceObject = _UnitCosting.CostingReferenceObject AND ProdCostEstNumber = _UnitCosting.ProdCostEstNumber AND CostingType = _UnitCosting.CostingType AND CostingDate = _UnitCosting.CostingDate AND CostingVersion = _UnitCosting.CostingVersion AND ValuationVariant = _UnitCosting.ValuationVariant AND CostIsEnteredManually = _UnitCosting.CostIsEnteredManually AND _UnitCosting.lednr = '00'  -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _Materialtext ON Material = _Materialtext.Material  -- association [0..*]
LEFT OUTER JOIN I_ProductionVersion AS _ProductionVersion ON Material = _ProductionVersion.Material AND Plant = _ProductionVersion.Plant AND ProductionVersion = _ProductionVersion.ProductionVersion  -- association [0..1]
LEFT OUTER JOIN P_ProcurementAlternative AS _ProcurementAlternative ON ProdCostEstNumber = _ProcurementAlternative.ProcurementAlternative  -- association [0..1]
;