P_FSTMT_ACDOC_HIER

DDL: P_FSTMT_ACDOC_HIER SQL: PFSTMTLEAF Type: view CONSUMPTION

P_FSTMT_ACDOC_HIER is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (P_FSTMT_ACDOC_TOT_INC) and exposes 36 fields with key fields rldnr, rbukrs, racct, AgingIncrement, rwcur.

Data Sources (1)

SourceAliasJoin Type
P_FSTMT_ACDOC_TOT_INC P_FSTMT_ACDOC_TOT_INC from

Parameters (3)

NameTypeDefault
p_keydate_acdoc abap.dats
p_keydate_fsv abap.dats
p_Hierarchy hryid

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PFSTMTLEAF view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (36)

KeyFieldSource TableSource FieldDescription
KEY rldnr acd rldnr Ledger (Compat.)
KEY rbukrs acd rbukrs Company Code
KEY racct acd racct GL Account From
KEY AgingIncrement skb AgingIncrement
KEY rwcur acd rwcur Transaction Currency
inc_index acd incrmt_index
gjahr acd gjahr Settlement Year
FiscalYearPeriod acd FiscalYearPeriod Period/Year
FSVAccount skb FSVAccount
CountryCOA skb CountryCOA
AlternativeGLAccount skb AlternativeGLAccount Group Account
CorporateCOA skb CorporateCOA
CorporateGroupAccount skb CorporateGroupAccount Group Account Number
hier_CoA skb hier_CoA
hsl
ksl
osl
vsl
bsl
csl
dsl
esl
fsl
gsl
Segment acd Segment Segment number
prctr acd prctr Profit Centers
FSVAccountasNode
ParentNode
NodeValue
NodeLevel
plumi skb plumi Plus/minus
GeneralLedgerAgingIncrement acd GeneralLedgerAgingIncrement Increment
hbkid acd hbkid House Bank
hktid acd hktid House Bank Account
funcarea acd funcarea Functional Area
rrcty acd rrcty Record Type

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_FSTMT_ACDOC_HIER.
-- 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: PFSTMTLEAF
-- Parameters: p_keydate_acdoc : abap.dats, p_keydate_fsv : abap.dats, p_Hierarchy : hryid

CREATE VIEW P_FSTMT_ACDOC_HIER AS
SELECT
  acd.rldnr AS rldnr,
  acd.rbukrs AS rbukrs,
  acd.racct AS racct,
  skb.AgingIncrement AS AgingIncrement,
  acd.rwcur AS rwcur,
  acd.incrmt_index AS inc_index,
  acd.gjahr AS gjahr,
  acd.FiscalYearPeriod AS FiscalYearPeriod,
  skb.FSVAccount AS FSVAccount,
  skb.CountryCOA AS CountryCOA,
  skb.AlternativeGLAccount AS AlternativeGLAccount,
  skb.CorporateCOA AS CorporateCOA,
  skb.CorporateGroupAccount AS CorporateGroupAccount,
  skb.hier_CoA AS hier_CoA,
  sum(acd.hsl) AS hsl,
  sum(acd.ksl) AS ksl,
  sum(acd.osl) AS osl,
  sum(acd.vsl) AS vsl,
  sum(acd.bsl) AS bsl,
  sum(acd.csl) AS csl,
  sum(acd.dsl) AS dsl,
  sum(acd.esl) AS esl,
  sum(acd.fsl) AS fsl,
  sum(acd.gsl) AS gsl,
  acd.Segment AS Segment,
  acd.prctr AS prctr,
  coalesce( coalesce( funcarea.node, skb.Node ) , concat( '1' , skb.FSVAccount ) )as Node AS FSVAccountasNode,
  coalesce( coalesce( funcarea.ParentNode, skb.ParentNode) , 'NOASSGNMNT' ) AS ParentNode,
  coalesce( coalesce( funcarea.NodeValue, skb.NodeValue ) , skb.FSVAccount ) AS NodeValue,
  coalesce( funcarea.NodeLevel, skb.NodeLevel ) AS NodeLevel,
  skb.plumi AS plumi,
  acd.GeneralLedgerAgingIncrement AS GeneralLedgerAgingIncrement,
  acd.hbkid AS hbkid,
  acd.hktid AS hktid,
  acd.funcarea AS funcarea,
  acd.rrcty AS rrcty
FROM P_FSTMT_ACDOC_TOT_INC
;