C_MatlLdgrPrSalesOrderCostEst

DDL: C_MATLLDGRPRSALESORDERCOSTEST SQL: CMVSOCOSTEST Type: view CONSUMPTION

Cost Estimates for Sales Order

C_MatlLdgrPrSalesOrderCostEst is a Consumption CDS View that provides data about "Cost Estimates for Sales Order" in SAP S/4HANA. It reads from 2 data sources (P_Matval_Manage_Cost_Sls_Ord, R_MatlLedgerValnCrcyRole) and exposes 33 fields with key fields CostEstimate, CostEstimateStatus, LedgerValuationCurrencyRole, Ledger. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
P_Matval_Manage_Cost_Sls_Ord ce from
R_MatlLedgerValnCrcyRole lvcr inner

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_ControllingArea _ControllingAreaText $projection.controllingarea = _ControllingAreaText.ControllingArea
[0..*] I_ControllingValuationTypeText _ControllingValuationTypeText $projection.ControllingValuationType = _ControllingValuationTypeText.ControllingValuationType
[0..*] I_CostingVariantText _CostingVariantText $projection.CostingVariant = _CostingVariantText.CostingVariant
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CMVSOCOSTEST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Cost Estimates for Sales Order view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate P_Matval_Manage_Cost_Sls_Ord CostEstimate Cost EstimateNo
KEY CostEstimateStatus P_Matval_Manage_Cost_Sls_Ord CostEstimateStatus
KEY LedgerValuationCurrencyRole R_MatlLedgerValnCrcyRole LedgerValuationCurrencyRole
KEY Ledger R_MatlLedgerValnCrcyRole Ledger Ledger
LegalCurrencyRole R_MatlLedgerValnCrcyRole LegalCurrencyRole
LegalCurrencyRoleName R_MatlLedgerValnCrcyRole LegalCurrencyRoleName
AccountingValuationSubview R_MatlLedgerValnCrcyRole AccountingValuationSubview
AccountingValuationSubviewName R_MatlLedgerValnCrcyRole AccountingValuationSubviewName
AcctgValnVwSubviewCombinedName R_MatlLedgerValnCrcyRole AcctgValnVwSubviewCombinedName
LedgerName R_MatlLedgerValnCrcyRole LedgerName Ledger Name
ControllingValuationType R_MatlLedgerValnCrcyRole AccountingValuationView
AccountingValuationViewName R_MatlLedgerValnCrcyRole AccountingValuationViewName
CostingVersion P_Matval_Manage_Cost_Sls_Ord CostingVersion
CostingVariant P_Matval_Manage_Cost_Sls_Ord CostingVariant
ValuationVariant P_Matval_Manage_Cost_Sls_Ord ValuationVariant
CostingType P_Matval_Manage_Cost_Sls_Ord CostingType
Material P_Matval_Manage_Cost_Sls_Ord Material Vehicle Model
ValuationArea P_Matval_Manage_Cost_Sls_Ord ValuationArea Valuation Area
CompanyCode P_Matval_Manage_Cost_Sls_Ord CompanyCode Receiver Company Code
ControllingArea _CompanyCode ControllingArea Controlling Area
PlannedPrice P_Matval_Manage_Cost_Sls_Ord PlannedPrice Inventory Price
FixedPortionOfPlannedPrice P_Matval_Manage_Cost_Sls_Ord FixedPortionOfPlannedPrice
Currency P_Matval_Manage_Cost_Sls_Ord Currency Valuation Crcy
MaterialPriceUnitQty P_Matval_Manage_Cost_Sls_Ord MaterialPriceUnitQty Price unit
BaseUnit P_Matval_Manage_Cost_Sls_Ord BaseUnit Unit of Measure
ValuationQuantityUnit P_Matval_Manage_Cost_Sls_Ord ValuationQuantityUnit
ItemIsSelectedForProcessing
SalesOrder P_Matval_Manage_Cost_Sls_Ord SalesOrder SD Document
SalesOrderItem P_Matval_Manage_Cost_Sls_Ord SalesOrderItem Sales Order Item
_ControllingArea _CompanyCode _ControllingArea
_CostingVariantText _CostingVariantText
_ControllingValuationTypeText _ControllingValuationTypeText
_ControllingAreaText _ControllingAreaText

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_MatlLdgrPrSalesOrderCostEst.
-- 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: CMVSOCOSTEST

CREATE VIEW C_MatlLdgrPrSalesOrderCostEst AS
SELECT
  ce.CostEstimate AS CostEstimate,
  ce.CostEstimateStatus AS CostEstimateStatus,
  lvcr.LedgerValuationCurrencyRole AS LedgerValuationCurrencyRole,
  lvcr.Ledger AS Ledger,
  lvcr.LegalCurrencyRole AS LegalCurrencyRole,
  lvcr.LegalCurrencyRoleName AS LegalCurrencyRoleName,
  lvcr.AccountingValuationSubview AS AccountingValuationSubview,
  lvcr.AccountingValuationSubviewName AS AccountingValuationSubviewName,
  lvcr.AcctgValnVwSubviewCombinedName AS AcctgValnVwSubviewCombinedName,
  lvcr.LedgerName AS LedgerName,
  lvcr.AccountingValuationView AS ControllingValuationType,
  lvcr.AccountingValuationViewName AS AccountingValuationViewName,
  ce.CostingVersion AS CostingVersion,
  ce.CostingVariant AS CostingVariant,
  ce.ValuationVariant AS ValuationVariant,
  ce.CostingType AS CostingType,
  ce.Material AS Material,
  ce.ValuationArea AS ValuationArea,
  ce.CompanyCode AS CompanyCode,
  _CompanyCode.ControllingArea AS ControllingArea,
  ce.PlannedPrice AS PlannedPrice,
  ce.FixedPortionOfPlannedPrice AS FixedPortionOfPlannedPrice,
  ce.Currency AS Currency,
  ce.MaterialPriceUnitQty AS MaterialPriceUnitQty,
  ce.BaseUnit AS BaseUnit,
  ce.ValuationQuantityUnit AS ValuationQuantityUnit,
  '' AS ItemIsSelectedForProcessing,
  ce.SalesOrder AS SalesOrder,
  ce.SalesOrderItem AS SalesOrderItem,
  _CompanyCode._ControllingArea AS _ControllingArea
FROM P_Matval_Manage_Cost_Sls_Ord AS ce
INNER JOIN R_MatlLedgerValnCrcyRole AS lvcr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ControllingArea AS _ControllingAreaText ON controllingarea = _ControllingAreaText.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_ControllingValuationTypeText AS _ControllingValuationTypeText ON ControllingValuationType = _ControllingValuationTypeText.ControllingValuationType  -- association [0..*]
LEFT OUTER JOIN I_CostingVariantText AS _CostingVariantText ON CostingVariant = _CostingVariantText.CostingVariant  -- association [0..*]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
;