Deprecated
This CDS view is deprecated in S/4HANA. Use C_CN_GLAcctBalanceSumQuery instead. View all deprecated CDS views →

C_GLAccountBalanceQuery

DDL: C_GLACCOUNTBALANCEQUERY SQL: CGLACCTBALQUERY Type: view CONSUMPTION

G/L Account Balance Query

C_GLAccountBalanceQuery is a Consumption CDS View that provides data about "G/L Account Balance Query" in SAP S/4HANA. It reads from 1 data source (I_GLAccountBalanceCube) and exposes 28 fields.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountBalanceCube I_GLAccountBalanceCube from

Parameters (9)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FiscalYear fis_gjahr
P_Ledger fis_rldnr
P_CurrencyRole fac_crcyrole
P_DisplayAltvAcct figlcn_disalteracct
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to
P_FiscalPeriod fins_fiscalperiod
P_DspTimeDependentDesc figlcn_distddesc

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CGLACCTBALQUERY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label G/L Account Balance Query view
VDM.viewType #CONSUMPTION view
Analytics.query true view
OData.publish true view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor C_CN_GLAcctBalanceSumQuery view

Fields (28)

KeyFieldSource TableSource FieldDescription
CompanyCode CompanyCode Receiver Company Code
FiscalYear FiscalYear G/L Fiscal Year
Ledger Ledger Ledger
FiscalPeriod FiscalPeriod Tax period
GLAccount GLAccount General Ledger
GLAcctLineDescription GLAcctLineDescription
ProfitCenter ProfitCenter Profit Center
ProfitCenterGroup ProfitCenterGroup
BusinessArea BusinessArea Business Area
FunctionalArea FunctionalArea Sendr Fctl Area
Segment Segment Segment number
AlternativeGLAccount AlternativeGLAccount Group Account
GLAccountInfo GLAccountInfo
GLAccountHierarchy GLAccountHierarchy
DisplayCurrency DisplayCurrency Display Currency
GLAccountGroup GLAccountGroup Account Group
AccountIsMarkedForDeletion AccountIsMarkedForDeletion Deletion Flag
GLAccountTransactionType GLAccountTransactionType
StartingBalAmtInDspCrcy Beginning Balance
DebitAmountInDisplayCrcy Current Debit
CreditAmountInDisplayCrcy Current Credit
PeriodBalAmtInDspCrcy Current Balance with sign
AmountInDisplayCurrency Current Balance
CreditDebitDirection Direction
EndingBalAmtInDspCrcy Ending Balance
IntmdEndingBalAmtInDisplayCrcy EndingBalAmtInDspCrcy Dont look at this column
GLAcctDebitAmountInDisplayCrcy DebitAmountInDisplayCrcy Dont look at this column
GLAcctCreditAmtInDisplayCrcy CreditAmountInDisplayCrcy Dont look at this column

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_GLAccountBalanceQuery.
-- 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: CGLACCTBALQUERY
-- Parameters: P_CompanyCode : fis_bukrs, P_FiscalYear : fis_gjahr, P_Ledger : fis_rldnr, P_CurrencyRole : fac_crcyrole, P_DisplayAltvAcct : figlcn_disalteracct, P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to, P_FiscalPeriod : fins_fiscalperiod, P_DspTimeDependentDesc : figlcn_distddesc

CREATE VIEW C_GLAccountBalanceQuery AS
SELECT
  CompanyCode,
  FiscalYear,
  Ledger,
  FiscalPeriod,
  GLAccount,
  GLAcctLineDescription,
  ProfitCenter,
  ProfitCenterGroup,
  BusinessArea,
  FunctionalArea,
  Segment,
  AlternativeGLAccount,
  GLAccountInfo,
  GLAccountHierarchy,
  DisplayCurrency,
  GLAccountGroup,
  AccountIsMarkedForDeletion,
  GLAccountTransactionType,
  cast( cast( 0 as abap.dec(23,2)) as fis_start_bal_hsl_ui ) AS StartingBalAmtInDspCrcy,
  cast( cast( 0 as abap.dec(23,2)) as fis_dr_bal_hsl ) AS DebitAmountInDisplayCrcy,
  cast( cast( 0 as abap.dec(23,2)) as fis_cr_bal_hsl ) AS CreditAmountInDisplayCrcy,
  cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS PeriodBalAmtInDspCrcy,
  cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS AmountInDisplayCurrency,
  cast( '0' as figlcn_drcr_direction ) AS CreditDebitDirection,
  cast( cast( 0 as abap.dec(23,2)) as fis_end_bal_hsl_ui ) AS EndingBalAmtInDspCrcy,
  EndingBalAmtInDspCrcy AS IntmdEndingBalAmtInDisplayCrcy,
  DebitAmountInDisplayCrcy AS GLAcctDebitAmountInDisplayCrcy,
  CreditAmountInDisplayCrcy AS GLAcctCreditAmtInDisplayCrcy
FROM I_GLAccountBalanceCube
;