P_CostElementByCompanyCode

DDL: P_COSTELEMENTBYCOMPANYCODE SQL: PCSTELEMBYCOCODE Type: view COMPOSITE

P_CostElementByCompanyCode is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CostElement) and exposes 4 fields with key fields CompanyCode, CostElement, ControllingArea. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_CostElement I_CostElement from

Associations (1)

CardinalityTargetAliasCondition
[1..*] I_GLAccountInCompanyCode _GLAccountInCompanyCode _GLAccountInCompanyCode.GLAccount = $projection.CostElement

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PCSTELEMBYCOCODE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode _GLAccountInCompanyCode CompanyCode Receiver Company Code
KEY CostElement CostElement G/L Account
KEY ControllingArea ControllingArea Controlling Area
_GLAccountInCompanyCode _GLAccountInCompanyCode

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_CostElementByCompanyCode.
-- 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: PCSTELEMBYCOCODE

CREATE VIEW P_CostElementByCompanyCode AS
SELECT
  _GLAccountInCompanyCode.CompanyCode AS CompanyCode,
  CostElement,
  ControllingArea
FROM I_CostElement
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON _GLAccountInCompanyCode.GLAccount = CostElement  -- association [1..*]
;