P_FinStmtLeafWithGLAcct

DDL: P_FINSTMTLEAFWITHGLACCT SQL: PFSLEAFGLACC Type: view BASIC

P_FinStmtLeafWithGLAcct is a Basic CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 22 fields with key fields HierarchyUniqueNodeID, UniqueParentID, versn, ktopl, saknr.

Data Sources (6)

SourceAliasJoin Type
I_FinancialStatementItem fsitem left_outer
I_FinancialStatementItem fsitem left_outer
I_GLAccountInChartOfAccounts GLAccount from
t011 t011 inner
fagl_011zc zc_leaf left_outer
P_FAGL_011ZC zc_range union_all

Annotations (7)

NameValueLevelField
VDM.private true view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName PFSLEAFGLACC view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.preserveKey true view

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY HierarchyUniqueNodeID
KEY UniqueParentID
KEY versn t011 versn Version
KEY ktopl I_GLAccountInChartOfAccounts ChartOfAccounts G/L Chart of Accounts
KEY saknr I_GLAccountInChartOfAccounts GLAccount General Ledger
type
Description
xsoll fagl_011zc xsoll Debit Balance
xhabn fagl_011zc xhabn Credit Balance
stufe
char50asHierarchyUniqueNodeID
KEY UniqueParentID
KEY versn P_FAGL_011ZC versn Version
KEY ergsl P_FAGL_011ZC ergsl FS Item
KEY ktopl P_FAGL_011ZC ktopl G/L Chart of Accounts
saknr General Ledger
type
Description
xsoll Debit Balance
xhabn Credit Balance
stufe
id I_FinancialStatementItem HierarchyNode Node

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_FinStmtLeafWithGLAcct.
-- 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: PFSLEAFGLACC

CREATE VIEW P_FinStmtLeafWithGLAcct AS
SELECT
  cast ( concat(concat(concat( fsitem.HierarchyNode,GLAccount.ChartOfAccounts),GLAccount.GLAccount),'=') as abap.char(50) ) AS HierarchyUniqueNodeID,
  cast (concat(concat( concat(concat( fsitem.HierarchyNode,zc_leaf.ktopl),zc_leaf.vonkt ),'-'),zc_leaf.biskt ) as abap.char(50) ) AS UniqueParentID,
  t011.versn AS versn,
  GLAccount.ChartOfAccounts AS ktopl,
  GLAccount.GLAccount AS saknr,
  cast ('L' as seu_type) AS type,
  cast ( '' as abap.char( 50 )) AS Description,
  zc_leaf.xsoll AS xsoll,
  zc_leaf.xhabn AS xhabn,
  cast (fsitem.FinStatementHierarchyLevelVal as abap.int4) + 2 AS stufe,
  fsitem.HierarchyNode as id AS char50asHierarchyUniqueNodeID,
  zc_range.ergsl AS ergsl,
  fsitem.HierarchyNode AS id
FROM I_GLAccountInChartOfAccounts AS GLAccount
INNER JOIN t011 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN fagl_011zc AS zc_leaf ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_FinancialStatementItem AS fsitem ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_FAGL_011ZC
;