P_FinStatementAccBalbyPeriod

DDL: P_FINSTATEMENTACCBALBYPERIOD Type: view_entity COMPOSITE

P_FinStatementAccBalbyPeriod is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (P_GLAcctBalbyPeriod02, P_GLAcctBalbyPeriod02, P_GLAcctBalbyPeriod02) and exposes 159 fields with key fields Ledger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 17 associations to related views.

Data Sources (3)

SourceAliasJoin Type
P_GLAcctBalbyPeriod02 P_GLAcctBalbyPeriod02 from
P_GLAcctBalbyPeriod02 P_GLAcctBalbyPeriod02 union_all
P_GLAcctBalbyPeriod02 P_GLAcctBalbyPeriod02 union_all

Parameters (12)

NameTypeDefault
P_Ledger fis_rldnr
P_FiscalYear fins_gjahr
P_StartFiscalPeriod fins_fiscalperiod
P_EndFiscalPeriod fins_fiscalperiod
P_ComprnFiscalYear fins_gjahr
P_ComprnStartFiscalPeriod fins_fiscalperiod
P_ComprnEndFiscalPeriod fins_fiscalperiod
P_ComprnFiscalYear2 fins_gjahr
P_ComprnStartFiscalPeriod2 fins_fiscalperiod
P_ComprnEndFiscalPeriod2 fins_fiscalperiod
P_CurrencyRole fis_curtp
P_AlternativeGLAccountIsUsed char1

Associations (17)

CardinalityTargetAliasCondition
[0..1] I_FinancialStatementLeafItem _FinancialStatementLeafItem $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem
[1..1] I_Ledger _Ledger $projection.Ledger = _Ledger.Ledger
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_FiscalYearForCompanyCode _FiscalYear $projection.FiscalYear = _FiscalYear.FiscalYear and $projection.CompanyCode = _FiscalYear.CompanyCode
[0..1] I_FiscalYearForCompanyCode _LedgerFiscalYear $projection.LedgerFiscalYear = _LedgerFiscalYear.FiscalYear and $projection.CompanyCode = _LedgerFiscalYear.CompanyCode
[0..1] I_ChartOfAccounts _ChartOfAccounts $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts
[0..1] I_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts and $projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount
[0..1] I_AccountingDocumentType _AccountingDocumentType $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
[0..1] I_GLAccountInCompanyCode _GLAccountInCompanyCode $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and $projection.GLAccount = _GLAccountInCompanyCode.GLAccount
[0..1] I_GLAccountInChartOfAccounts _GLAccountExternal $projection.ChartOfAccounts = _GLAccountExternal.ChartOfAccounts and $projection.GLAccountExternal = _GLAccountExternal.GLAccount
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..1] I_Segment _Segment $projection.Segment = _Segment.Segment
[0..*] I_ProfitCenter _ProfitCenter $projection.ControllingArea = _ProfitCenter.ControllingArea and $projection.ProfitCenter = _ProfitCenter.ProfitCenter
[0..1] I_FinancialTransactionType _FinancialTransactionType $projection.FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType
[0..*] I_CostCenter _CostCenter $projection.ControllingArea = _CostCenter.ControllingArea and $projection.CostCenter = _CostCenter.CostCenter
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..1] I_FunctionalArea _FunctionalArea $projection.FunctionalArea = _FunctionalArea.FunctionalArea

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (159)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
FinancialStatementLeafItem
LedgerFiscalYear LedgerFiscalYear
ChartOfAccounts ChartOfAccounts Node Class
AccountingDocumentType AccountingDocumentType Journal Entry Type
GLAccount GLAccount General Ledger
CountryChartOfAccounts CountryChartOfAccounts Chart of Accts
AlternativeGLAccount AlternativeGLAccount Group Account
ControllingArea ControllingArea Controlling Area
CostCenter CostCenter Cost Center
ProfitCenter ProfitCenter Profit Center
FinancialTransactionType FinancialTransactionType Transact. Type
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
Segment Segment Segment number
DebitCreditCode DebitCreditCode Single-Character Flag
PostingDate PostingDate Posting Date for GR
FiscalPeriod FiscalPeriod Tax period
PartnerCompany PartnerCompany Trading Partner
WBSElement WBSElement WBS Internal ID
GLAccountType GLAccountType G/L Account Type
ReportingPeriod
PeriodFlag PeriodFlag
Currency Currency Valuation Crcy
DebitPeriodBalAmtInDspCrcy DebitPeriodBalAmtInDspCrcy
CreditPeriodBalAmtInDspCrcy CreditPeriodBalAmtInDspCrcy
PeriodBalAmtInDspCrcy
YearOpeningBalAmtInDspCrcy
OpeningPeriodBalAmtInDspCrcy
EndingPeriodBalAmtInDspCrcy
_FinancialStatementLeafItem _FinancialStatementLeafItem
_Ledger _Ledger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_LedgerFiscalYear _LedgerFiscalYear
_ChartOfAccounts _ChartOfAccounts
_AccountingDocumentType _AccountingDocumentType
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_GLAccountInCompanyCode _GLAccountInCompanyCode
_GLAccountExternal _GLAccountExternal
_ControllingArea _ControllingArea
_Segment _Segment
_ProfitCenter _ProfitCenter
_FinancialTransactionType _FinancialTransactionType
_CostCenter _CostCenter
_BusinessArea _BusinessArea
P_Ledger
P_ComprnFiscalYear
P_ComprnStartFiscalPeriod
P_ComprnEndFiscalPeriod
FunctionalAreakeyLedger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
FinancialStatementLeafItem
LedgerFiscalYear LedgerFiscalYear
ChartOfAccounts ChartOfAccounts Node Class
AccountingDocumentType AccountingDocumentType Journal Entry Type
GLAccount GLAccount General Ledger
CountryChartOfAccounts CountryChartOfAccounts Chart of Accts
AlternativeGLAccount AlternativeGLAccount Group Account
ControllingArea ControllingArea Controlling Area
CostCenter CostCenter Cost Center
ProfitCenter ProfitCenter Profit Center
FinancialTransactionType FinancialTransactionType Transact. Type
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
Segment Segment Segment number
DebitCreditCode DebitCreditCode Single-Character Flag
PostingDate PostingDate Posting Date for GR
FiscalPeriod FiscalPeriod Tax period
PartnerCompany PartnerCompany Trading Partner
WBSElement WBSElement WBS Internal ID
GLAccountType GLAccountType G/L Account Type
ReportingPeriod
PeriodFlag PeriodFlag
Currency Currency Valuation Crcy
DebitPeriodBalAmtInDspCrcy DebitPeriodBalAmtInDspCrcy
CreditPeriodBalAmtInDspCrcy CreditPeriodBalAmtInDspCrcy
PeriodBalAmtInDspCrcy
YearOpeningBalAmtInDspCrcy
OpeningPeriodBalAmtInDspCrcy
EndingPeriodBalAmtInDspCrcy
_FinancialStatementLeafItem _FinancialStatementLeafItem
_Ledger _Ledger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_LedgerFiscalYear _LedgerFiscalYear
_ChartOfAccounts _ChartOfAccounts
_AccountingDocumentType _AccountingDocumentType
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_GLAccountInCompanyCode _GLAccountInCompanyCode
_GLAccountExternal _GLAccountExternal
_ControllingArea _ControllingArea
_Segment _Segment
_ProfitCenter _ProfitCenter
_FinancialTransactionType _FinancialTransactionType
_CostCenter _CostCenter
_BusinessArea _BusinessArea
P_Ledger
P_ComprnFiscalYear2
P_ComprnStartFiscalPeriod2
P_ComprnEndFiscalPeriod2
FunctionalAreakeyLedger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
FinancialStatementLeafItem
LedgerFiscalYear LedgerFiscalYear
ChartOfAccounts ChartOfAccounts Node Class
AccountingDocumentType AccountingDocumentType Journal Entry Type
GLAccount GLAccount General Ledger
CountryChartOfAccounts CountryChartOfAccounts Chart of Accts
AlternativeGLAccount AlternativeGLAccount Group Account
ControllingArea ControllingArea Controlling Area
CostCenter CostCenter Cost Center
ProfitCenter ProfitCenter Profit Center
FinancialTransactionType FinancialTransactionType Transact. Type
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
Segment Segment Segment number
DebitCreditCode DebitCreditCode Single-Character Flag
PostingDate PostingDate Posting Date for GR
FiscalPeriod FiscalPeriod Tax period
PartnerCompany PartnerCompany Trading Partner
WBSElement WBSElement WBS Internal ID
GLAccountType GLAccountType G/L Account Type
ReportingPeriod
PeriodFlag PeriodFlag
Currency Currency Valuation Crcy
DebitPeriodBalAmtInDspCrcy DebitPeriodBalAmtInDspCrcy
CreditPeriodBalAmtInDspCrcy CreditPeriodBalAmtInDspCrcy
PeriodBalAmtInDspCrcy
YearOpeningBalAmtInDspCrcy
OpeningPeriodBalAmtInDspCrcy
EndingPeriodBalAmtInDspCrcy
_FinancialStatementLeafItem _FinancialStatementLeafItem
_Ledger _Ledger
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_LedgerFiscalYear _LedgerFiscalYear
_ChartOfAccounts _ChartOfAccounts
_AccountingDocumentType _AccountingDocumentType
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_GLAccountInCompanyCode _GLAccountInCompanyCode
_GLAccountExternal _GLAccountExternal
_ControllingArea _ControllingArea
_Segment _Segment
_ProfitCenter _ProfitCenter
_FinancialTransactionType _FinancialTransactionType
_CostCenter _CostCenter
_BusinessArea _BusinessArea
_FunctionalArea _FunctionalArea

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_FinStatementAccBalbyPeriod.
-- 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.
-- Parameters: P_Ledger : fis_rldnr, P_FiscalYear : fins_gjahr, P_StartFiscalPeriod : fins_fiscalperiod, P_EndFiscalPeriod : fins_fiscalperiod, P_ComprnFiscalYear : fins_gjahr, P_ComprnStartFiscalPeriod : fins_fiscalperiod, P_ComprnEndFiscalPeriod : fins_fiscalperiod, P_ComprnFiscalYear2 : fins_gjahr, P_ComprnStartFiscalPeriod2 : fins_fiscalperiod, P_ComprnEndFiscalPeriod2 : fins_fiscalperiod, P_CurrencyRole : fis_curtp, P_AlternativeGLAccountIsUsed : char1

CREATE VIEW P_FinStatementAccBalbyPeriod AS
SELECT
  Ledger,
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  '' AS FinancialStatementLeafItem,
  LedgerFiscalYear,
  ChartOfAccounts,
  AccountingDocumentType,
  GLAccount,
  CountryChartOfAccounts,
  AlternativeGLAccount,
  ControllingArea,
  CostCenter,
  ProfitCenter,
  FinancialTransactionType,
  FunctionalArea,
  BusinessArea,
  Segment,
  DebitCreditCode,
  PostingDate,
  FiscalPeriod,
  PartnerCompany,
  WBSElement,
  GLAccountType,
  '0' AS ReportingPeriod,
  PeriodFlag,
  Currency,
  DebitPeriodBalAmtInDspCrcy,
  CreditPeriodBalAmtInDspCrcy,
  (DebitPeriodBalAmtInDspCrcy + CreditPeriodBalAmtInDspCrcy) AS PeriodBalAmtInDspCrcy,
  (DebitYearOpenBalAmtInDspCrcy + CreditYearOpenBalAmtInDspCrcy) AS YearOpeningBalAmtInDspCrcy,
  (DebitOpenPerdBalAmtInDspCrcy + CreditOpenPerdBalAmtInDspCrcy) AS OpeningPeriodBalAmtInDspCrcy,
  (DebitEndPerdBalAmtInDspCrcy + CreditEndPerdBalAmtInDspCrcy) AS EndingPeriodBalAmtInDspCrcy,
  P_FiscalYear :$parameters.P_ComprnFiscalYear AS P_ComprnFiscalYear,
  P_StartFiscalPeriod :$parameters.P_ComprnStartFiscalPeriod AS P_ComprnStartFiscalPeriod,
  P_EndFiscalPeriod :$parameters.P_ComprnEndFiscalPeriod AS P_ComprnEndFiscalPeriod,
  P_FiscalYear :$parameters.P_ComprnFiscalYear2 AS P_ComprnFiscalYear2,
  P_StartFiscalPeriod :$parameters.P_ComprnStartFiscalPeriod2 AS P_ComprnStartFiscalPeriod2,
  P_EndFiscalPeriod :$parameters.P_ComprnEndFiscalPeriod2 AS P_ComprnEndFiscalPeriod2
FROM P_GLAcctBalbyPeriod02
LEFT OUTER JOIN I_FinancialStatementLeafItem AS _FinancialStatementLeafItem ON FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem  -- association [0..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _FiscalYear ON FiscalYear = _FiscalYear.FiscalYear AND CompanyCode = _FiscalYear.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _LedgerFiscalYear ON LedgerFiscalYear = _LedgerFiscalYear.FiscalYear AND CompanyCode = _LedgerFiscalYear.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_ChartOfAccounts AS _ChartOfAccounts ON ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts  -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts ON ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts AND GLAccount = _GLAccountInChartOfAccounts.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocumentType ON AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType  -- association [0..1]
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON CompanyCode = _GLAccountInCompanyCode.CompanyCode AND GLAccount = _GLAccountInCompanyCode.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountExternal ON ChartOfAccounts = _GLAccountExternal.ChartOfAccounts AND GLAccountExternal = _GLAccountExternal.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_Segment AS _Segment ON Segment = _Segment.Segment  -- association [0..1]
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON ControllingArea = _ProfitCenter.ControllingArea AND ProfitCenter = _ProfitCenter.ProfitCenter  -- association [0..*]
LEFT OUTER JOIN I_FinancialTransactionType AS _FinancialTransactionType ON FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType  -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON ControllingArea = _CostCenter.ControllingArea AND CostCenter = _CostCenter.CostCenter  -- association [0..*]
LEFT OUTER JOIN I_BusinessArea AS _BusinessArea ON BusinessArea = _BusinessArea.BusinessArea  -- association [0..1]
LEFT OUTER JOIN I_FunctionalArea AS _FunctionalArea ON FunctionalArea = _FunctionalArea.FunctionalArea  -- association [0..1]
-- UNION ALL with additional select branch(es): P_GLAcctBalbyPeriod02
;