P_FinStmntHierarchyWithCoCode

DDL: P_FINSTMNTHIERARCHYWITHCOCODE SQL: PFSHIERINCCODE Type: view COMPOSITE

P_FinStmntHierarchyWithCoCode is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_CompanyCode, I_FinStmntExpandedHierNode, I_FinStmntExpandedHierNode, I_FinStmntExpandedHierNode, P_GLACCTWITHCOCODE) and exposes 71 fields with key fields FinancialStatementHierarchy, HierarchyVersion, HierarchyNode, ParentNode, ValidityEndDate. It has 4 associations to related views.

Data Sources (5)

SourceAliasJoin Type
I_CompanyCode _CompanyCode inner
I_FinStmntExpandedHierNode Hierarchy from
I_FinStmntExpandedHierNode Hierarchy union_all
I_FinStmntExpandedHierNode Hierarchy union_all
P_GLACCTWITHCOCODE P_GLACCTWITHCOCODE inner

Parameters (3)

NameTypeDefault
P_KeyDate fis_fsv_key_date
P_AlternativeGLAccountIsUsed char1
p_FinancialStatementHierarchy hryid

Associations (4)

CardinalityTargetAliasCondition
[0..*] I_FinancialStatementHierNodeT _Text $projection.FinancialStatementHierarchy = _Text.FinancialStatementHierarchy and $projection.HierarchyNode = _Text.HierarchyNode and $projection.ValidityEndDate = _Text.ValidityEndDate and $projection.FinancialStatementLeafItem = ''
[0..*] I_FinancialStatementHierNodeT _ParentText $projection.FinancialStatementHierarchy = _ParentText.FinancialStatementHierarchy and $projection.ParentNode = _ParentText.HierarchyNode and $projection.ValidityEndDate = _ParentText.ValidityEndDate
[0..1] I_FinancialStatementLeafItem _FinancialStatementLeafItem $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem
[0..1] I_FinancialStatementHier _Hierarchy $projection.FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate

Annotations (6)

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

Fields (71)

KeyFieldSource TableSource FieldDescription
KEY FinancialStatementHierarchy FinancialStatementHierarchy Hierarchy ID
KEY HierarchyVersion HierarchyVersion Version
KEY HierarchyNode HierarchyNode Node
KEY ParentNode ParentNode Parent Node
KEY ValidityEndDate ValidityEndDate ValidTo
KEY CompanyCode CompanyCode Receiver Company Code
KEY GLAccount fsvglacct GLAccountExternal G/L Acct External ID
ChartOfAccounts I_FinStmntExpandedHierNode ChartOfAccounts Node Class
CountryChartOfAccounts fsvglacct CountryChartOfAccounts Chart of Accts
AlternativeGLAccount fsvglacct AlternativeGLAccount Group Account
FunctionalArea Value
NodeType NodeType Object Type
FinStatementHierarchyNodeValue FinStatementHierarchyNodeValue Value
DebitCreditCode DebitCreditCode Single-Character Flag
FinancialStatementItem FinancialStatementItem FS Item
GLAccountInfo GLAccountInfo
FunctionalAreaIsUsed FunctionalAreaIsUsed
FinancialStatementLeafItem FinancialStatementLeafItem Node
SequenceNumber SequenceNumber Sort sequence
HierarchyLevel HierarchyLevel Hierarchy Level
SignIsInverted SignIsInverted
_Text _Text
_ParentText _ParentText
_FinancialStatementLeafItem _FinancialStatementLeafItem
KEY HierarchyVersion HierarchyVersion Version
KEY HierarchyNode HierarchyNode Node
KEY ParentNode ParentNode Parent Node
KEY ValidityEndDate ValidityEndDate ValidTo
KEY CompanyCode Receiver Company Code
KEY GLAccount G/L Acct External ID
ChartOfAccounts ChartOfAccounts Node Class
CountryChartOfAccounts Chart of Accts
AlternativeGLAccount Group Account
FunctionalArea Value
NodeType NodeType Object Type
FinStatementHierarchyNodeValue FinStatementHierarchyNodeValue Value
DebitCreditCode DebitCreditCode Single-Character Flag
FinancialStatementItem FinancialStatementItem FS Item
GLAccountInfo GLAccountInfo
FunctionalAreaIsUsed FunctionalAreaIsUsed
FinancialStatementLeafItem FinancialStatementLeafItem Node
SequenceNumber SequenceNumber Sort sequence
HierarchyLevel HierarchyLevel Hierarchy Level
SignIsInverted SignIsInverted
_Text _Text
_ParentText _ParentText
_FinancialStatementLeafItem _FinancialStatementLeafItem
KEY HierarchyVersion HierarchyVersion Version
KEY HierarchyNode HierarchyNode Node
KEY ParentNode ParentNode Parent Node
KEY ValidityEndDate ValidityEndDate ValidTo
KEY CompanyCode CompanyCode Receiver Company Code
KEY GLAccount G/L Acct External ID
ChartOfAccounts I_FinStmntExpandedHierNode ChartOfAccounts Node Class
CountryChartOfAccounts Chart of Accts
AlternativeGLAccount Group Account
FunctionalArea Value
NodeType NodeType Object Type
FinStatementHierarchyNodeValue FinStatementHierarchyNodeValue Value
DebitCreditCode DebitCreditCode Single-Character Flag
FinancialStatementItem FinancialStatementItem FS Item
GLAccountInfo GLAccountInfo
FunctionalAreaIsUsed FunctionalAreaIsUsed
FinancialStatementLeafItem FinancialStatementLeafItem Node
SequenceNumber SequenceNumber Sort sequence
HierarchyLevel HierarchyLevel Hierarchy Level
SignIsInverted SignIsInverted
_Text _Text
_ParentText _ParentText
_FinancialStatementLeafItem _FinancialStatementLeafItem
_Hierarchy _Hierarchy

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_FinStmntHierarchyWithCoCode.
-- 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: PFSHIERINCCODE
-- Parameters: P_KeyDate : fis_fsv_key_date, P_AlternativeGLAccountIsUsed : char1, p_FinancialStatementHierarchy : hryid

CREATE VIEW P_FinStmntHierarchyWithCoCode AS
SELECT
  FinancialStatementHierarchy,
  HierarchyVersion,
  HierarchyNode,
  ParentNode,
  ValidityEndDate,
  CompanyCode,
  fsvglacct.GLAccountExternal AS GLAccount,
  Hierarchy.ChartOfAccounts AS ChartOfAccounts,
  fsvglacct.CountryChartOfAccounts AS CountryChartOfAccounts,
  fsvglacct.AlternativeGLAccount AS AlternativeGLAccount,
  cast( '' as fkber ) AS FunctionalArea,
  NodeType,
  FinStatementHierarchyNodeValue,
  DebitCreditCode,
  FinancialStatementItem,
  GLAccountInfo,
  FunctionalAreaIsUsed,
  FinancialStatementLeafItem,
  SequenceNumber,
  HierarchyLevel,
  SignIsInverted
FROM I_FinStmntExpandedHierNode AS Hierarchy
INNER JOIN P_GLACCTWITHCOCODE ON /* join condition not captured in parsed metadata */
INNER JOIN I_CompanyCode AS _CompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_FinancialStatementHierNodeT AS _Text ON FinancialStatementHierarchy = _Text.FinancialStatementHierarchy AND HierarchyNode = _Text.HierarchyNode AND ValidityEndDate = _Text.ValidityEndDate AND FinancialStatementLeafItem = ''  -- association [0..*]
LEFT OUTER JOIN I_FinancialStatementHierNodeT AS _ParentText ON FinancialStatementHierarchy = _ParentText.FinancialStatementHierarchy AND ParentNode = _ParentText.HierarchyNode AND ValidityEndDate = _ParentText.ValidityEndDate  -- association [0..*]
LEFT OUTER JOIN I_FinancialStatementLeafItem AS _FinancialStatementLeafItem ON FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem  -- association [0..1]
LEFT OUTER JOIN I_FinancialStatementHier AS _Hierarchy ON FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy AND ValidityEndDate = _Hierarchy.ValidityEndDate  -- association [0..1]
-- UNION ALL with additional select branch(es): I_FinStmntExpandedHierNode
;