P_RU_GLAcctBalance12
G/L Account Balance
P_RU_GLAcctBalance12 is a Consumption CDS View that provides data about "G/L Account Balance" in SAP S/4HANA. It reads from 5 data sources (I_FiscalCalendarDate, I_GLAccountLineItem, I_GLAccountLineItem, P_RU_GLAcctBalance13, P_RU_GLAcctBalance13) and exposes 107 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. Part of development package GLO_FIN_IS_RU_OFFSET_ACC.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_FiscalCalendarDate | FiscalYearPeriod | inner |
| I_GLAccountLineItem | GLAccountLineItem | from |
| I_GLAccountLineItem | GLAccountLineItem | union_all |
| P_RU_GLAcctBalance13 | P_RU_GLAcctBalance13 | left_outer |
| P_RU_GLAcctBalance13 | P_RU_GLAcctBalance13 | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_FromPostingDate | fis_budat_from | |
| P_ToPostingDate | fis_budat_to | |
| P_DisplayAltvAcct | firu_display_account |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRUGLACCTBAL12 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | G/L Account Balance | view |
Fields (107)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | I_GLAccountLineItem | SourceLedger | Source Ledger |
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_GLAccountLineItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | |||
| KEY | LedgerGLLineItem | |||
| KEY | Ledger | I_GLAccountLineItem | Ledger | Ledger |
| GLAccountExternalendasGLAccountExternal | ||||
| OffsettingItem | ||||
| OffsettingChartOfAccounts | ||||
| OffsettingAccount | ||||
| OffsettingAccountExternal | ||||
| ChartOfAccounts | I_GLAccountLineItem | ChartOfAccounts | Node Class | |
| CountryChartOfAccounts | I_GLAccountLineItem | CountryChartOfAccounts | Chart of Accts | |
| GLAccount | I_GLAccountLineItem | GLAccount | General Ledger | |
| AlternativeGLAccount | I_GLAccountLineItem | AlternativeGLAccount | Group Account | |
| DocumentDate | ||||
| DocumentItemText | ||||
| LogicalSystem | ||||
| AccountingDocumentCreationDate | ||||
| DocumentReferenceID | ||||
| AccountingDocumentHeaderText | ||||
| ControllingArea | ||||
| CostCenter | ||||
| ProfitCenter | ||||
| FunctionalArea | ||||
| BusinessArea | ||||
| Segment | ||||
| OrderID | ||||
| WBSElement | ||||
| WBSElementInternalID | ||||
| ContractNumber | ||||
| Product | ||||
| Plant | ||||
| Supplier | ||||
| Customer | ||||
| AccountingDocumentType | ||||
| DebitCreditCode | ||||
| PostingDate | ||||
| FiscalPeriod | ||||
| CompanyCodeCurrency | I_GLAccountLineItem | CompanyCodeCurrency | Local Currency | |
| DebitAmountInCoCodeCrcy | I_GLAccountLineItem | DebitAmountInCoCodeCrcy | Debit Amount in Company Code Currency | |
| CreditAmountInCoCodeCrcy | I_GLAccountLineItem | CreditAmountInCoCodeCrcy | Credit Amount in Company Code Currency | |
| TransactionCurrency | I_GLAccountLineItem | TransactionCurrency | Transaction Currency | |
| DebitAmountInTransCrcy | I_GLAccountLineItem | DebitAmountInTransCrcy | Debit Amt in DC | |
| CreditAmountInTransCrcy | I_GLAccountLineItem | CreditAmountInTransCrcy | Credit Amt in DC | |
| BaseUnit | I_GLAccountLineItem | BaseUnit | Unit of Measure | |
| Quantity | I_GLAccountLineItem | Quantity | Value | |
| _SourceLedger | I_GLAccountLineItem | _SourceLedger | ||
| _CompanyCode | I_GLAccountLineItem | _CompanyCode | ||
| _FiscalYear | I_GLAccountLineItem | _FiscalYear | ||
| _Ledger | I_GLAccountLineItem | _Ledger | ||
| PeriodFlag | ||||
| DisplayZeroTurnovers | ||||
| SourceLedger | Source Ledger | |||
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_GLAccountLineItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | |||
| KEY | LedgerGLLineItem | |||
| KEY | Ledger | I_GLAccountLineItem | Ledger | Ledger |
| GLAccountExternalendasGLAccountExternal | ||||
| OffsettingItem | ||||
| OffsettingChartOfAccounts | ||||
| OffsettingAccount | ||||
| OffsettingAccountExternal | ||||
| ChartOfAccounts | I_GLAccountLineItem | ChartOfAccounts | Node Class | |
| CountryChartOfAccounts | I_GLAccountLineItem | CountryChartOfAccounts | Chart of Accts | |
| GLAccount | I_GLAccountLineItem | GLAccount | General Ledger | |
| AlternativeGLAccount | I_GLAccountLineItem | AlternativeGLAccount | Group Account | |
| DocumentDate | ||||
| DocumentItemText | ||||
| LogicalSystem | ||||
| AccountingDocumentCreationDate | ||||
| DocumentReferenceID | ||||
| AccountingDocumentHeaderText | ||||
| ControllingArea | ||||
| CostCenter | ||||
| ProfitCenter | ||||
| FunctionalArea | ||||
| BusinessArea | ||||
| Segment | ||||
| OrderID | ||||
| WBSElement | ||||
| WBSElementInternalID | ||||
| ContractNumber | ||||
| Product | ||||
| Plant | ||||
| Supplier | ||||
| Customer | ||||
| AccountingDocumentType | ||||
| DebitCreditCode | ||||
| PostingDate | ||||
| FiscalPeriod | ||||
| CompanyCodeCurrency | I_GLAccountLineItem | CompanyCodeCurrency | Local Currency | |
| DebitAmountInCoCodeCrcy | I_GLAccountLineItem | DebitAmountInCoCodeCrcy | Debit Amount in Company Code Currency | |
| CreditAmountInCoCodeCrcy | I_GLAccountLineItem | CreditAmountInCoCodeCrcy | Credit Amount in Company Code Currency | |
| TransactionCurrency | I_GLAccountLineItem | TransactionCurrency | Transaction Currency | |
| DebitAmountInTransCrcy | I_GLAccountLineItem | DebitAmountInTransCrcy | Debit Amt in DC | |
| CreditAmountInTransCrcy | I_GLAccountLineItem | CreditAmountInTransCrcy | Credit Amt in DC | |
| BaseUnit | I_GLAccountLineItem | BaseUnit | Unit of Measure | |
| Quantity | I_GLAccountLineItem | Quantity | Value | |
| _SourceLedger | I_GLAccountLineItem | _SourceLedger | ||
| _CompanyCode | I_GLAccountLineItem | _CompanyCode | ||
| _FiscalYear | I_GLAccountLineItem | _FiscalYear | ||
| _Ledger | I_GLAccountLineItem | _Ledger | ||
| PeriodFlag | ||||
| DisplayZeroTurnovers | ||||
| EmptyValue |
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_RU_GLAcctBalance12.
-- 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: PRUGLACCTBAL12
-- Parameters: P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to, P_DisplayAltvAcct : firu_display_account
CREATE VIEW P_RU_GLAcctBalance12 AS
SELECT
GLAccountLineItem.SourceLedger AS SourceLedger,
GLAccountLineItem.CompanyCode AS CompanyCode,
GLAccountLineItem.FiscalYear AS FiscalYear,
cast('' as fis_belnr) AS AccountingDocument,
cast('' as fis_docln) AS LedgerGLLineItem,
GLAccountLineItem.Ledger AS Ledger,
case $parameters.P_DisplayAltvAcct when '' then GLAccountLineItem._GLAccountInChartOfAccounts.GLAccountExternal else GLAccountLineItem._AlternativeGLAccount.GLAccountExternal end as GLAccountExternal AS GLAccountExternalendasGLAccountExternal,
cast('' as fis_gkont) AS OffsettingItem,
cast('' as fis_ktopl) AS OffsettingChartOfAccounts,
cast('*' as fis_racct) AS OffsettingAccount,
cast('*' as fis_racct) AS OffsettingAccountExternal,
GLAccountLineItem.ChartOfAccounts AS ChartOfAccounts,
GLAccountLineItem.CountryChartOfAccounts AS CountryChartOfAccounts,
GLAccountLineItem.GLAccount AS GLAccount,
GLAccountLineItem.AlternativeGLAccount AS AlternativeGLAccount,
cast('00000000' as fis_bldat) AS DocumentDate,
cast('' as farp_sgtxt) AS DocumentItemText,
cast('' as awsys) AS LogicalSystem,
cast('00000000' as farp_cpudt) AS AccountingDocumentCreationDate,
cast('' as fis_xblnr1) AS DocumentReferenceID,
cast('' as bktxt) AS AccountingDocumentHeaderText,
cast('' as fis_kokrs) AS ControllingArea,
cast('' as fis_kostl) AS CostCenter,
cast('' as fis_prctr) AS ProfitCenter,
cast('' as fm_farea) AS FunctionalArea,
cast('' as fis_rbusa) AS BusinessArea,
cast('' as segment) AS Segment,
cast('' as fis_aufnr) AS OrderID,
cast('' as ps_posid) AS WBSElement,
cast('00000000' as ps_s4_pspnr) AS WBSElementInternalID,
cast('' as j_3rf_intcntnum) AS ContractNumber,
cast('' as productnumber) AS Product,
cast('' as werks_d) AS Plant,
cast('' as md_supplier) AS Supplier,
cast('' as kunnr) AS Customer,
cast('' as fis_blart) AS AccountingDocumentType,
cast('' as fis_shkzg) AS DebitCreditCode,
cast('00000000' as fis_budat) AS PostingDate,
cast('000' as fins_fiscalperiod) AS FiscalPeriod,
GLAccountLineItem.CompanyCodeCurrency AS CompanyCodeCurrency,
GLAccountLineItem.DebitAmountInCoCodeCrcy AS DebitAmountInCoCodeCrcy,
GLAccountLineItem.CreditAmountInCoCodeCrcy AS CreditAmountInCoCodeCrcy,
GLAccountLineItem.TransactionCurrency AS TransactionCurrency,
GLAccountLineItem.DebitAmountInTransCrcy AS DebitAmountInTransCrcy,
GLAccountLineItem.CreditAmountInTransCrcy AS CreditAmountInTransCrcy,
GLAccountLineItem.BaseUnit AS BaseUnit,
GLAccountLineItem.Quantity AS Quantity,
GLAccountLineItem._SourceLedger AS _SourceLedger,
GLAccountLineItem._CompanyCode AS _CompanyCode,
GLAccountLineItem._FiscalYear AS _FiscalYear,
GLAccountLineItem._Ledger AS _Ledger,
'P' AS PeriodFlag,
coalesce(GLAcctBalance13.DisplayZeroTurnovers,'X') AS DisplayZeroTurnovers,
'' AS EmptyValue
FROM I_GLAccountLineItem AS GLAccountLineItem
LEFT OUTER JOIN P_RU_GLAcctBalance13 ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalCalendarDate AS FiscalYearPeriod ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): I_GLAccountLineItem
;
Learn More
- 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
- S/4HANA CDS View Deprecation: What You Need to Know
- 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