C_GLAccountBalanceQuery
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)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountBalanceCube | I_GLAccountBalanceCube | from |
Parameters (9)
| Name | Type | Default |
|---|---|---|
| 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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA