I_GLACCTBALANCE
G/L Account Balance
I_GLACCTBALANCE is a CDS View in S/4HANA. G/L Account Balance. It contains 19 fields. 7 CDS views read from this table.
CDS Views using this table (7)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_GLAccountBalanceCube | view | from | COMPOSITE | G/L Account Balance Cube |
| I_GLAcctBalanceCube | view | from | COMPOSITE | G/L Account Balance - Cube |
| P_GlAcctBalanceComprn1 | view | from | COMPOSITE | |
| P_GlAcctBalanceComprn1 | view | union_all | COMPOSITE | |
| P_NO_SAFTGLBALANCE0 | view | from | COMPOSITE | |
| P_NO_SAFTGLBALANCE0 | view | union | COMPOSITE | |
| P_SAFTGenLedgerBalance5 | view | from | COMPOSITE |
Fields (19)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 1 |
| KEY | CompanyCode | CompanyCode | 1 |
| KEY | FiscalYear | FiscalYear | 1 |
| KEY | Ledger | Ledger | 1 |
| KEY | LedgerGLLineItem | LedgerGLLineItem | 1 |
| KEY | SourceLedger | SourceLedger | 1 |
| AlternativeGLAccount | AlternativeGLAccount | 1 | |
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | 1 | |
| BaseUnit | BaseUnit | 1 | |
| ChartOfAccounts | ChartOfAccounts | 1 | |
| CompanyCodeCurrency | CompanyCodeCurrency | 1 | |
| CountryChartOfAccounts | CountryChartOfAccounts | 1 | |
| GLAccount | GLAccount | 1 | |
| Material | Material | 1 | |
| PartnerProjectExternalID | PartnerProjectExternalID | 1 | |
| PartnerProjectInternalID | PartnerProjectInternalID | 1 | |
| ProjectExternalID | ProjectExternalID | 1 | |
| ProjectInternalID | ProjectInternalID | 1 | |
| ValuationArea | ValuationArea | 1 |
// Caution:
// --------
//
// As this CDS view is a very complex view und consumes data from the biggest tables of the S/4 HANA system we are forced to restrict access and give usage recommendations.
// Please read this information carefully!
//
// Please be informed that SAP offers various possibilities to build views for a balance calculation.
// This CDS view is only relevant for you if you need a cumulative balances calculation over a sequence of a time dimension. In all other cases please do not use this view.
// Please check instead if the CDS view I_GLAccountYearToDateBalanceC meets your requirement.
//
// Do not use this CDS view in the following scenarios:
// - As a CDS modelling data source within your own CDS model
// - Any scenario other than an Analytical Query
// - In a data extraction scenario
//
// The following section describes how the balance calculation of this CDS view works and what it was designed for:
//
// A cumulative balance means that the line items of a period are also assigned to the balances of a future period.
// A possible reporting result can be for example:
//
// GLAccount FiscalPeriod DebitAmount CreditAmount EndingBalanceInCoCodeCrcy
// 400000 001 100 100
// 400000 002 50 150
// 400000 003 100 250
// 400000 004 75 175
// 400000 005 300 475
//
// To provide this result, the queries being made against this view must include a time dimension, otherwise a query of the GL Account ending balance at the end of period 005 without a time dimension
// will result in 1150 (100+150+250-175+475) and thus in wrong balances.
// Therefore the consumption of the CDS view must only be an analytical query with exception aggregation of type #LAST, since this exception aggregation can return the 475 GL Account ending balance
// at the end of period 005, while native SQL ( Select GLAccount, sum(EndingBalance)… ) will return 1150.
//
// Assigning line items of a period to future periods in order to provide a cumulative balance requires high memory and CPU consumption in the HANA database.
// Therefore, it is not recommended to use this CDS view as a CDS modelling data source within a different CDS model, but to only use it as an analytical provider as it is documented in the
// @ObjectModel.supportedCapabilities annotation of the CDS view.
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'IFIGLBALANCE'
@EndUserText.label: 'G/L Account Balance'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@Analytics: { dataCategory: #CUBE } //, dataExtraction.enabled: true }
//@ObjectModel.representativeKey: 'FiscalPeriodDate'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions: true
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #REQUIRED
@Consumption.dbHints: ['AGGR_TARGET("ACDOCA")','NO_JOIN_THRU_AGGR']
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER ]
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
define view I_GLAcctBalance
with parameters
P_FromPostingDate : fis_budat_from,
P_ToPostingDate : fis_budat_to
as select from P_GLAcctBalance
( P_FromPostingDate: $parameters.P_FromPostingDate, P_ToPostingDate: $parameters.P_ToPostingDate )
association[1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association[0..1] to I_JournalEntry as _JournalEntry on $projection.CompanyCode = _JournalEntry.CompanyCode and
$projection.FiscalYear = _JournalEntry.FiscalYear and
$projection.AccountingDocument = _JournalEntry.AccountingDocument
association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYear
and $projection.CompanyCode = _FiscalYear.CompanyCode
association[0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingArea = _ControllingArea.ControllingArea
association[0..1] to I_Currency as _BalanceTransactionCurrency on $projection.BalanceTransactionCurrency = _BalanceTransactionCurrency.Currency
association[0..1] to I_Currency as _TransactionCurrency on $projection.TransactionCurrency = _TransactionCurrency.Currency
association[1] to I_Currency as _CompanyCodeCurrency on $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
association[0..1] to I_Currency as _GlobalCurrency on $projection.GlobalCurrency = _GlobalCurrency.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency1 on $projection.FreeDefinedCurrency1 = _FreeDefinedCurrency1.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency2 on $projection.FreeDefinedCurrency2 = _FreeDefinedCurrency2.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency3 on $projection.FreeDefinedCurrency3 = _FreeDefinedCurrency3.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency4 on $projection.FreeDefinedCurrency4 = _FreeDefinedCurrency4.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency5 on $projection.FreeDefinedCurrency5 = _FreeDefinedCurrency5.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency6 on $projection.FreeDefinedCurrency6 = _FreeDefinedCurrency6.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency7 on $projection.FreeDefinedCurrency7 = _FreeDefinedCurrency7.Currency
association[0..1] to I_Currency as _FreeDefinedCurrency8 on $projection.FreeDefinedCurrency8 = _FreeDefinedCurrency8.Currency
association[0..1] to I_Segment as _Segment on $projection.Segment = _Segment.Segment
association[0..1] to I_Segment as _PartnerSegment on $projection.PartnerSegment = _PartnerSegment.Segment
association[0..*] to I_ProfitCenter as _ProfitCenter on $projection.ControllingArea = _ProfitCenter.ControllingArea and
$projection.ProfitCenter = _ProfitCenter.ProfitCenter
association[0..*] to I_ProfitCenter as _PartnerProfitCenter on $projection.ControllingArea = _PartnerProfitCenter.ControllingArea and
$projection.PartnerProfitCenter = _PartnerProfitCenter.ProfitCenter
association[0..1] to I_ProfitCenter as _CurrentProfitCenter on $projection.ControllingArea = _CurrentProfitCenter.ControllingArea and
$projection.ProfitCenter = _CurrentProfitCenter.ProfitCenter and
_CurrentProfitCenter.ValidityStartDate <= $session.system_date and
_CurrentProfitCenter.ValidityEndDate >= $session.system_date
association[0..*] to I_CostCenter as _CostCenter on $projection.ControllingArea = _CostCenter.ControllingArea and
$projection.CostCenter = _CostCenter.CostCenter
association[0..1] to I_CostCenter as _CurrentCostCenter on $projection.ControllingArea = _CurrentCostCenter.ControllingArea and
$projection.CostCenter = _CurrentCostCenter.CostCenter and
_CurrentCostCenter.ValidityStartDate <= $session.system_date and
_CurrentCostCenter.ValidityEndDate >= $session.system_date
association[0..*] to I_CostCenter as _PartnerCostCenter on $projection.ControllingArea = _PartnerCostCenter.ControllingArea and
$projection.PartnerCostCenter = _PartnerCostCenter.CostCenter
association[0..1] to I_BusinessArea as _BusinessArea on $projection.BusinessArea = _BusinessArea.BusinessArea
association[0..1] to I_BusinessArea as _PartnerBusinessArea on $projection.PartnerBusinessArea = _PartnerBusinessArea.BusinessArea
association[0..1] to I_FunctionalArea as _FunctionalArea on $projection.FunctionalArea = _FunctionalArea.FunctionalArea
association[0..1] to I_FunctionalArea as _PartnerFunctionalArea on $projection.PartnerFunctionalArea = _PartnerFunctionalArea.FunctionalArea
association[0..1] to I_GLAccountInChartOfAccounts as _GLAccountInChartOfAccounts on $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts and
$projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount
association[0..1] to I_GLAccountInChartOfAccounts as _GLAccountHierarchy on $projection.ChartOfAccounts = _GLAccountHierarchy.ChartOfAccounts and
$projection.GLAccountHierarchy = _GLAccountHierarchy.GLAccount
association[1] to I_ChartOfAccounts as _ChartOfAccounts on $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts
association[0..1] to I_GLAccountInCompanyCode as _GLAccountInCompanyCode on $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and
$projection.GLAccount = _GLAccountInCompanyCode.GLAccount
association[0..1] to I_AccountingDocumentType as _AccountingDocumentType on $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
association[0..1] to I_FinancialAccountType as _FinancialAccountType on $projection.FinancialAccountType = _FinancialAccountType.FinancialAccountType
association[1] to I_DebitCreditCode as _DebitCreditCode on $projection.DebitCreditCode = _DebitCreditCode.DebitCreditCode
association[0..1] to I_Material as _Material on $projection.Material = _Material.Material //do not use any longer, use _Product
association[0..1] to I_Product as _Product on $projection.Product = _Product.Product
association[0..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association[0..1] to I_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
association[0..1] to I_CustomerGroup as _CustomerGroup on $projection.CustomerGroup = _CustomerGroup.CustomerGroup
association[0..1] to I_MaterialGroup as _MaterialGroup on $projection.MaterialGroup = _MaterialGroup.MaterialGroup //do not use any longer, use _ProductGroup
association[0..1] to I_ProductGroup as _ProductGroup on $projection.ProductGroup = _ProductGroup.MaterialGroup
//association [0..1] to I_ProductGroup_2 as _ProductGroup_2 on $projection.ProductGroup = _ProductGroup_2.ProductGroup
association [0..1] to I_ProductGroup as _SoldProductGroup on $projection.SoldProductGroup = _SoldProductGroup.MaterialGroup
association [0..1] to I_ProductGroup_2 as _SoldProductGroup_2 on $projection.SoldProductGroup = _SoldProductGroup_2.ProductGroup
association [0..1] to I_Customer as _Customer on $projection.Customer = _Customer.Customer
association [0..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
association [0..1] to I_CalendarDate as _CalendarDate on $projection.PostingDate = _CalendarDate.CalendarDate
association[0..1] to I_Ledger as _SourceLedger on $projection.SourceLedger = _SourceLedger.Ledger
association[0..1] to I_PostingKey as _PostingKey on $projection.PostingKey = _PostingKey.PostingKey
association[0..*] to I_ProfitCenter as _EliminationProfitCenter on $projection.ControllingArea = _EliminationProfitCenter.ControllingArea and
$projection.EliminationProfitCenter = _EliminationProfitCenter.ProfitCenter
association [0..1] to I_Supplier as _InventorySpecialStockSupplier
on $projection.InventorySpecialStockSupplier = _InventorySpecialStockSupplier.Supplier
association[0..1] to I_GLAccountInChartOfAccounts as _AlternativeGLAccount on $projection.CountryChartOfAccounts = _AlternativeGLAccount.ChartOfAccounts and
$projection.AlternativeGLAccount = _AlternativeGLAccount.GLAccount
association[0..1] to I_SalesOrder as _SalesOrder on $projection.SalesOrder = _SalesOrder.SalesOrder
association[0..1] to I_SalesOrderItem as _SalesOrderItem on $projection.SalesOrder = _SalesOrderItem.SalesOrder and
$projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
association[0..1] to I_SalesDocument as _SalesDocument on $projection.SalesDocument = _SalesDocument.SalesDocument
association[0..1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SalesDocument = _SalesDocumentItem.SalesDocument and
$projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
association[0..1] to I_InternalOrder as _InternalOrder on $projection.OrderID = _InternalOrder.InternalOrder
association[0..1] to I_Order as _Order on $projection.OrderID = _Order.OrderID
//association[0..*] to I_CostAnalysisResource as _CostAnalysisResource on $projection.ControllingArea = _CostAnalysisResource.ControllingArea and
// $projection.CostAnalysisResource = _CostAnalysisResource.CostAnalysisResource
association[0..1] to I_Employment as _Employment on $projection.PersonnelNumber = _Employment.EmploymentInternalID and
$projection.PostingDate <= _Employment.EndDate
association [0..1] to I_PersonWorkAgreement_1 as _PersonWorkAgreement_1 on $projection.PersonnelNumber = _PersonWorkAgreement_1.PersonWorkAgreement
association[0..1] to I_FinancialTransactionType as _FinancialTransactionType on $projection.FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType
association[0..1] to I_BusinessTransactionType as _BusinessTransactionType on $projection.BusinessTransactionType = _BusinessTransactionType.BusinessTransactionType
association[0..1] to I_ReferenceDocumentType as _ReferenceDocumentType on $projection.ReferenceDocumentType = _ReferenceDocumentType.ReferenceDocumentType
association[0..1] to I_ReferenceDocumentType as _PredecessorReferenceDocType on $projection.PredecessorReferenceDocType = _PredecessorReferenceDocType.ReferenceDocumentType
association[0..1] to I_AccountingDocumentCategory as _AccountingDocumentCategory on $projection.AccountingDocumentCategory = _AccountingDocumentCategory.AccountingDocumentCategory
association[0..1] to I_User as _User on $projection.AccountingDocCreatedByUser = _User.UserID
association[0..1] to I_GLAccountType as _GLAccountType on $projection.GLAccountType = _GLAccountType.GLAccountType
association[0..1] to I_FinancialAccountType as _OffsettingAccountType on $projection.OffsettingAccountType = _OffsettingAccountType.FinancialAccountType
association[0..1] to I_GLAccountInChartOfAccounts as _SenderGLAccount on $projection.ChartOfAccounts = _SenderGLAccount.ChartOfAccounts and
$projection.SenderGLAccount = _SenderGLAccount.GLAccount
// old association kept for compatibility. DO NOT USE
association [0..1] to I_GLAccountInChartOfAccounts as _OffsettingAccount on $projection.ChartOfAccounts = _OffsettingAccount.ChartOfAccounts
and $projection.OffsettingAccount = _OffsettingAccount.GLAccount
association [0..1] to I_OffsettingAccount as _OffsettingAccountWithBP on $projection.OffsettingChartOfAccounts = _OffsettingAccountWithBP.ChartOfAccounts
and $projection.OffsettingAccountType = _OffsettingAccountWithBP.OffsettingAccountType
and $projection.OffsettingAccount = _OffsettingAccountWithBP.OffsettingAccount
association[0..1] to I_ChartOfAccounts as _OffsettingChartOfAccounts on $projection.OffsettingChartOfAccounts = _OffsettingChartOfAccounts.ChartOfAccounts
association[0..1] to I_ChartOfAccounts as _CountryChartOfAccounts on $projection.CountryChartOfAccounts = _CountryChartOfAccounts.ChartOfAccounts
association[0..1] to I_PurchasingDocument as _PurchasingDocument on $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
association[0..1] to I_PurchasingDocumentItem as _PurchasingDocumentItem on $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument and
$projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
association[0..1] to I_SpecialGLCode as _SpecialGLCode on $projection.SpecialGLCode = _SpecialGLCode.SpecialGLCode and
$projection.FinancialAccountType = _SpecialGLCode.FinancialAccountType
association[0..*] to I_TaxCode as _TaxCode on $projection.TaxCode = _TaxCode.TaxCode
association[0..1] to I_Housebank as _HouseBank on $projection.CompanyCode = _HouseBank.CompanyCode and
$projection.HouseBank = _HouseBank.HouseBank
association[1..1] to I_AccountingDocument as _ClearingAccountingDocument on $projection.CompanyCode = _ClearingAccountingDocument.CompanyCode and
$projection.FiscalYear = _ClearingAccountingDocument.FiscalYear and
$projection.ClearingAccountingDocument = _ClearingAccountingDocument.AccountingDocument
association [0..1] to I_JournalEntry as _ClearingJournalEntry on $projection.CompanyCode = _ClearingJournalEntry.CompanyCode
and $projection.ClearingJournalEntryFiscalYear = _ClearingJournalEntry.FiscalYear
and $projection.ClearingJournalEntry = _ClearingJournalEntry.AccountingDocument
association [0..1] to I_FiscalYearForCompanyCode as _ClearingJrnlEntryFiscalYear on $projection.ClearingJournalEntryFiscalYear = _ClearingJrnlEntryFiscalYear.FiscalYear
and $projection.CompanyCode = _ClearingJrnlEntryFiscalYear.CompanyCode
association [0..1] to I_MasterFixedAsset as _MasterFixedAsset on $projection.CompanyCode = _MasterFixedAsset.CompanyCode and
$projection.MasterFixedAsset = _MasterFixedAsset.MasterFixedAsset
association[0..1] to I_FixedAsset as _FixedAsset on $projection.CompanyCode = _FixedAsset.CompanyCode and
$projection.MasterFixedAsset = _FixedAsset.MasterFixedAsset and
$projection.FixedAsset = _FixedAsset.FixedAsset
association [0..1] to I_MasterFixedAsset as _GroupMasterFixedAsset on $projection.CompanyCode = _GroupMasterFixedAsset.CompanyCode and
$projection.GroupMasterFixedAsset = _GroupMasterFixedAsset.MasterFixedAsset
association[0..1] to I_FixedAsset as _GroupFixedAsset on $projection.CompanyCode = _GroupFixedAsset.CompanyCode and
$projection.GroupMasterFixedAsset = _GroupFixedAsset.MasterFixedAsset and
$projection.GroupFixedAsset = _GroupFixedAsset.FixedAsset
association[0..1] to I_BusinessProcess as _BusinessProcess on $projection.ControllingArea = _BusinessProcess.ControllingArea and
$projection.BusinessProcess = _BusinessProcess.BusinessProcess
//association[0..1] to I_ControllingObject as _CostObject on $projection.CostObject = _CostObject.ControllingObject
association[0..*] to I_CostCenterActivityType as _PartnerCostCtrActivityType on $projection.ControllingArea = _PartnerCostCtrActivityType.ControllingArea and
$projection.PartnerCostCtrActivityType = _PartnerCostCtrActivityType.CostCtrActivityType
association[0..1] to I_InternalOrder as _PartnerOrder on $projection.PartnerOrder = _PartnerOrder.InternalOrder
association [0..1] to I_Order as _PartnerOrder_2 on $projection.PartnerOrder = _PartnerOrder_2.OrderID
association[0..1] to I_OrderCategory as _PartnerOrderCategory on $projection.PartnerOrderCategory = _PartnerOrderCategory.OrderCategory
association [0..1] to I_WBSElementBasicData as _WBSElementBasicData on $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
association [0..1] to I_WBSElementByExternalID as _WBSElementExternalID on $projection.WBSElementExternalID = _WBSElementExternalID.WBSElementExternalID
association[0..1] to I_WBSElementByInternalKey as _WBSElementInternalID on $projection.WBSElementInternalID = _WBSElementInternalID.WBSElementInternalID
association[0..1] to I_WBSElement as _WBSElement on $projection.WBSElement = _WBSElement.WBSElement
association[0..1] to I_WBSElement as _PartnerWBSElement on $projection.PartnerWBSElement = _PartnerWBSElement.WBSElement
association[0..1] to I_Project as _PartnerProject on $projection.PartnerProject = _PartnerProject.Project
association[0..1] to I_SalesDocument as _PartnerSalesDocument on $projection.PartnerSalesDocument = _PartnerSalesDocument.SalesDocument
association[0..1] to I_SalesDocumentItem as _PartnerSalesDocumentItem on $projection.PartnerSalesDocument = _PartnerSalesDocumentItem.SalesDocument and
$projection.PartnerSalesDocumentItem = _PartnerSalesDocumentItem.SalesDocumentItem
association[0..1] to I_BusinessProcess as _PartnerBusinessProcess on $projection.ControllingArea = _PartnerBusinessProcess.ControllingArea and
$projection.PartnerBusinessProcess = _PartnerBusinessProcess.BusinessProcess
association[0..1] to I_BillingDocumentType as _BillingDocumentType on $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
association[0..1] to I_SalesOrganization as _SalesOrganization on $projection.SalesOrganization = _SalesOrganization.SalesOrganization
association[0..1] to I_DistributionChannel as _DistributionChannel on $projection.DistributionChannel = _DistributionChannel.DistributionChannel
association[0..1] to I_Material as _SoldMaterial on $projection.SoldMaterial = _SoldMaterial.Material //do not use any longer, use _SoldProduct
association[0..1] to I_Product as _SoldProduct on $projection.SoldProduct = _SoldProduct.Product
association[0..1] to I_Fund as _Fund on $projection.FinancialManagementArea = _Fund.FinancialManagementArea and
$projection.Fund = _Fund.Fund
association[0..1] to I_Fund as _PartnerFund on $projection.FinancialManagementArea = _PartnerFund.FinancialManagementArea and
$projection.PartnerFund = _PartnerFund.Fund
association[0..*] to I_FundsCenter as _FundsCenter on $projection.FinancialManagementArea = _FundsCenter.FinancialManagementArea and