P_CN_GLAcctBalances

DDL: P_CN_GLACCTBALANCES SQL: PVCNGLABAL Type: view CONSUMPTION Package: GLO_FIN_CN

G/L Account Items with Descriptions

P_CN_GLAcctBalances is a Consumption CDS View that provides data about "G/L Account Items with Descriptions" in SAP S/4HANA. It reads from 3 data sources (P_CN_GLAcctDesc, P_CN_GLAcctItems, P_CN_GLAcctItemsDay) and exposes 152 fields with key fields CompanyCode, FiscalYear, Ledger, AccountingDocument, LedgerGLLineItem. Part of development package GLO_FIN_CN.

Data Sources (3)

SourceAliasJoin Type
P_CN_GLAcctDesc P_CN_GLAcctDesc union
P_CN_GLAcctItems P_CN_GLAcctItems from
P_CN_GLAcctItemsDay P_CN_GLAcctItemsDay union

Parameters (5)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FiscalYear fis_gjahr
P_Ledger fis_rldnr
P_CurrencyRole fac_crcyrole
P_DisplayAltvAcct figlcn_disalteracct

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PVCNGLABAL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #CONSUMPTION view
EndUserText.label G/L Account Items with Descriptions view

Fields (152)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY Ledger Ledger Ledger
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
KEY GLAcctLineDescription
LedgerFiscalYear LedgerFiscalYear G/L Fiscal Year
FiscalPeriod FiscalPeriod Tax period
GLAccountInfo
AlternativeGLAccount AlternativeGLAccount Group Account
GLAccount GLAccount General Ledger
ProfitCenter ProfitCenter Profit Center
BusinessArea BusinessArea Business Area
Segment Segment Segment number
PostingDate PostingDate Posting Date for GR
AmountInDisplayCurrency AmountInDisplayCurrency
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
DebitAmountInTransCrcy DebitAmountInTransCrcy Debit Amt in DC
CreditAmountInTransCrcy CreditAmountInTransCrcy Credit Amt in DC
DebitAmountInDisplayCrcy DebitAmountInDisplayCrcy
CreditAmountInDisplayCrcy CreditAmountInDisplayCrcy
AccountingDocCreatedByUser AccountingDocCreatedByUser User which created overhead document
ValueDate ValueDate Value Date
TransactionCurrency TransactionCurrency Transaction Currency
DisplayCurrency DisplayCurrency Display Currency
AssignmentReference AssignmentReference Assignment Reference
ControllingArea ControllingArea Controlling Area
FunctionalArea FunctionalArea Sendr Fctl Area
CostCenter CostCenter Cost Center
DocumentDate DocumentDate Journal Entry Date
AccountingDocumentType AccountingDocumentType Journal Entry Type
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
DocumentReferenceID DocumentReferenceID Reference
ExchangeRate ExchangeRate Exchange rate
SalesOrder SalesOrder SD Document
GLAcctBalDateSortSqnc
GLAcctBalPerdSortSqnc
DocumentHeaderText DocumentHeaderText Doc.Header Text
ChartOfAccounts ChartOfAccounts Node Class
GLAccountGroup GLAccountGroup Account Group
AccountIsMarkedForDeletion AccountIsMarkedForDeletion Deletion Flag
AuthorizationGroup AuthorizationGroup AuthorizGroup
GLAccountPeriod
CN_GLAccountPostingDateString
DocumentItemText DocumentItemText Text
AlternativeReferenceDocument Alternative Reference Document
TaxCode TaxCode Tax Code
Customer Customer Sold-to Party
P_CompanyCode
P_FiscalYear
P_Ledger
P_CurrencyRole
P_DisplayAltvAcctkeyCompanyCode
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY Ledger Ledger Ledger
KEY AccountingDocument Journal Entry
KEY LedgerGLLineItem Journal Entry Item
KEY GLAcctLineDescription
LedgerFiscalYear G/L Fiscal Year
FiscalPeriod FiscalPeriod Tax period
GLAccountInfo GLAccountInfo
AlternativeGLAccount Group Account
GLAccount General Ledger
ProfitCenter Profit Center
BusinessArea Business Area
Segment Segment number
PostingDate PostingDate Posting Date for GR
AmountInDisplayCurrency
AmountInTransactionCurrency Pt Crcy Amt
DebitAmountInTransCrcy Debit Amt in DC
CreditAmountInTransCrcy Credit Amt in DC
DebitAmountInDisplayCrcy
CreditAmountInDisplayCrcy
AccountingDocCreatedByUser User which created overhead document
ValueDate Value Date
TransactionCurrency Transaction Currency
DisplayCurrency Display Currency
AssignmentReference Assignment Reference
ControllingArea Controlling Area
FunctionalArea Sendr Fctl Area
Costcenter
Documentdate
AccountingDocumentType Journal Entry Type
AccountingDocumentCategory Journal Entry Category
DocumentReferenceID Reference
ExchangeRate Exchange rate
SalesOrder SD Document
GLAcctBalDateSortSqnc
GLAcctBalPerdSortSqnc
DocumentHeaderText Doc.Header Text
ChartOfAccounts ChartOfAccounts Node Class
GLAccountGroup Account Group
AccountIsMarkedForDeletion Deletion Flag
AuthorizationGroup AuthorizationGroup AuthorizGroup
GLAccountPeriod
CN_GLAccountPostingDateString
DocumentItemText Text
AlternativeReferenceDocument Alternative Reference Document
TaxCode Tax Code
Customer Sold-to Party
P_CompanyCode
P_FiscalYear
P_Ledger
P_DisplayAltvAcctkeyCompanyCode
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY Ledger Ledger Ledger
KEY AccountingDocument Journal Entry
KEY LedgerGLLineItem Journal Entry Item
KEY GLAcctLineDescription GLAcctLineDescription
LedgerFiscalYear G/L Fiscal Year
FiscalPeriod FiscalPeriod Tax period
GLAccountInfo GLAccountInfo
AlternativeGLAccount Group Account
GLAccount General Ledger
ProfitCenter Profit Center
BusinessArea Business Area
Segment Segment number
PostingDate Posting Date for GR
AmountInDisplayCurrency
AmountInTransactionCurrency Pt Crcy Amt
DebitAmountInTransCrcy Debit Amt in DC
CreditAmountInTransCrcy Credit Amt in DC
DebitAmountInDisplayCrcy
CreditAmountInDisplayCrcy
AccountingDocCreatedByUser User which created overhead document
ValueDate Value Date
TransactionCurrency Transaction Currency
DisplayCurrency Display Currency
AssignmentReference Assignment Reference
ControllingArea Controlling Area
FunctionalArea Sendr Fctl Area
CostCenter Cost Center
DocumentDate Journal Entry Date
AccountingDocumentType Journal Entry Type
AccountingDocumentCategory Journal Entry Category
DocumentReferenceID Reference
ExchangeRate Exchange rate
SalesOrder SD Document
GLAcctBalDateSortSqnc
GLAcctBalPerdSortSqnc GLAcctBalPerdSortSqnc
DocumentHeaderText Doc.Header Text
ChartOfAccounts ChartOfAccounts Node Class
GLAccountGroup Account Group
AccountIsMarkedForDeletion Deletion Flag
AuthorizationGroup AuthorizationGroup AuthorizGroup
GLAccountPeriod
CN_GLAccountPostingDateString
DocumentItemText Text
AlternativeReferenceDocument Alternative Reference Document
TaxCode Tax Code
Customer Sold-to Party
Supplier

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_CN_GLAcctBalances.
-- 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: PVCNGLABAL
-- Parameters: P_CompanyCode : fis_bukrs, P_FiscalYear : fis_gjahr, P_Ledger : fis_rldnr, P_CurrencyRole : fac_crcyrole, P_DisplayAltvAcct : figlcn_disalteracct

CREATE VIEW P_CN_GLAcctBalances AS
SELECT
  CompanyCode,
  FiscalYear,
  Ledger,
  AccountingDocument,
  LedgerGLLineItem,
  cast('' as figlcn_desc) AS GLAcctLineDescription,
  LedgerFiscalYear,
  FiscalPeriod,
  cast(DisplayGLAccount as figlcn_glaccountinfo) AS GLAccountInfo,
  AlternativeGLAccount,
  GLAccount,
  ProfitCenter,
  BusinessArea,
  Segment,
  PostingDate,
  AmountInDisplayCurrency,
  AmountInTransactionCurrency,
  DebitAmountInTransCrcy,
  CreditAmountInTransCrcy,
  DebitAmountInDisplayCrcy,
  CreditAmountInDisplayCrcy,
  AccountingDocCreatedByUser,
  ValueDate,
  TransactionCurrency,
  DisplayCurrency,
  AssignmentReference,
  ControllingArea,
  FunctionalArea,
  CostCenter,
  DocumentDate,
  AccountingDocumentType,
  AccountingDocumentCategory,
  DocumentReferenceID,
  ExchangeRate,
  SalesOrder,
  cast( 0 as figlcn_dayseqno ) AS GLAcctBalDateSortSqnc,
  cast( 1 as figlcn_perseqno ) AS GLAcctBalPerdSortSqnc,
  DocumentHeaderText,
  ChartOfAccounts,
  GLAccountGroup,
  AccountIsMarkedForDeletion,
  AuthorizationGroup,
  concat( substring( DisplayGLAccount, 1, 10 ),FiscalPeriod ) AS GLAccountPeriod,
  concat( substring( DisplayGLAccount, 1, 10 ),PostingDate ) AS CN_GLAccountPostingDateString,
  DocumentItemText,
  cast( AlternativeReferenceDocument as abap.char( 26 ) ) AS AlternativeReferenceDocument,
  TaxCode,
  Customer,
  Supplier AS P_CompanyCode,
  P_FiscalYear : $parameters.P_FiscalYear AS P_FiscalYear,
  P_Ledger : $parameters.P_Ledger AS P_Ledger,
  P_CurrencyRole : $parameters.P_CurrencyRole AS P_CurrencyRole,
  cast('' as lifnr) AS Supplier
FROM P_CN_GLAcctItems
-- UNION with additional select branch(es): P_CN_GLAcctItemsDay, P_CN_GLAcctDesc
;