P_CN_GLAcctItems
G/L Account Items
P_CN_GLAcctItems is a Consumption CDS View that provides data about "G/L Account Items" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItem) and exposes 43 fields with key fields CompanyCode, FiscalYear, Ledger, AccountingDocument, LedgerGLLineItem. It has 4 associations to related views. Part of development package GLO_FIN_CN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItem | I_GLAccountLineItem | from |
Parameters (6)
| Name | Type | Default |
|---|---|---|
| P_CompanyCode | fis_bukrs | |
| P_FiscalYear | fis_gjahr | |
| P_Ledger | fis_rldnr | |
| P_CurrencyRole | fac_crcyrole | |
| P_DisplayAltvAcct | figlcn_disalteracct | |
| P_FiscalPeriod | fins_fiscalperiod |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_GLAccountInCompanyCode | _GLAccountInCompanyCode | _GLAccountInCompanyCode.CompanyCode = I_GLAccountLineItem.CompanyCode and _GLAccountInCompanyCode.GLAccount = I_GLAccountLineItem.GLAccount |
| [0..1] | I_GLAccountInChartOfAccounts | _ChartOfAccounts | _ChartOfAccounts.ChartOfAccounts = I_GLAccountLineItem.ChartOfAccounts and _ChartOfAccounts.GLAccount = I_GLAccountLineItem.GLAccount |
| [0..1] | I_AccountingDocument | _bkpf | _bkpf.CompanyCode = $projection.CompanyCode and _bkpf.AccountingDocument = $projection.AccountingDocument and _bkpf.FiscalYear = $projection.FiscalYear |
| [0..1] | I_LedgerCompanyCodeCrcyRoleVH | currency | currency.CompanyCode = $projection.CompanyCode and currency.Ledger = $projection.Ledger |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PVCNGLAITEMS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | G/L Account Items | view |
Fields (43)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_GLAccountLineItem | LedgerFiscalYear | |
| KEY | Ledger | I_GLAccountLineItem | Ledger | Ledger |
| KEY | AccountingDocument | I_GLAccountLineItem | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | I_GLAccountLineItem | LedgerGLLineItem | Journal Entry Item |
| LedgerFiscalYear | I_GLAccountLineItem | FiscalYear | G/L Fiscal Year | |
| FiscalPeriod | I_GLAccountLineItem | FiscalPeriod | Tax period | |
| FunctionalArea | FunctionalArea | Sendr Fctl Area | ||
| Segment | I_GLAccountLineItem | Segment | Segment number | |
| ProfitCenter | I_GLAccountLineItem | ProfitCenter | Profit Center | |
| BusinessArea | I_GLAccountLineItem | BusinessArea | Business Area | |
| AuthorizationGroup | _GLAccountInCompanyCode | AuthorizationGroup | AuthorizGroup | |
| GLAccountendasDisplayGLAccount | ||||
| GLAccount | GLAccount | General Ledger | ||
| ChartOfAccounts | ChartOfAccounts | Node Class | ||
| GLAccountGroup | _ChartOfAccounts | GLAccountGroup | Account Group | |
| AccountIsMarkedForDeletion | _GLAccountInCompanyCode | AccountIsMarkedForDeletion | Deletion Flag | |
| PostingDate | I_GLAccountLineItem | PostingDate | Posting Date for GR | |
| AmountInTransactionCurrency | AmountInTransactionCurrency | Pt Crcy Amt | ||
| DebitAmountInTransCrcy | DebitAmountInTransCrcy | Debit Amt in DC | ||
| CreditAmountInTransCrcy | ||||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | Local Crcy Amt | ||
| DebitAmountInCoCodeCrcy | DebitAmountInCoCodeCrcy | Debit Amount in Company Code Currency | ||
| CreditAmountInCoCodeCrcy | ||||
| AccountingDocCreatedByUser | AccountingDocCreatedByUser | User which created overhead document | ||
| ValueDate | _bkpf | AccountingDocumentCreationDate | Journal Entry Date | |
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| Directon | I_GLAccountLineItem | DebitCreditCode | Single-Character Flag | |
| AssignmentReference | AssignmentReference | Assignment Reference | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostCenter | CostCenter | Cost Center | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| AccountingDocumentCategory | _bkpf | AccountingDocumentCategory | Journal Entry Category | |
| DocumentHeaderText | _bkpf | AccountingDocumentHeaderText | Doc.Header Text | |
| DocumentReferenceID | _bkpf | DocumentReferenceID | Reference | |
| ExchangeRate | ||||
| SalesOrder | SalesOrder | SD Document | ||
| DocumentItemText | I_GLAccountLineItem | DocumentItemText | Text | |
| AlternativeReferenceDocument | _bkpf | AlternativeReferenceDocument | Alternative Reference Document | |
| TaxCode | I_GLAccountLineItem | TaxCode | Tax Code | |
| Customer | I_GLAccountLineItem | Customer | Sold-to Party | |
| Supplier | I_GLAccountLineItem | Supplier | 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_GLAcctItems.
-- 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: PVCNGLAITEMS
-- Parameters: P_CompanyCode : fis_bukrs, P_FiscalYear : fis_gjahr, P_Ledger : fis_rldnr, P_CurrencyRole : fac_crcyrole, P_DisplayAltvAcct : figlcn_disalteracct, P_FiscalPeriod : fins_fiscalperiod
CREATE VIEW P_CN_GLAcctItems AS
SELECT
I_GLAccountLineItem.CompanyCode AS CompanyCode,
I_GLAccountLineItem.LedgerFiscalYear AS FiscalYear,
I_GLAccountLineItem.Ledger AS Ledger,
I_GLAccountLineItem.AccountingDocument AS AccountingDocument,
I_GLAccountLineItem.LedgerGLLineItem AS LedgerGLLineItem,
I_GLAccountLineItem.FiscalYear AS LedgerFiscalYear,
I_GLAccountLineItem.FiscalPeriod AS FiscalPeriod,
FunctionalArea,
I_GLAccountLineItem.Segment AS Segment,
I_GLAccountLineItem.ProfitCenter AS ProfitCenter,
I_GLAccountLineItem.BusinessArea AS BusinessArea,
_GLAccountInCompanyCode.AuthorizationGroup AS AuthorizationGroup,
case $parameters.P_DisplayAltvAcct when 'X' then case AlternativeGLAccount when '' then _GLAccountInCompanyCode.AlternativeGLAccount else AlternativeGLAccount end else I_GLAccountLineItem.GLAccount end as DisplayGLAccount AS GLAccountendasDisplayGLAccount,
GLAccount,
ChartOfAccounts,
_ChartOfAccounts.GLAccountGroup AS GLAccountGroup,
_GLAccountInCompanyCode.AccountIsMarkedForDeletion AS AccountIsMarkedForDeletion,
I_GLAccountLineItem.PostingDate AS PostingDate,
AmountInTransactionCurrency,
DebitAmountInTransCrcy,
0 - CreditAmountInTransCrcy AS CreditAmountInTransCrcy,
AmountInCompanyCodeCurrency,
DebitAmountInCoCodeCrcy,
0 - CreditAmountInCoCodeCrcy AS CreditAmountInCoCodeCrcy,
AccountingDocCreatedByUser,
_bkpf.AccountingDocumentCreationDate AS ValueDate,
TransactionCurrency,
I_GLAccountLineItem.DebitCreditCode AS Directon,
AssignmentReference,
ControllingArea,
CostCenter,
DocumentDate,
AccountingDocumentType,
_bkpf.AccountingDocumentCategory AS AccountingDocumentCategory,
_bkpf.AccountingDocumentHeaderText AS DocumentHeaderText,
_bkpf.DocumentReferenceID AS DocumentReferenceID,
cast( _bkpf.ExchangeRate as char12 ) AS ExchangeRate,
SalesOrder,
I_GLAccountLineItem.DocumentItemText AS DocumentItemText,
_bkpf.AlternativeReferenceDocument AS AlternativeReferenceDocument,
I_GLAccountLineItem.TaxCode AS TaxCode,
I_GLAccountLineItem.Customer AS Customer,
I_GLAccountLineItem.Supplier AS Supplier
FROM I_GLAccountLineItem
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON _GLAccountInCompanyCode.CompanyCode = I_GLAccountLineItem.CompanyCode AND _GLAccountInCompanyCode.GLAccount = I_GLAccountLineItem.GLAccount -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _ChartOfAccounts ON _ChartOfAccounts.ChartOfAccounts = I_GLAccountLineItem.ChartOfAccounts AND _ChartOfAccounts.GLAccount = I_GLAccountLineItem.GLAccount -- association [0..1]
LEFT OUTER JOIN I_AccountingDocument AS _bkpf ON _bkpf.CompanyCode = CompanyCode AND _bkpf.AccountingDocument = AccountingDocument AND _bkpf.FiscalYear = FiscalYear -- association [0..1]
LEFT OUTER JOIN I_LedgerCompanyCodeCrcyRoleVH AS currency ON currency.CompanyCode = CompanyCode AND currency.Ledger = Ledger -- association [0..1]
;
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