C_PE_GLAcctHierarchyInCoCode

DDL: C_PE_GLACCTHIERARCHYINCOCODE SQL: CPEGLACCTHIER Type: view CONSUMPTION

Acc. Ctrl. for Jrnl Entry Item Cube View

C_PE_GLAcctHierarchyInCoCode is a Consumption CDS View that provides data about "Acc. Ctrl. for Jrnl Entry Item Cube View" in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_GLAccountInCompanyCode, I_GLAccountText) and exposes 11 fields with key fields CompanyCode, FinancialStatementHierarchy, ValidityEndDate, GLAccount0endendashrynodeasHierarchyNode, ParentNode.

Data Sources (3)

SourceAliasJoin Type
I_CompanyCode CompanyCode inner
I_GLAccountInCompanyCode GLAccountInCompanyCode left_outer
I_GLAccountText GLAccountText left_outer

Parameters (1)

NameTypeDefault
P_AlternativeGLAccount allgaltk

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CPEGLACCTHIER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Acc. Ctrl. for Jrnl Entry Item Cube View view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CompanyCode CompanyCode Receiver Company Code
KEY FinancialStatementHierarchy FinancialStatementStructure FinancialStatementHierarchy Hierarchy ID
KEY ValidityEndDate FinancialStatementStructure ValidityEndDate ValidTo
KEY GLAccount0endendashrynodeasHierarchyNode
KEY ParentNode FinancialStatementStructure ParentNode Parent Node
ChartOfAccounts FinancialStatementStructure ChartOfAccounts Node Class
GLAccount
AlternativeGLAccount
SequenceNumber FinancialStatementStructure HierarchyNodeSequence
HierarchyLevel FinancialStatementStructure HierarchyLevel Hierarchy Level
FinancialStatementNodeType FinancialStatementStructure FinancialStatementNodeType

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_PE_GLAcctHierarchyInCoCode.
-- 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: CPEGLACCTHIER
-- Parameters: P_AlternativeGLAccount : allgaltk

CREATE VIEW C_PE_GLAcctHierarchyInCoCode AS
SELECT
  CompanyCode.CompanyCode AS CompanyCode,
  FinancialStatementStructure.FinancialStatementHierarchy AS FinancialStatementHierarchy,
  FinancialStatementStructure.ValidityEndDate AS ValidityEndDate,
  cast( case when FinancialStatementStructure.FinancialStatementNodeType = 'I' or FinancialStatementStructure.FinancialStatementNodeType = 'F' then ltrim( FinancialStatementStructure.HierarchyNodeVal, '0' ) else case $parameters.P_AlternativeGLAccount when 'X' then case when GLAccountInCompanyCode.AlternativeGLAccount <> '' and GLAccountInCompanyCode.AlternativeGLAccount is not null then ltrim( GLAccountInCompanyCode.AlternativeGLAccount, '0' ) else ltrim( GLAccountInCompanyCode.GLAccount, '0') end else ltrim( GLAccountInCompanyCode.GLAccount, '0') end end as hrynode ) as HierarchyNode AS GLAccount0endendashrynodeasHierarchyNode,
  FinancialStatementStructure.ParentNode AS ParentNode,
  FinancialStatementStructure.ChartOfAccounts AS ChartOfAccounts,
  cast( '' as saknr ) AS GLAccount,
  cast( '' as fis_alternativeglaccount ) AS AlternativeGLAccount,
  FinancialStatementStructure.HierarchyNodeSequence AS SequenceNumber,
  FinancialStatementStructure.HierarchyLevel AS HierarchyLevel,
  FinancialStatementStructure.FinancialStatementNodeType AS FinancialStatementNodeType
INNER JOIN I_CompanyCode AS CompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_GLAccountInCompanyCode AS GLAccountInCompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_GLAccountText AS GLAccountText ON /* join condition not captured in parsed metadata */
;