C_BG_TrlBalGLAcctLineItemQ_2
Trial Balance main accounts - Qry
C_BG_TrlBalGLAcctLineItemQ_2 is a Consumption CDS View that provides data about "Trial Balance main accounts - Qry" in SAP S/4HANA. It reads from 1 data source (I_BG_TrlBalGLAcctLineItem) and exposes 47 fields with key fields CompanyCode, FiscalYear, SourceLedger, StatryRptCategory, StatryRptgEntity.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BG_TrlBalGLAcctLineItem | I_BG_TrlBalGLAcctLineItem | from |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_FromPostingDate | fis_budat_from | |
| P_ToPostingDate | fis_budat_to | |
| P_FromFiscalPeriod | fis_period_from | |
| P_ToFiscalPeriod | fis_period_to |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CBGTRLBLGLACCTQ2 | view | |
| Analytics.query | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | false | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Trial Balance main accounts - Qry | view |
Fields (47)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Company Code | |
| KEY | FiscalYear | FiscalYear | Fiscal Year | |
| KEY | SourceLedger | SourceLedger | Source Ledger | |
| KEY | StatryRptCategory | StatryRptCategory | Reporting Category | |
| KEY | StatryRptgEntity | StatryRptgEntity | Reporting Entity | |
| KEY | StatryRptRunID | StatryRptRunID | Reporting Run ID | |
| KEY | LedgerGLLineItem | LedgerGLLineItem | Ledger Line Item | |
| KEY | AccountingDocument | AccountingDocument | Accounting Document | |
| KEY | Ledger | Ledger | Ledger | |
| Currency | Currency | Valuation Crcy | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| TreasuryPositionIsNotZero | TreasuryPositionIsNotZero | Display only non-zero accounts | ||
| StartingBalanceAmtInCoCodeCrcy | StartingBalanceAmtInCoCodeCrcy | Starting Amount CC | ||
| DebitStartingBalAmtInCCCrcy | Debit Starting Amount CC | |||
| CreditStartingBalAmtInCCCrcy | Credit Starting Amount CC | |||
| GLAcctDebitAmtInCoCodeCrcy | Debit Turnover Amount CC | |||
| GLAcctCreditAmtInCoCodeCrcy | Credit Turnover Amount CC | |||
| DebitEndingBalAmtInCCCrcy | Ending Debit Amount CC | |||
| CreditEndingBalAmtInCCCrcy | Ending Credit Amount CC | |||
| DebitStartingBalAmtInTransCrcy | Debit Starting Amount DC | |||
| CrdtStartingBalAmtInTransCrcy | Credit Starting Amount DC | |||
| GLAcctDebitAmtInTransCrcy | Debit Turnover Amount DC | |||
| GLAcctCrdtAmtInTransCrcy | Credit Turnover Amount DC | |||
| DebitEndingBalAmtInTransCrcy | Debit Ending Amount DC | |||
| CreditEndingBalAmtInTransCrcy | Credit Ending Amount DC | |||
| DebitStartTotalAmtInCCCrcy | Debit Starting Amount Total CC | |||
| CreditStartTotalAmtInCCCrcy | Credit Starting Amount Total CC | |||
| DebitTotalAmountInCoCodeCrcy | Debit Turnover Amount Total CC | |||
| CreditTotalAmountInCoCodeCrcy | Credit Turnover Amount Total CC | |||
| DebitEndTotalAmtInCCCrcy | Debit Ending Amount Total CC | |||
| CreditEndTotalAmtInCCCrcy | Credit Ending Amount Total CC | |||
| DebitStartTotalAmtInTransCrcy | Debit Starting Amount Total DC | |||
| CreditStartTotalAmtInTransCrcy | Credit Starting Amount Total DC | |||
| TotalDebitAmountInTransCrcy | Debit Turnover Amount Total DC | |||
| TotalCreditAmountInTransCrcy | Credit Turnover Amount Total DC | |||
| DebitEndingTotalAmtInTransCrcy | Debit Ending Amount Total DC | |||
| CrdtEndingTotalAmtInTransCrcy | Credit Ending Amount Total DC | |||
| ComprnStartingBalInTransCrcy | ComprnStartingBalInTransCrcy | Starting Amount DC | ||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | Turnover Amount CC | ||
| AmountInTransactionCurrency | AmountInTransactionCurrency | Turnover Amount DC | ||
| EndingBalanceAmtInCoCodeCrcy | EndingBalanceAmtInCoCodeCrcy | Ending Amount CC | ||
| ComprnEndingBalInTransCrcy | ComprnEndingBalInTransCrcy | Ending Amount DC | ||
| GLAccount | GLAccount | GL Account | ||
| GLAccountLongName | GLAccountLongName | GL Account Description | ||
| BalanceTransactionCurrency | BalanceTransactionCurrency | Balance Transaction Currency | ||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag |
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_BG_TrlBalGLAcctLineItemQ_2.
-- 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: CBGTRLBLGLACCTQ2
-- Parameters: P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to, P_FromFiscalPeriod : fis_period_from, P_ToFiscalPeriod : fis_period_to
CREATE VIEW C_BG_TrlBalGLAcctLineItemQ_2 AS
SELECT
CompanyCode,
FiscalYear,
SourceLedger,
StatryRptCategory,
StatryRptgEntity,
StatryRptRunID,
LedgerGLLineItem,
AccountingDocument,
Ledger,
Currency,
CompanyCodeCurrency,
TreasuryPositionIsNotZero,
StartingBalanceAmtInCoCodeCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitStartingBalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditStartingBalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS GLAcctDebitAmtInCoCodeCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS GLAcctCreditAmtInCoCodeCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitEndingBalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditEndingBalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitStartingBalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CrdtStartingBalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS GLAcctDebitAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS GLAcctCrdtAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitEndingBalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditEndingBalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitStartTotalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditStartTotalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitTotalAmountInCoCodeCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditTotalAmountInCoCodeCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitEndTotalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditEndTotalAmtInCCCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitStartTotalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CreditStartTotalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS TotalDebitAmountInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS TotalCreditAmountInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS DebitEndingTotalAmtInTransCrcy,
cast( cast( 0 as abap.dec(23,2)) as fis_bal_hsl ) AS CrdtEndingTotalAmtInTransCrcy,
ComprnStartingBalInTransCrcy,
AmountInCompanyCodeCurrency,
AmountInTransactionCurrency,
EndingBalanceAmtInCoCodeCrcy,
ComprnEndingBalInTransCrcy,
GLAccount,
GLAccountLongName,
BalanceTransactionCurrency,
TransactionCurrency,
DebitCreditCode
FROM I_BG_TrlBalGLAcctLineItem
;
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