@AbapCatalog.entityBuffer.definitionAllowed: false
@AbapCatalog: { viewEnhancementCategory: [#PROJECTION_LIST, #UNION ] }
@AccessControl: { authorizationCheck: #CHECK,
personalData.blocking: #REQUIRED }
@Analytics.technicalName: 'IFIGLICMPCUBE'
@Analytics: { dataCategory: #CUBE,
internalName: #LOCAL }
//@ClientHandling.algorithm: #SESSION_VARIABLE
@Consumption.dbHints: ['AGGR_TARGET("ACDOCA")','NO_JOIN_THRU_AGGR']
@EndUserText.label: 'Comparison of G/L Account Item - Cube'
@ObjectModel: { representativeKey: 'LedgerGLLineItem',
usageType: {sizeCategory: #XXL,
dataClass: #MIXED,
serviceQuality: #D },
supportedCapabilities: [#ANALYTICAL_PROVIDER, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE],
modelingPattern: #ANALYTICAL_CUBE }
@Metadata: { ignorePropagatedAnnotations: true,
allowExtensions:true }
@VDM.viewType: #COMPOSITE
@Environment.sql.passValueForClient: true
define view entity I_GLAccountLineItemComprnCube
with parameters
P_FromFiscalYearPeriod : fis_fromjahrper_c_no_conv,
P_ToFiscalYearPeriod : fis_tojahrper_c_no_conv,
// P_FromPostingDate : fis_budat_from,
// P_ToPostingDate : fis_budat_to,
P_ComprnFromFiscalYearPeriod : fis_fromjahrper_comp_c_no_conv,
P_ComprnToFiscalYearPeriod : fis_tojahrper_comp_c_no_conv
// P_ComprnFromPostingDate : fis_comprn_budat_from,
// P_ComprnToPostingDate : fis_comprn_budat_to
as select from I_GLAccountLineItem as I_GLAccountLineItem
association[0..1] to I_GLAccountInChartOfAccounts as _CorporateGroupAccount on $projection.CorporateGroupChartOfAccounts = _CorporateGroupAccount.ChartOfAccounts
and $projection.CorporateGroupAccount = _CorporateGroupAccount.GLAccount
association[0..1] to I_ChartOfAccounts as _CorporateGroupChartOfAccounts on $projection.CorporateGroupChartOfAccounts = _CorporateGroupChartOfAccounts.ChartOfAccounts
association[0..1] to I_GLRecordType as _GLRecordType on $projection.GLRecordType = _GLRecordType.GLRecordType
association [0..1] to I_Order as _PartnerOrder on $projection.PartnerOrder = _PartnerOrder.OrderID
association of exact one to exact one E_JournalEntryItem as _Extension on $projection.SourceLedger = _Extension.SourceLedger
and $projection.CompanyCode = _Extension.CompanyCode
and $projection.FiscalYear = _Extension.FiscalYear
and $projection.AccountingDocument = _Extension.AccountingDocument
and $projection.LedgerGLLineItem = _Extension.LedgerGLLineItem
{
@ObjectModel.foreignKey.association: '_Ledger'
key I_GLAccountLineItem.Ledger,
@ObjectModel.foreignKey.association: '_SourceLedger'
key I_GLAccountLineItem.SourceLedger,
@ObjectModel.foreignKey.association: '_CompanyCode'
key I_GLAccountLineItem.CompanyCode,
@ObjectModel.foreignKey.association: '_FiscalYear'
// @Semantics.fiscal.year: true
key I_GLAccountLineItem.FiscalYear,
@ObjectModel.foreignKey.association: '_JournalEntry'
key I_GLAccountLineItem.AccountingDocument,
key I_GLAccountLineItem.LedgerGLLineItem,
// @ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'
@Semantics.fiscal.year: true
I_GLAccountLineItem.LedgerFiscalYear,
// cast(AccountingDocument as fis_belnr) as JournalEntry,
@ObjectModel.foreignKey.association: '_GLRecordType'
I_GLAccountLineItem.GLRecordType,
@ObjectModel.foreignKey.association: '_ControllingArea'
I_GLAccountLineItem.ControllingArea,
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
I_GLAccountLineItem.ChartOfAccounts,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
I_GLAccountLineItem.GLAccount,
@ObjectModel.foreignKey.association: '_CostCenter'
I_GLAccountLineItem.CostCenter,
@ObjectModel.foreignKey.association: '_ProfitCenter'
I_GLAccountLineItem.ProfitCenter,
@ObjectModel.foreignKey.association: '_FunctionalArea'
I_GLAccountLineItem.FunctionalArea,
I_GLAccountLineItem.AccountingDocumentItem,
@ObjectModel.foreignKey.association: '_DebitCreditCode'
I_GLAccountLineItem.DebitCreditCode,
// Time Characteristics
// @ObjectModel.foreignKey.association: '_FiscalPeriod'
@Semantics.fiscal.period: true
case when I_GLAccountLineItem._FiscalCalendarDate.FiscalPeriod is not null
then cast( I_GLAccountLineItem._FiscalCalendarDate.FiscalPeriod as fis_fscl_period_rep preserving type )
else cast( '001' as fis_fscl_period_rep preserving type ) end as ReportingFiscalPeriod,
@Semantics.fiscal.period: true
I_GLAccountLineItem.FiscalPeriod,
// @ObjectModel.foreignKey.association: '_FiscalYearVariant'
@Semantics.fiscal.yearVariant: true
I_GLAccountLineItem.FiscalYearVariant,
// @ObjectModel.foreignKey.association: '_FiscalYearPeriod'
@Semantics.fiscal.yearPeriod: true
case when I_GLAccountLineItem._FiscalCalendarDate.FiscalYearPeriod is not null
then cast( I_GLAccountLineItem._FiscalCalendarDate.FiscalYearPeriod as fis_fyearperiod_rep preserving type )
else cast(concat( I_GLAccountLineItem.LedgerFiscalYear, '001' ) as fis_fyearperiod_rep ) end as ReportingFiscalYearPeriod,
@Semantics.fiscal.yearPeriod: true
I_GLAccountLineItem.FiscalYearPeriod,
// @Semantics.businessDate.at: true
I_GLAccountLineItem.PostingDate,
// @Semantics.businessDate.at: true
I_GLAccountLineItem.DocumentDate,
// free fields
@ObjectModel.foreignKey.association: '_AccountingDocumentType'
I_GLAccountLineItem.AccountingDocumentType,
// cast(AccountingDocumentType as fis_blart) as JournalEntryType,
I_GLAccountLineItem.AssignmentReference,
@ObjectModel.foreignKey.association: '_PostingKey'
I_GLAccountLineItem.PostingKey,
I_GLAccountLineItem.TransactionTypeDetermination,
@ObjectModel.foreignKey.association: '_SubLedgerAccLineItemType'
I_GLAccountLineItem.SubLedgerAcctLineItemType,
I_GLAccountLineItem.AccountingDocCreatedByUser,
I_GLAccountLineItem.LastChangeDateTime,
I_GLAccountLineItem.CreationDateTime,
I_GLAccountLineItem.CreationDate,
@ObjectModel.foreignKey.association: '_AlternativeGLAccount'
I_GLAccountLineItem.AlternativeGLAccount,
@ObjectModel.foreignKey.association: '_CountryChartOfAccounts'
I_GLAccountLineItem.CountryChartOfAccounts,
@ObjectModel.foreignKey.association: '_CorporateGroupChartOfAccounts'
I_GLAccountLineItem._ChartOfAccounts.CorporateGroupChartOfAccounts as CorporateGroupChartOfAccounts,
@ObjectModel.foreignKey.association: '_CorporateGroupAccount'
I_GLAccountLineItem._GLAccountInChartOfAccounts.CorporateGroupAccount as CorporateGroupAccount,
I_GLAccountLineItem._GLAccountInChartOfAccounts.IsBalanceSheetAccount,
I_GLAccountLineItem.InvoiceReference,
@Semantics.fiscal.year: true
I_GLAccountLineItem.InvoiceReferenceFiscalYear,
I_GLAccountLineItem.FollowOnDocumentType,
I_GLAccountLineItem.InvoiceItemReference,
I_GLAccountLineItem.ReferencePurchaseOrderCategory,
@ObjectModel.foreignKey.association: '_PurchasingDocument'
I_GLAccountLineItem.PurchasingDocument,
@ObjectModel.foreignKey.association: '_PurchasingDocumentItem'
I_GLAccountLineItem.PurchasingDocumentItem,
I_GLAccountLineItem.AccountAssignmentNumber,
I_GLAccountLineItem.DocumentItemText,
// @ObjectModel.foreignKey.association: '_SalesDocument'
I_GLAccountLineItem.SalesDocument,
// @ObjectModel.foreignKey.association: '_SalesDocumentItem'
I_GLAccountLineItem.SalesDocumentItem,
@ObjectModel.foreignKey.association: '_Product'
I_GLAccountLineItem.Product,
@ObjectModel.foreignKey.association: '_Plant'
I_GLAccountLineItem.Plant,
@ObjectModel.foreignKey.association: '_Supplier'
I_GLAccountLineItem.Supplier,
@ObjectModel.foreignKey.association: '_Customer'
I_GLAccountLineItem.Customer,
// ServicesRenderedDate,
@ObjectModel.foreignKey.association: '_FinancialAccountType'
I_GLAccountLineItem.FinancialAccountType,
@ObjectModel.foreignKey.association: '_SpecialGLCode'
I_GLAccountLineItem.SpecialGLCode,
// @ObjectModel.foreignKey.association: '_TaxCode'
I_GLAccountLineItem.TaxCode,
@ObjectModel.foreignKey.association: '_HouseBank'
I_GLAccountLineItem.HouseBank,
@ObjectModel.foreignKey.association: '_HouseBankAccount'
I_GLAccountLineItem.HouseBankAccount,
@Semantics.booleanIndicator: true
I_GLAccountLineItem.IsOpenItemManaged,
I_GLAccountLineItem.ClearingDate,
@API.element.releaseState: #DEPRECATED
@API.element.successor: 'ClearingJournalEntry'
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'ClearingJournalEntry'
@ObjectModel.foreignKey.association: '_ClearingAccountingDocument'
I_GLAccountLineItem.ClearingAccountingDocument,
@API.element.releaseState: #DEPRECATED
@API.element.successor: 'ClearingJournalEntryFiscalYear'
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'ClearingJournalEntryFiscalYear'
@Semantics.fiscal.year: true
I_GLAccountLineItem.ClearingDocFiscalYear,
@Analytics.internalName: #LOCAL
@ObjectModel.foreignKey.association: '_ClearingJournalEntry'
I_GLAccountLineItem.ClearingJournalEntry,
@Semantics.fiscal.year: true
@Analytics.internalName: #LOCAL
@ObjectModel.foreignKey.association: '_ClearingJrnlEntryFiscalYear'
I_GLAccountLineItem.ClearingJournalEntryFiscalYear,
@ObjectModel.foreignKey.association: '_MasterFixedAsset'
I_GLAccountLineItem.MasterFixedAsset,
@ObjectModel.foreignKey.association: '_FixedAsset'
I_GLAccountLineItem.FixedAsset,
I_GLAccountLineItem.AssetValueDate,
@ObjectModel.foreignKey.association: '_AssetTransactionType'
I_GLAccountLineItem.AssetTransactionType,
I_GLAccountLineItem.AssetClass,
// @ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
I_GLAccountLineItem.InventorySpecialStockValnType,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
I_GLAccountLineItem.InventorySpecialStockType,
@ObjectModel.foreignKey.association: '_InventoryValuationType'
I_GLAccountLineItem.InventoryValuationType,
// @ObjectModel.foreignKey.association: '_Purreqvaluationarea'
I_GLAccountLineItem.ValuationArea,
@ObjectModel.foreignKey.association: '_OffsettingAccountWithBP'
I_GLAccountLineItem.OffsettingAccount,
@ObjectModel.foreignKey.association: '_OffsettingAccountType'
I_GLAccountLineItem.OffsettingAccountType,
@ObjectModel.foreignKey.association: '_OffsettingChartOfAccounts'
I_GLAccountLineItem.OffsettingChartOfAccounts,
I_GLAccountLineItem.LineItemIsCompleted,
I_GLAccountLineItem.PersonnelNumber,
// @ObjectModel.foreignKey.association: '_ControllingObjectClass'
// ControllingObjectClass,
// @ObjectModel.foreignKey.association: '_PartnerControllingObjectClass'
// PartnerControllingObjectClass,
@ObjectModel.foreignKey.association: '_PartnerCompany'
I_GLAccountLineItem.PartnerCompany,
@ObjectModel.foreignKey.association: '_CostCtrActivityType'
I_GLAccountLineItem.CostCtrActivityType,
@ObjectModel.foreignKey.association: '_Order'
I_GLAccountLineItem.OrderID,
@ObjectModel.foreignKey.association: '_OrderCategory'
I_GLAccountLineItem.OrderCategory,
@ObjectModel.foreignKey.association: '_WBSElementBasicData'
I_GLAccountLineItem.WBSElementInternalID,
@ObjectModel.foreignKey.association: '_OperatingConcern'
I_GLAccountLineItem.OperatingConcern,
@ObjectModel.foreignKey.association: '_PartnerCostCtrActivityType'
I_GLAccountLineItem.PartnerCostCtrActivityType,
@ObjectModel.foreignKey.association: '_BillingDocumentType'
I_GLAccountLineItem.BillingDocumentType,
@ObjectModel.foreignKey.association: '_SalesOrganization'
I_GLAccountLineItem.SalesOrganization,
@ObjectModel.foreignKey.association: '_DistributionChannel'
I_GLAccountLineItem.DistributionChannel,
I_GLAccountLineItem.OrganizationDivision,
@ObjectModel.foreignKey.association: '_Segment'
I_GLAccountLineItem.Segment,
@ObjectModel.foreignKey.association: '_BusinessArea'
I_GLAccountLineItem.BusinessArea,
I_GLAccountLineItem.AccountAssignment,
I_GLAccountLineItem.AccountAssignmentType,
@ObjectModel.foreignKey.association: '_AccountingDocumentCategory'
I_GLAccountLineItem.AccountingDocumentCategory,
@ObjectModel.foreignKey.association: '_MovementCategory'
I_GLAccountLineItem.AssetAcctTransClassfctn,
I_GLAccountLineItem.AssetDepreciationArea,
@ObjectModel.foreignKey.association: '_BudgetPeriod'
I_GLAccountLineItem.BudgetPeriod,
@ObjectModel.foreignKey.association: '_BusinessProcess'
I_GLAccountLineItem.BusinessProcess,
@ObjectModel.foreignKey.association: '_BusinessTransactionType'
I_GLAccountLineItem.BusinessTransactionType,
I_GLAccountLineItem.ControllingObjectDebitType,
// @ObjectModel.foreignKey.association: '_ControllingDebitCreditCode'
// ControllingDebitCreditCode,
I_GLAccountLineItem.CostEstimate,
I_GLAccountLineItem.CostObject,
// @ObjectModel.foreignKey.association: '_BillableControl'
// BillableControl,
@ObjectModel.foreignKey.association: '_CustomerGroup'
I_GLAccountLineItem.CustomerGroup,
I_GLAccountLineItem.CustomerServiceNotification,
I_GLAccountLineItem.DepreciationFiscalPeriod,
@ObjectModel.foreignKey.association: '_EliminationProfitCenter'
I_GLAccountLineItem.EliminationProfitCenter,
@ObjectModel.foreignKey.association: '_FinancialTransactionType'
I_GLAccountLineItem.FinancialTransactionType,
@ObjectModel.foreignKey.association: '_Fund'
I_GLAccountLineItem.Fund,
@ObjectModel.foreignKey.association: '_FinancialManagementArea'
I_GLAccountLineItem.FinancialManagementArea,
@ObjectModel.foreignKey.association: '_GLAccountType'
I_GLAccountLineItem.GLAccountType,
I_GLAccountLineItem.GrantID,
@ObjectModel.foreignKey.association: '_GroupFixedAsset'
I_GLAccountLineItem.GroupFixedAsset,
@ObjectModel.foreignKey.association: '_GroupMasterFixedAsset'
I_GLAccountLineItem.GroupMasterFixedAsset,
// @ObjectModel.foreignKey.association: '_InventorySpclStkSalesDocItm'
I_GLAccountLineItem.InventorySpclStkSalesDocItm,
// @ObjectModel.foreignKey.association: '_InventorySpclStkSalesDocument'
I_GLAccountLineItem.InventorySpclStkSalesDocument,
@ObjectModel.foreignKey.association: '_InvtrySpclStkWBSElmntBscData'
I_GLAccountLineItem.InvtrySpclStockWBSElmntIntID,
@ObjectModel.foreignKey.association: '_InventorySpecialStockSupplier'
I_GLAccountLineItem.InventorySpecialStockSupplier,
I_GLAccountLineItem.IsReversal,
I_GLAccountLineItem.IsReversed,
I_GLAccountLineItem.IsSettled,
I_GLAccountLineItem.IsSettlement,
I_GLAccountLineItem.JointVenture,
I_GLAccountLineItem.JointVentureCostRecoveryCode,
I_GLAccountLineItem.JointVentureEquityGroup,
I_GLAccountLineItem.JointVentureEquityType,
@ObjectModel.foreignKey.association: '_LogicalSystem'
I_GLAccountLineItem.LogicalSystem,
@ObjectModel.foreignKey.association: '_SoldProductGroup_2'
I_GLAccountLineItem.SoldProductGroup,
@ObjectModel.foreignKey.association: '_OriginCostCenter'
I_GLAccountLineItem.OriginCostCenter,
@ObjectModel.foreignKey.association: '_OriginProfitCenter'
I_GLAccountLineItem.OriginProfitCenter,
@ObjectModel.foreignKey.association: '_OriginCostCtrActivityType'
I_GLAccountLineItem.OriginCostCtrActivityType,
I_GLAccountLineItem.OriginObjectType,
I_GLAccountLineItem.PartnerAccountAssignment,
I_GLAccountLineItem.PartnerAccountAssignmentType,
I_GLAccountLineItem.PartnerBudgetPeriod,
@ObjectModel.foreignKey.association: '_PartnerBusinessArea'
I_GLAccountLineItem.PartnerBusinessArea,
@ObjectModel.foreignKey.association: '_PartnerBusinessProcess'
I_GLAccountLineItem.PartnerBusinessProcess,
@ObjectModel.foreignKey.association: '_PartnerCompanyCode'
I_GLAccountLineItem.PartnerCompanyCode,
@ObjectModel.foreignKey.association: '_PartnerCostCenter'
I_GLAccountLineItem.PartnerCostCenter,
I_GLAccountLineItem.PartnerCostObject,
@ObjectModel.foreignKey.association: '_PartnerFunctionalArea'
I_GLAccountLineItem.PartnerFunctionalArea,
@ObjectModel.foreignKey.association: '_PartnerFund'
I_GLAccountLineItem.PartnerFund,
I_GLAccountLineItem.PartnerGrant,
@ObjectModel.foreignKey.association: '_PartnerOrder'
I_GLAccountLineItem.PartnerOrder_2 as PartnerOrder,
@ObjectModel.foreignKey.association: '_PartnerOrderCategory'
I_GLAccountLineItem.PartnerOrderCategory,
@ObjectModel.foreignKey.association: '_PartnerProfitCenter'
I_GLAccountLineItem.PartnerProfitCenter,
@ObjectModel.foreignKey.association: '_PartnerProjectBasicData'
I_GLAccountLineItem.PartnerProjectInternalID,
I_GLAccountLineItem.PartnerProjectNetwork,
// PartnerProjectNetworkActivity,
// @ObjectModel.foreignKey.association: '_PartnerSalesDocument'
I_GLAccountLineItem.PartnerSalesDocument,
// @ObjectModel.foreignKey.association: '_PartnerSalesDocumentItem'
I_GLAccountLineItem.PartnerSalesDocumentItem,
@ObjectModel.foreignKey.association: '_PartnerSegment'
I_GLAccountLineItem.PartnerSegment,
@ObjectModel.foreignKey.association: '_PartnerWBSElementBasicData'
I_GLAccountLineItem.PartnerWBSElementInternalID,
I_GLAccountLineItem.PredecessorReferenceDocCntxt,
I_GLAccountLineItem.PredecessorReferenceDocItem,
@ObjectModel.foreignKey.association: '_PredecessorReferenceDocType'
I_GLAccountLineItem.PredecessorReferenceDocType,
I_GLAccountLineItem.PredecessorReferenceDocument,
@ObjectModel.foreignKey.association: '_ProjectBasicData'
I_GLAccountLineItem.ProjectInternalID,
@ObjectModel.foreignKey.association: '_ProjectNetwork'
I_GLAccountLineItem.ProjectNetwork,
I_GLAccountLineItem.QuantityIsIncomplete,
I_GLAccountLineItem.ReferenceDocument,
I_GLAccountLineItem.ReferenceDocumentContext,
I_GLAccountLineItem.ReferenceDocumentItem,
I_GLAccountLineItem.ReferenceDocumentItemGroup,
@ObjectModel.foreignKey.association: '_ReferenceDocumentType'
I_GLAccountLineItem.ReferenceDocumentType,
// RelatedNetworkActivity,
I_GLAccountLineItem.ReversalReferenceDocument,
I_GLAccountLineItem.ReversalReferenceDocumentCntxt,
I_GLAccountLineItem.SenderAccountAssignment,
I_GLAccountLineItem.SenderAccountAssignmentType,
//@ObjectModel.foreignKey.association: '_SenderGLAccount'
I_GLAccountLineItem.SenderGLAccount,
I_GLAccountLineItem.SettlementReferenceDate,
@ObjectModel.foreignKey.association: '_SoldProduct'
I_GLAccountLineItem.SoldProduct,
I_GLAccountLineItem.CostOriginGroup,
@ObjectModel.foreignKey.association: '_OriginSenderObject'
I_GLAccountLineItem.OriginSenderObject,
@ObjectModel.foreignKey.association: '_CostAnalysisResource'
I_GLAccountLineItem.CostAnalysisResource,
I_GLAccountLineItem.CustomerSupplierCountry,
I_GLAccountLineItem.CustomerSupplierIndustry,
I_GLAccountLineItem.SalesDistrict,
I_GLAccountLineItem.BillToParty,
I_GLAccountLineItem.ShipToParty,
I_GLAccountLineItem.CustomerSupplierCorporateGroup,
@ObjectModel.foreignKey.association: '_FundsCenter'
I_GLAccountLineItem.FundsCenter,
I_GLAccountLineItem.FundedProgram,
I_GLAccountLineItem.IsStatisticalOrder,
I_GLAccountLineItem.IsStatisticalCostCenter,
I_GLAccountLineItem.IsStatisticalSalesDocument,
I_GLAccountLineItem.WBSIsStatisticalWBSElement,
I_GLAccountLineItem.WorkCenterInternalID,
// OrderOperation,
// OrderItem,
I_GLAccountLineItem.ServiceDocumentType,
I_GLAccountLineItem.ServiceDocument,
I_GLAccountLineItem.ServiceDocumentItem,
//////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_LOG_ACT: New Fields PM //
//////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Currency and Amount Fields
///////////////////////////////////////////////////////////////////////////////
I_GLAccountLineItem.BalanceTransactionCurrency,
I_GLAccountLineItem.TransactionCurrency,
I_GLAccountLineItem.CompanyCodeCurrency,
I_GLAccountLineItem.GlobalCurrency,
I_GLAccountLineItem.FreeDefinedCurrency1,
I_GLAccountLineItem.FreeDefinedCurrency2,
I_GLAccountLineItem.FreeDefinedCurrency3,
I_GLAccountLineItem.FreeDefinedCurrency4,
I_GLAccountLineItem.FreeDefinedCurrency5,
I_GLAccountLineItem.FreeDefinedCurrency6,
I_GLAccountLineItem.FreeDefinedCurrency7,
I_GLAccountLineItem.FreeDefinedCurrency8,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} } I_GLAccountLineItem.AmountInBalanceTransacCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} } I_GLAccountLineItem.AmountInTransactionCurrency,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} } I_GLAccountLineItem.AmountInCompanyCodeCurrency,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} } I_GLAccountLineItem.AmountInGlobalCurrency,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} } I_GLAccountLineItem.AmountInFreeDefinedCurrency8,
//////////////////////
// NEW
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} } cast( 0 as fis_comprn_tsl ) as ComprnAmountInBalTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} } cast( 0 as fis_comprn_wsl ) as ComprnAmountInTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} } cast( 0 as fis_comprn_hsl ) as ComprnAmountInCoCodeCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} } cast( 0 as fis_comprn_ksl ) as ComprnAmountInGlobalCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} } cast( 0 as fis_comprn_osl ) as ComprnAmountInFreeDfndCrcy1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} } cast( 0 as fis_comprn_vsl ) as ComprnAmountInFreeDfndCrcy2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} } cast( 0 as fis_comprn_bsl ) as ComprnAmountInFreeDfndCrcy3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} } cast( 0 as fis_comprn_csl ) as ComprnAmountInFreeDfndCrcy4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} } cast( 0 as fis_comprn_dsl ) as ComprnAmountInFreeDfndCrcy5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} } cast( 0 as fis_comprn_esl ) as ComprnAmountInFreeDfndCrcy6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} } cast( 0 as fis_comprn_fsl ) as ComprnAmountInFreeDfndCrcy7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} } cast( 0 as fis_comprn_gsl ) as ComprnAmountInFreeDfndCrcy8,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
I_GLAccountLineItem.DebitAmountInCoCodeCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
I_GLAccountLineItem.CreditAmountInCoCodeCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
I_GLAccountLineItem.DebitAmountInTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
I_GLAccountLineItem.CreditAmountInTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
I_GLAccountLineItem.DebitAmountInBalanceTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
I_GLAccountLineItem.CreditAmountInBalanceTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
I_GLAccountLineItem.DebitAmountInGlobalCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
I_GLAccountLineItem.CreditAmountInGlobalCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy1 as DebitAmountInFreeDfndCrcy1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy1 as CreditAmountInFreeDfndCrcy1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy2 as DebitAmountInFreeDfndCrcy2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy2 as CreditAmountInFreeDfndCrcy2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy3 as DebitAmountInFreeDfndCrcy3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy3 as CreditAmountInFreeDfndCrcy3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy4 as DebitAmountInFreeDfndCrcy4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy4 as CreditAmountInFreeDfndCrcy4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy5 as DebitAmountInFreeDfndCrcy5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy5 as CreditAmountInFreeDfndCrcy5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy6 as DebitAmountInFreeDfndCrcy6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy6 as CreditAmountInFreeDfndCrcy6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy7 as DebitAmountInFreeDfndCrcy7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy7 as CreditAmountInFreeDfndCrcy7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy8 as DebitAmountInFreeDfndCrcy8,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy8 as CreditAmountInFreeDfndCrcy8,
////////////////////////////////////
// NEW
////////////////////////////////////
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
cast(0 as fis_comprn_dr_hsl ) as ComprnDebitAmtInCoCodeCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
cast(0 as fis_comprn_cr_hsl ) as ComprnCreditAmtInCoCodeCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
cast(0 as fis_comprn_dr_wsl ) as ComprnDebitAmtInTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
cast(0 as fis_comprn_cr_wsl ) as ComprnCreditAmtInTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
cast(0 as fis_comprn_dr_tsl ) as ComprnDebitAmtInBalTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
cast(0 as fis_comprn_cr_tsl ) as ComprnCreditAmtInBalTransCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
cast(0 as fis_comprn_dr_ksl ) as ComprnDebitAmtInGlobalCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
cast(0 as fis_comprn_cr_ksl ) as ComprnCreditAmtInGlobalCrcy,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
cast(0 as fis_comprn_dr_osl ) as ComprnDebitAmtInFreeDfndCrcy1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
cast(0 as fis_comprn_cr_osl ) as ComprnCreditAmtInFreeDfndCrcy1,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
cast(0 as fis_comprn_dr_vsl ) as ComprnDebitAmtInFreeDfndCrcy2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
cast(0 as fis_comprn_cr_vsl ) as ComprnCreditAmtInFreeDfndCrcy2,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
cast(0 as fis_comprn_dr_bsl ) as ComprnDebitAmtInFreeDfndCrcy3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
cast(0 as fis_comprn_cr_bsl ) as ComprnCreditAmtInFreeDfndCrcy3,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
cast(0 as fis_comprn_dr_csl ) as ComprnDebitAmtInFreeDfndCrcy4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
cast(0 as fis_comprn_cr_csl ) as ComprnCreditAmtInFreeDfndCrcy4,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
cast(0 as fis_comprn_dr_dsl ) as ComprnDebitAmtInFreeDfndCrcy5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
cast(0 as fis_comprn_cr_dsl ) as ComprnCreditAmtInFreeDfndCrcy5,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
cast(0 as fis_comprn_dr_esl ) as ComprnDebitAmtInFreeDfndCrcy6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
cast(0 as fis_comprn_cr_esl ) as ComprnCreditAmtInFreeDfndCrcy6,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
cast(0 as fis_comprn_dr_fsl ) as ComprnDebitAmtInFreeDfndCrcy7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
cast(0 as fis_comprn_cr_fsl ) as ComprnCreditAmtInFreeDfndCrcy7,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
cast(0 as fis_comprn_dr_gsl ) as ComprnDebitAmtInFreeDfndCrcy8,
@Aggregation.default: #SUM
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
cast(0 as fis_comprn_cr_gsl ) as ComprnCreditAmtInFreeDfndCrcy8,
///////////////////////////////////////////////////////////////////////////////
// Fields from associations
///////////////////////////////////////////////////////////////////////////////
// CalendarYear,
// @ObjectModel.foreignKey.association: '_CalendarQuarter'
// CalendarQuarter,
// CalendarYearQuarter,
// @ObjectModel.foreignKey.association: '_CalendarMonth'
// CalendarMonth,
// @ObjectModel.foreignKey.association: '_CalendarYearMonth'
// CalendarYearMonth,
// CalendarWeek,
// CalendarYearWeek,
I_GLAccountLineItem._FiscalCalendarDate.FiscalQuarter as FiscalQuarter,
I_GLAccountLineItem._FiscalCalendarDate.FiscalWeek as FiscalWeek,
I_GLAccountLineItem._FiscalCalendarDate.FiscalYearQuarter as FiscalYearQuarter,
I_GLAccountLineItem._FiscalCalendarDate.FiscalYearWeek as FiscalYearWeek,
///////////////////////////////////////////////////////////////////////////////
// Associations
///////////////////////////////////////////////////////////////////////////////
I_GLAccountLineItem._JournalEntry,
I_GLAccountLineItem._CompanyCode,
I_GLAccountLineItem._FiscalYear,
// Do not use. DEPRECATED! Use instead _FiscalPeriodForVariant.
// _FiscalPeriod,
// _FiscalPeriodForVariant,
// Do not use. DEPRECATED! Use instead _LedgerFiscalYearForVariant.
// _LedgerFiscalYear,
// _LedgerFiscalYearForVariant,
// _FiscalYearVariant,
// Do not use. DEPRECATED! Use instead _FiscalYearPeriodForVariant.
// _FiscalYearPeriod,
_GLRecordType,
I_GLAccountLineItem._ControllingArea,
I_GLAccountLineItem._BalanceTransactionCurrency,
I_GLAccountLineItem._TransactionCurrency,
I_GLAccountLineItem._CompanyCodeCurrency,
I_GLAccountLineItem._GlobalCurrency,
I_GLAccountLineItem._FreeDefinedCurrency1,
I_GLAccountLineItem._FreeDefinedCurrency2,
I_GLAccountLineItem._FreeDefinedCurrency3,
I_GLAccountLineItem._FreeDefinedCurrency4,
I_GLAccountLineItem._FreeDefinedCurrency5,
I_GLAccountLineItem._FreeDefinedCurrency6,
I_GLAccountLineItem._FreeDefinedCurrency7,
I_GLAccountLineItem._FreeDefinedCurrency8,
I_GLAccountLineItem._Segment,
I_GLAccountLineItem._ProfitCenter,
I_GLAccountLineItem._CurrentProfitCenter,
I_GLAccountLineItem._CostCenter,
I_GLAccountLineItem._CurrentCostCenter,
I_GLAccountLineItem._WBSElementBasicData,
I_GLAccountLineItem._ProjectBasicData,
I_GLAccountLineItem._ProjectNetwork,
I_GLAccountLineItem._InternalOrder,
I_GLAccountLineItem._Order,
I_GLAccountLineItem._BusinessArea,
I_GLAccountLineItem._FunctionalArea,
I_GLAccountLineItem._CostCtrActivityType,
I_GLAccountLineItem._CostAnalysisResource,
I_GLAccountLineItem._BusinessProcess,
I_GLAccountLineItem._OrderCategory,
// _ControllingObjectClass,
I_GLAccountLineItem._GLAccountInChartOfAccounts,
I_GLAccountLineItem._GLAccountInCompanyCode,
I_GLAccountLineItem._ChartOfAccounts,
I_GLAccountLineItem._AccountingDocumentType,
I_GLAccountLineItem._FinancialAccountType,
I_GLAccountLineItem._DebitCreditCode,
I_GLAccountLineItem._Product,
// _ProductGroup,
I_GLAccountLineItem._SoldProductGroup_2,
I_GLAccountLineItem._Plant,
I_GLAccountLineItem._Ledger,
I_GLAccountLineItem._SourceLedger,
I_GLAccountLineItem._Customer,
I_GLAccountLineItem._CustomerGroup,
I_GLAccountLineItem._Supplier,
I_GLAccountLineItem._SalesDocument,
I_GLAccountLineItem._SalesDocumentItem,
// _Order,
I_GLAccountLineItem._ServiceDocument,
I_GLAccountLineItem._ServiceDocumentItem,
I_GLAccountLineItem._PostingKey,
I_GLAccountLineItem._SubLedgerAccLineItemType,
I_GLAccountLineItem._AccountingDocumentCategory,
I_GLAccountLineItem._FinancialTransactionType,
I_GLAccountLineItem._BusinessTransactionType,
I_GLAccountLineItem._ReferenceDocumentType,
I_GLAccountLineItem._PredecessorReferenceDocType,
// _PartnerControllingObjectClass,
I_GLAccountLineItem._PartnerCostCenter,
I_GLAccountLineItem._PartnerProfitCenter,
I_GLAccountLineItem._PartnerBusinessArea,
I_GLAccountLineItem._PartnerFunctionalArea,
I_GLAccountLineItem._PartnerCompanyCode,
I_GLAccountLineItem._PartnerSegment,
I_GLAccountLineItem._PartnerCostCtrActivityType,
_PartnerOrder,
I_GLAccountLineItem._PartnerOrderCategory,
I_GLAccountLineItem._PartnerWBSElementBasicData,
I_GLAccountLineItem._PartnerProjectBasicData,
I_GLAccountLineItem._PartnerSalesDocument,
I_GLAccountLineItem._PartnerSalesDocumentItem,
I_GLAccountLineItem._PartnerBusinessProcess,
// _User,
I_GLAccountLineItem._EliminationProfitCenter,
//_ControllingObject,
// _ControllingDebitCreditCode,
I_GLAccountLineItem._GLAccountType,
I_GLAccountLineItem._OffsettingAccountType,
I_GLAccountLineItem._OffsettingChartOfAccounts,
//_OffsettingAccount,
I_GLAccountLineItem._OffsettingAccountWithBP,
I_GLAccountLineItem._AlternativeGLAccount,
//_SenderGLAccount,
I_GLAccountLineItem._CountryChartOfAccounts,
_CorporateGroupChartOfAccounts,
_CorporateGroupAccount,
I_GLAccountLineItem._PurchasingDocument,
I_GLAccountLineItem._PurchasingDocumentItem,
I_GLAccountLineItem._SpecialGLCode,
I_GLAccountLineItem._TaxCode,
I_GLAccountLineItem._HouseBank,
I_GLAccountLineItem._HouseBankAccount,
I_GLAccountLineItem._ClearingJrnlEntryFiscalYear,
I_GLAccountLineItem._ClearingJournalEntry,
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_ClearingJournalEntry'
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_ClearingJournalEntry'
I_GLAccountLineItem._ClearingAccountingDocument,
I_GLAccountLineItem._MasterFixedAsset,
I_GLAccountLineItem._FixedAsset,
I_GLAccountLineItem._GroupMasterFixedAsset,
I_GLAccountLineItem._GroupFixedAsset,
I_GLAccountLineItem._MovementCategory,
I_GLAccountLineItem._AssetTransactionType,
// _InventorySpecialStockValnType,
I_GLAccountLineItem._InventorySpecialStockType,
I_GLAccountLineItem._InventorySpclStkSalesDocument,
I_GLAccountLineItem._InventorySpclStkSalesDocItm,
I_GLAccountLineItem._InvtrySpclStkWBSElmntBscData,
I_GLAccountLineItem._InventorySpecialStockSupplier,
I_GLAccountLineItem._InventoryValuationType,
I_GLAccountLineItem._OriginSenderObject,
I_GLAccountLineItem._OriginCostCenter,
I_GLAccountLineItem._OriginProfitCenter,
I_GLAccountLineItem._OriginCostCtrActivityType,
I_GLAccountLineItem._CostOriginGroup,
//_RelatedNetworkActivity,
//_PartnerProjectNetworkActivity,
I_GLAccountLineItem._BillingDocumentType,
I_GLAccountLineItem._SalesOrganization,
I_GLAccountLineItem._DistributionChannel,
I_GLAccountLineItem._CustomerSupplierCountry,
I_GLAccountLineItem._SalesDistrict,
I_GLAccountLineItem._BillToParty,
I_GLAccountLineItem._ShipToParty,
I_GLAccountLineItem._SoldProduct,
I_GLAccountLineItem._FundsCenter,
I_GLAccountLineItem._Fund,
I_GLAccountLineItem._PartnerFund,
I_GLAccountLineItem._FinancialManagementArea,
//_FundedProgram
I_GLAccountLineItem._BudgetPeriod,
I_GLAccountLineItem._LogicalSystem,
I_GLAccountLineItem._OperatingConcern,
I_GLAccountLineItem._PartnerCompany,
// _PurReqValuationArea,
I_GLAccountLineItem._WorkCenter
}
where I_GLAccountLineItem.FiscalYearPeriod between $parameters.P_FromFiscalYearPeriod and $parameters.P_ToFiscalYearPeriod
and ( I_GLAccountLineItem.FiscalPeriod <> '000'
or ( I_GLAccountLineItem.FiscalYearPeriod = $parameters.P_FromFiscalYearPeriod and I_GLAccountLineItem.AccountingDocumentCategory = 'C' and I_GLAccountLineItem.FiscalPeriod = '000' ) /* get BCF only in case it is the BCF of the year selection starts from */
or ( I_GLAccountLineItem.GLRecordType = '5' and I_GLAccountLineItem.AccountingDocumentCategory = 'J') ) /* get year end and opening postings */
/* Alternative would be to select BCF always. As we have to consider BCF with non defined PostingDate where could be like below.
As also the FiscalYearPeriod Range is derived it is not possible that a BCF outside the FiscalYearPeriod Range is selected. */
//where I_GLAccountLineItem.FiscalYearPeriod between $parameters.P_ComprnFromFiscalYearPeriod and $parameters.P_ComprnToFiscalYearPeriod
//and ( I_GLAccountLineItem.PostingDate between $parameters.P_ComprnFromPostingDate and $parameters.P_ComprnToPostingDate or I_GLAccountLineItem.PostingDate = '00000000' )
// or I_GLAccountLineItem.FiscalYearPeriod = $parameters.P_ComprnFromFiscalYearPeriod // get BCF only in case it is the BCF of the year selection starts from
// or ( I_GLAccountLineItem.GLRecordType = '5' and I_GLAccountLineItem.AccountingDocumentCategory = 'J') ) // get year end and opening postings
union all
select from I_GLAccountLineItem as I_GLAccountLineItem
association[0..1] to I_GLAccountInChartOfAccounts as _CorporateGroupAccount on $projection.CorporateGroupChartOfAccounts = _CorporateGroupAccount.ChartOfAccounts
and $projection.CorporateGroupAccount = _CorporateGroupAccount.GLAccount
association[0..1] to I_ChartOfAccounts as _CorporateGroupChartOfAccounts on $projection.CorporateGroupChartOfAccounts = _CorporateGroupChartOfAccounts.ChartOfAccounts
association[0..1] to I_GLRecordType as _GLRecordType on $projection.GLRecordType = _GLRecordType.GLRecordType
association [0..1] to I_Order as _PartnerOrder on $projection.PartnerOrder = _PartnerOrder.OrderID
association [1..1] to E_JournalEntryItem as _Extension on $projection.SourceLedger = _Extension.SourceLedger
and $projection.CompanyCode = _Extension.CompanyCode
and $projection.FiscalYear = _Extension.FiscalYear
and $projection.AccountingDocument = _Extension.AccountingDocument
and $projection.LedgerGLLineItem = _Extension.LedgerGLLineItem
{
key I_GLAccountLineItem.Ledger,
key I_GLAccountLineItem.SourceLedger,
key I_GLAccountLineItem.CompanyCode,
// @Semantics.fiscal.year: true
key I_GLAccountLineItem.FiscalYear,
key I_GLAccountLineItem.AccountingDocument,
key I_GLAccountLineItem.LedgerGLLineItem,
// @ObjectModel.foreignKey.association: '_LedgerFiscalYearForVariant'
I_GLAccountLineItem.LedgerFiscalYear,
// cast(AccountingDocument as fis_belnr) as JournalEntry,
I_GLAccountLineItem.GLRecordType,
I_GLAccountLineItem.ControllingArea,
I_GLAccountLineItem.ChartOfAccounts,
I_GLAccountLineItem.GLAccount,
I_GLAccountLineItem.CostCenter,
I_GLAccountLineItem.ProfitCenter,
I_GLAccountLineItem.FunctionalArea,
I_GLAccountLineItem.AccountingDocumentItem,
I_GLAccountLineItem.DebitCreditCode,
// Time Characteristics
// @ObjectModel.foreignKey.association: '_FiscalPeriod'
case when I_GLAccountLineItem._FiscalCalendarDate.FiscalPeriod is not null
then cast( I_GLAccountLineItem._FiscalCalendarDate.FiscalPeriod as fis_fscl_period_rep preserving type )
else cast( '001' as fis_fscl_period_rep) end as ReportingFiscalPeriod,
I_GLAccountLineItem.FiscalPeriod,
// @ObjectModel.foreignKey.association: '_FiscalYearVariant'
I_GLAccountLineItem.FiscalYearVariant,
// @ObjectModel.foreignKey.association: '_FiscalYearPeriod'
case when I_GLAccountLineItem._FiscalCalendarDate.FiscalYearPeriod is not null
then cast( I_GLAccountLineItem._FiscalCalendarDate.FiscalYearPeriod as fis_fyearperiod_rep preserving type )
else cast(concat( I_GLAccountLineItem.LedgerFiscalYear, '001' ) as fis_fyearperiod_rep ) end as ReportingFiscalYearPeriod,
I_GLAccountLineItem.FiscalYearPeriod,
// FiscalYearPeriod as PostedFiscalYearPeriod,
// @Semantics.businessDate.at: true
I_GLAccountLineItem.PostingDate,
// @Semantics.businessDate.at: true
I_GLAccountLineItem.DocumentDate,
// free fields
I_GLAccountLineItem.AccountingDocumentType,
// cast(AccountingDocumentType as fis_blart) as JournalEntryType,
I_GLAccountLineItem.AssignmentReference,
I_GLAccountLineItem.PostingKey,
I_GLAccountLineItem.TransactionTypeDetermination,
I_GLAccountLineItem.SubLedgerAcctLineItemType,
I_GLAccountLineItem.AccountingDocCreatedByUser,
I_GLAccountLineItem.LastChangeDateTime,
I_GLAccountLineItem.CreationDateTime,
I_GLAccountLineItem.CreationDate,
I_GLAccountLineItem.AlternativeGLAccount,
I_GLAccountLineItem.CountryChartOfAccounts,
I_GLAccountLineItem._ChartOfAccounts.CorporateGroupChartOfAccounts as CorporateGroupChartOfAccounts,
I_GLAccountLineItem._GLAccountInChartOfAccounts.CorporateGroupAccount as CorporateGroupAccount,
I_GLAccountLineItem._GLAccountInChartOfAccounts.IsBalanceSheetAccount,
I_GLAccountLineItem.InvoiceReference,
I_GLAccountLineItem.InvoiceReferenceFiscalYear,
I_GLAccountLineItem.FollowOnDocumentType,
I_GLAccountLineItem.InvoiceItemReference,
I_GLAccountLineItem.ReferencePurchaseOrderCategory,
I_GLAccountLineItem.PurchasingDocument,
I_GLAccountLineItem.PurchasingDocumentItem,
I_GLAccountLineItem.AccountAssignmentNumber,
I_GLAccountLineItem.DocumentItemText,
I_GLAccountLineItem.SalesDocument,
I_GLAccountLineItem.SalesDocumentItem,
I_GLAccountLineItem.Product,
I_GLAccountLineItem.Plant,
I_GLAccountLineItem.Supplier,
I_GLAccountLineItem.Customer,
// ServicesRenderedDate,
I_GLAccountLineItem.FinancialAccountType,
I_GLAccountLineItem.SpecialGLCode,
// @ObjectModel.foreignKey.association: '_TaxCode'
I_GLAccountLineItem.TaxCode,
I_GLAccountLineItem.HouseBank,
I_GLAccountLineItem.HouseBankAccount,
I_GLAccountLineItem.IsOpenItemManaged,
I_GLAccountLineItem.ClearingDate,
I_GLAccountLineItem.ClearingAccountingDocument,
I_GLAccountLineItem.ClearingDocFiscalYear,
I_GLAccountLineItem.ClearingJournalEntry,
I_GLAccountLineItem.ClearingJournalEntryFiscalYear,
I_GLAccountLineItem.MasterFixedAsset,
I_GLAccountLineItem.FixedAsset,
I_GLAccountLineItem.AssetValueDate,
I_GLAccountLineItem.AssetTransactionType,
I_GLAccountLineItem.AssetClass,
// @ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
I_GLAccountLineItem.InventorySpecialStockValnType,
I_GLAccountLineItem.InventorySpecialStockType,
I_GLAccountLineItem.InventoryValuationType,
// @ObjectModel.foreignKey.association: '_Purreqvaluationarea'
I_GLAccountLineItem.ValuationArea,
I_GLAccountLineItem.OffsettingAccount,
I_GLAccountLineItem.OffsettingAccountType,
I_GLAccountLineItem.OffsettingChartOfAccounts,
I_GLAccountLineItem.LineItemIsCompleted,
I_GLAccountLineItem.PersonnelNumber,
// @ObjectModel.foreignKey.association: '_ControllingObjectClass'
// ControllingObjectClass,
// @ObjectModel.foreignKey.association: '_PartnerControllingObjectClass'
// PartnerControllingObjectClass,
I_GLAccountLineItem.PartnerCompany,
I_GLAccountLineItem.CostCtrActivityType,
I_GLAccountLineItem.OrderID,
I_GLAccountLineItem.OrderCategory,
I_GLAccountLineItem.WBSElementInternalID,
I_GLAccountLineItem.OperatingConcern,
I_GLAccountLineItem.PartnerCostCtrActivityType,
I_GLAccountLineItem.BillingDocumentType,
I_GLAccountLineItem.SalesOrganization,
I_GLAccountLineItem.DistributionChannel,
I_GLAccountLineItem.OrganizationDivision,
I_GLAccountLineItem.Segment,
I_GLAccountLineItem.BusinessArea,
I_GLAccountLineItem.AccountAssignment,
I_GLAccountLineItem.AccountAssignmentType,
I_GLAccountLineItem.AccountingDocumentCategory,
I_GLAccountLineItem.AssetAcctTransClassfctn,
I_GLAccountLineItem.AssetDepreciationArea,
I_GLAccountLineItem.BudgetPeriod,
I_GLAccountLineItem.BusinessProcess,
I_GLAccountLineItem.BusinessTransactionType,
I_GLAccountLineItem.ControllingObjectDebitType,
// @ObjectModel.foreignKey.association: '_ControllingDebitCreditCode'
// ControllingDebitCreditCode,
I_GLAccountLineItem.CostEstimate,
I_GLAccountLineItem.CostObject,
I_GLAccountLineItem.CustomerGroup,
I_GLAccountLineItem.CustomerServiceNotification,
I_GLAccountLineItem.DepreciationFiscalPeriod,
I_GLAccountLineItem.EliminationProfitCenter,
I_GLAccountLineItem.FinancialTransactionType,
I_GLAccountLineItem.Fund,
I_GLAccountLineItem.FinancialManagementArea,
I_GLAccountLineItem.GLAccountType,
I_GLAccountLineItem.GrantID,
I_GLAccountLineItem.GroupFixedAsset,
I_GLAccountLineItem.GroupMasterFixedAsset,
I_GLAccountLineItem.InventorySpclStkSalesDocItm,
I_GLAccountLineItem.InventorySpclStkSalesDocument,
I_GLAccountLineItem.InvtrySpclStockWBSElmntIntID,
I_GLAccountLineItem.InventorySpecialStockSupplier,
I_GLAccountLineItem.IsReversal,
I_GLAccountLineItem.IsReversed,
I_GLAccountLineItem.IsSettled,
I_GLAccountLineItem.IsSettlement,
I_GLAccountLineItem.JointVenture,
I_GLAccountLineItem.JointVentureCostRecoveryCode,
I_GLAccountLineItem.JointVentureEquityGroup,
I_GLAccountLineItem.JointVentureEquityType,
I_GLAccountLineItem.LogicalSystem,
I_GLAccountLineItem.SoldProductGroup,
I_GLAccountLineItem.OriginCostCenter,
I_GLAccountLineItem.OriginProfitCenter,
I_GLAccountLineItem.OriginCostCtrActivityType,
I_GLAccountLineItem.OriginObjectType,
I_GLAccountLineItem.PartnerAccountAssignment,
I_GLAccountLineItem.PartnerAccountAssignmentType,
I_GLAccountLineItem.PartnerBudgetPeriod,
I_GLAccountLineItem.PartnerBusinessArea,
I_GLAccountLineItem.PartnerBusinessProcess,
I_GLAccountLineItem.PartnerCompanyCode,
I_GLAccountLineItem.PartnerCostCenter,
I_GLAccountLineItem.PartnerCostObject,
I_GLAccountLineItem.PartnerFunctionalArea,
I_GLAccountLineItem.PartnerFund,
I_GLAccountLineItem.PartnerGrant,
I_GLAccountLineItem.PartnerOrder_2 as PartnerOrder,
I_GLAccountLineItem.PartnerOrderCategory,
I_GLAccountLineItem.PartnerProfitCenter,
I_GLAccountLineItem.PartnerProjectInternalID,
I_GLAccountLineItem.PartnerProjectNetwork,
// PartnerProjectNetworkActivity,
I_GLAccountLineItem.PartnerSalesDocument,
I_GLAccountLineItem.PartnerSalesDocumentItem,
I_GLAccountLineItem.PartnerSegment,
I_GLAccountLineItem.PartnerWBSElementInternalID,
I_GLAccountLineItem.PredecessorReferenceDocCntxt,
I_GLAccountLineItem.PredecessorReferenceDocItem,
I_GLAccountLineItem.PredecessorReferenceDocType,
I_GLAccountLineItem.PredecessorReferenceDocument,
I_GLAccountLineItem.ProjectInternalID,
I_GLAccountLineItem.ProjectNetwork,
I_GLAccountLineItem.QuantityIsIncomplete,
I_GLAccountLineItem.ReferenceDocument,
I_GLAccountLineItem.ReferenceDocumentContext,
I_GLAccountLineItem.ReferenceDocumentItem,
I_GLAccountLineItem.ReferenceDocumentItemGroup,
I_GLAccountLineItem.ReferenceDocumentType,
// RelatedNetworkActivity,
I_GLAccountLineItem.ReversalReferenceDocument,
I_GLAccountLineItem.ReversalReferenceDocumentCntxt,
I_GLAccountLineItem.SenderAccountAssignment,
I_GLAccountLineItem.SenderAccountAssignmentType,
//@ObjectModel.foreignKey.association: '_SenderGLAccount'
I_GLAccountLineItem.SenderGLAccount,
I_GLAccountLineItem.SettlementReferenceDate,
I_GLAccountLineItem.SoldProduct,
I_GLAccountLineItem.CostOriginGroup,
I_GLAccountLineItem.OriginSenderObject,
I_GLAccountLineItem.CostAnalysisResource,
I_GLAccountLineItem.CustomerSupplierCountry,
I_GLAccountLineItem.CustomerSupplierIndustry,
I_GLAccountLineItem.SalesDistrict,
I_GLAccountLineItem.BillToParty,
I_GLAccountLineItem.ShipToParty,
I_GLAccountLineItem.CustomerSupplierCorporateGroup,
I_GLAccountLineItem.FundsCenter,
I_GLAccountLineItem.FundedProgram,
I_GLAccountLineItem.IsStatisticalOrder,
I_GLAccountLineItem.IsStatisticalCostCenter,
I_GLAccountLineItem.IsStatisticalSalesDocument,
I_GLAccountLineItem.WBSIsStatisticalWBSElement,
I_GLAccountLineItem.WorkCenterInternalID,
// OrderOperation,
// OrderItem,
I_GLAccountLineItem.ServiceDocumentType,
I_GLAccountLineItem.ServiceDocument,
I_GLAccountLineItem.ServiceDocumentItem,
//////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_LOG_ACT: New Fields PM //
//////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Currency and Amount Fields
///////////////////////////////////////////////////////////////////////////////
I_GLAccountLineItem.BalanceTransactionCurrency,
I_GLAccountLineItem.TransactionCurrency,
I_GLAccountLineItem.CompanyCodeCurrency,
I_GLAccountLineItem.GlobalCurrency,
I_GLAccountLineItem.FreeDefinedCurrency1,
I_GLAccountLineItem.FreeDefinedCurrency2,
I_GLAccountLineItem.FreeDefinedCurrency3,
I_GLAccountLineItem.FreeDefinedCurrency4,
I_GLAccountLineItem.FreeDefinedCurrency5,
I_GLAccountLineItem.FreeDefinedCurrency6,
I_GLAccountLineItem.FreeDefinedCurrency7,
I_GLAccountLineItem.FreeDefinedCurrency8,
cast( 0 as fis_wsl ) as AmountInBalanceTransacCrcy,
cast( 0 as fis_tsl ) as AmountInTransactionCurrency,
cast( 0 as fis_hsl ) as AmountInCompanyCodeCurrency,
cast( 0 as fis_ksl ) as AmountInGlobalCurrency,
cast( 0 as fis_osl ) as AmountInFreeDefinedCurrency1,
cast( 0 as fis_vsl ) as AmountInFreeDefinedCurrency2,
cast( 0 as fis_bsl ) as AmountInFreeDefinedCurrency3,
cast( 0 as fis_csl ) as AmountInFreeDefinedCurrency4,
cast( 0 as fis_dsl ) as AmountInFreeDefinedCurrency5,
cast( 0 as fis_esl ) as AmountInFreeDefinedCurrency6,
cast( 0 as fis_fsl ) as AmountInFreeDefinedCurrency7,
cast( 0 as fis_gsl ) as AmountInFreeDefinedCurrency8,
I_GLAccountLineItem.AmountInBalanceTransacCrcy as ComprnAmountInBalTransCrcy,
I_GLAccountLineItem.AmountInTransactionCurrency as ComprnAmountInTransCrcy,
I_GLAccountLineItem.AmountInCompanyCodeCurrency as ComprnAmountInCoCodeCrcy,
I_GLAccountLineItem.AmountInGlobalCurrency as ComprnAmountInGlobalCrcy,
I_GLAccountLineItem.AmountInFreeDefinedCurrency1 as ComprnAmountInFreeDfndCrcy1,
I_GLAccountLineItem.AmountInFreeDefinedCurrency2 as ComprnAmountInFreeDfndCrcy2,
I_GLAccountLineItem.AmountInFreeDefinedCurrency3 as ComprnAmountInFreeDfndCrcy3,
I_GLAccountLineItem.AmountInFreeDefinedCurrency4 as ComprnAmountInFreeDfndCrcy4,
I_GLAccountLineItem.AmountInFreeDefinedCurrency5 as ComprnAmountInFreeDfndCrcy5,
I_GLAccountLineItem.AmountInFreeDefinedCurrency6 as ComprnAmountInFreeDfndCrcy6,
I_GLAccountLineItem.AmountInFreeDefinedCurrency7 as ComprnAmountInFreeDfndCrcy7,
I_GLAccountLineItem.AmountInFreeDefinedCurrency8 as ComprnAmountInFreeDfndCrcy8,
cast( 0 as fis_dr_hsl ) as DebitAmountInCoCodeCrcy,
cast( 0 as fis_cr_hsl ) as CreditAmountInCoCodeCrcy,
cast( 0 as fis_dr_wsl ) as DebitAmountInTransCrcy,
cast( 0 as fis_cr_wsl ) as CreditAmountInTransCrcy,
cast( 0 as fis_dr_tsl ) as DebitAmountInBalanceTransCrcy,
cast( 0 as fis_cr_tsl ) as CreditAmountInBalanceTransCrcy,
cast( 0 as fis_dr_ksl ) as DebitAmountInGlobalCrcy,
cast( 0 as fis_cr_ksl ) as CreditAmountInGlobalCrcy,
cast( 0 as fis_dr_osl ) as DebitAmountInFreeDfndCrcy1,
cast( 0 as fis_cr_osl ) as CreditAmountInFreeDfndCrcy1,
cast( 0 as fis_dr_vsl ) as DebitAmountInFreeDfndCrcy2,
cast( 0 as fis_cr_vsl ) as CreditAmountInFreeDfndCrcy2,
cast( 0 as fis_dr_bsl ) as DebitAmountInFreeDfndCrcy3,
cast( 0 as fis_cr_bsl ) as CreditAmountInFreeDfndCrcy3,
cast( 0 as fis_dr_csl ) as DebitAmountInFreeDfndCrcy4,
cast( 0 as fis_cr_csl ) as CreditAmountInFreeDfndCrcy4,
cast( 0 as fis_dr_dsl ) as DebitAmountInFreeDfndCrcy5,
cast( 0 as fis_cr_dsl ) as CreditAmountInFreeDfndCrcy5,
cast( 0 as fis_dr_esl ) as DebitAmountInFreeDfndCrcy6,
cast( 0 as fis_cr_esl ) as CreditAmountInFreeDfndCrcy6,
cast( 0 as fis_dr_fsl ) as DebitAmountInFreeDfndCrcy7,
cast( 0 as fis_cr_fsl ) as CreditAmountInFreeDfndCrcy7,
cast( 0 as fis_dr_gsl ) as DebitAmountInFreeDfndCrcy8,
cast( 0 as fis_cr_gsl ) as CreditAmountInFreeDfndCrcy8,
I_GLAccountLineItem.DebitAmountInCoCodeCrcy as ComprnDebitAmtInCoCodeCrcy,
I_GLAccountLineItem.CreditAmountInCoCodeCrcy as ComprnCreditAmtInCoCodeCrcy,
I_GLAccountLineItem.DebitAmountInTransCrcy as ComprnDebitAmtInTransCrcy,
I_GLAccountLineItem.CreditAmountInTransCrcy as ComprnCreditAmtInTransCrcy,
I_GLAccountLineItem.DebitAmountInBalanceTransCrcy as ComprnDebitAmtInBalTransCrcy,
I_GLAccountLineItem.CreditAmountInBalanceTransCrcy as ComprnCreditAmtInBalTransCrcy,
I_GLAccountLineItem.DebitAmountInGlobalCrcy as ComprnDebitAmtInGlobalCrcy,
I_GLAccountLineItem.CreditAmountInGlobalCrcy as ComprnCreditAmtInGlobalCrcy,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy1 as ComprnDebitAmtInFreeDfndCrcy1,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy1 as ComprnCreditAmtInFreeDfndCrcy1,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy2 as ComprnDebitAmtInFreeDfndCrcy2,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy2 as ComprnCreditAmtInFreeDfndCrcy2,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy3 as ComprnDebitAmtInFreeDfndCrcy3,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy3 as ComprnCreditAmtInFreeDfndCrcy3,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy4 as ComprnDebitAmtInFreeDfndCrcy4,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy4 as ComprnCreditAmtInFreeDfndCrcy4,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy5 as ComprnDebitAmtInFreeDfndCrcy5,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy5 as ComprnCreditAmtInFreeDfndCrcy5,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy6 as ComprnDebitAmtInFreeDfndCrcy6,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy6 as ComprnCreditAmtInFreeDfndCrcy6,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy7 as ComprnDebitAmtInFreeDfndCrcy7,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy7 as ComprnCreditAmtInFreeDfndCrcy7,
I_GLAccountLineItem.DebitAmountInFreeDefinedCrcy8 as ComprnDebitAmtInFreeDfndCrcy8,
I_GLAccountLineItem.CreditAmountInFreeDefinedCrcy8 as ComprnCreditAmtInFreeDfndCrcy8,
////////////////////////////////////
// NEW
////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Fields from associations
///////////////////////////////////////////////////////////////////////////////
// CalendarYear,
// @ObjectModel.foreignKey.association: '_CalendarQuarter'
// CalendarQuarter,
// CalendarYearQuarter,
// @ObjectModel.foreignKey.association: '_CalendarMonth'
// CalendarMonth,
// @ObjectModel.foreignKey.association: '_CalendarYearMonth'
// CalendarYearMonth,
// CalendarWeek,
// CalendarYearWeek,
I_GLAccountLineItem._FiscalCalendarDate.FiscalQuarter as FiscalQuarter,
I_GLAccountLineItem._FiscalCalendarDate.FiscalWeek as FiscalWeek,
I_GLAccountLineItem._FiscalCalendarDate.FiscalYearQuarter as FiscalYearQuarter,
I_GLAccountLineItem._FiscalCalendarDate.FiscalYearWeek as FiscalYearWeek,
///////////////////////////////////////////////////////////////////////////////
// Associations
///////////////////////////////////////////////////////////////////////////////
I_GLAccountLineItem._JournalEntry,
I_GLAccountLineItem._CompanyCode,
I_GLAccountLineItem._FiscalYear,
// Do not use. DEPRECATED! Use instead _FiscalPeriodForVariant.
// _FiscalPeriod,
// _FiscalPeriodForVariant,
// Do not use. DEPRECATED! Use instead _LedgerFiscalYearForVariant.
// _LedgerFiscalYear,
// _LedgerFiscalYearForVariant,
// _FiscalYearVariant,
// Do not use. DEPRECATED! Use instead _FiscalYearPeriodForVariant.
// _FiscalYearPeriod,
_GLRecordType,
I_GLAccountLineItem._ControllingArea,
I_GLAccountLineItem._BalanceTransactionCurrency,
I_GLAccountLineItem._TransactionCurrency,
I_GLAccountLineItem._CompanyCodeCurrency,
I_GLAccountLineItem._GlobalCurrency,
I_GLAccountLineItem._FreeDefinedCurrency1,
I_GLAccountLineItem._FreeDefinedCurrency2,
I_GLAccountLineItem._FreeDefinedCurrency3,
I_GLAccountLineItem._FreeDefinedCurrency4,
I_GLAccountLineItem._FreeDefinedCurrency5,
I_GLAccountLineItem._FreeDefinedCurrency6,
I_GLAccountLineItem._FreeDefinedCurrency7,
I_GLAccountLineItem._FreeDefinedCurrency8,
I_GLAccountLineItem._Segment,
I_GLAccountLineItem._ProfitCenter,
I_GLAccountLineItem._CurrentProfitCenter,
I_GLAccountLineItem._CostCenter,
I_GLAccountLineItem._CurrentCostCenter,
I_GLAccountLineItem._WBSElementBasicData,
I_GLAccountLineItem._ProjectBasicData,
I_GLAccountLineItem._ProjectNetwork,
I_GLAccountLineItem._InternalOrder,
I_GLAccountLineItem._Order,
I_GLAccountLineItem._BusinessArea,
I_GLAccountLineItem._FunctionalArea,
I_GLAccountLineItem._CostCtrActivityType,
I_GLAccountLineItem._CostAnalysisResource,
I_GLAccountLineItem._BusinessProcess,
I_GLAccountLineItem._OrderCategory,
// _ControllingObjectClass,
I_GLAccountLineItem._GLAccountInChartOfAccounts,
I_GLAccountLineItem._GLAccountInCompanyCode,
I_GLAccountLineItem._ChartOfAccounts,
I_GLAccountLineItem._AccountingDocumentType,
I_GLAccountLineItem._FinancialAccountType,
I_GLAccountLineItem._DebitCreditCode,
I_GLAccountLineItem._Product,
// _ProductGroup,
I_GLAccountLineItem._SoldProductGroup_2,
I_GLAccountLineItem._Plant,
I_GLAccountLineItem._Ledger,
I_GLAccountLineItem._SourceLedger,
I_GLAccountLineItem._Customer,
I_GLAccountLineItem._CustomerGroup,
I_GLAccountLineItem._Supplier,
I_GLAccountLineItem._SalesDocument,
I_GLAccountLineItem._SalesDocumentItem,
// _Order,
I_GLAccountLineItem._ServiceDocument,
I_GLAccountLineItem._ServiceDocumentItem,
I_GLAccountLineItem._PostingKey,
I_GLAccountLineItem._SubLedgerAccLineItemType,
I_GLAccountLineItem._AccountingDocumentCategory,
I_GLAccountLineItem._FinancialTransactionType,
I_GLAccountLineItem._BusinessTransactionType,
I_GLAccountLineItem._ReferenceDocumentType,
I_GLAccountLineItem._PredecessorReferenceDocType,
// _PartnerControllingObjectClass,
I_GLAccountLineItem._PartnerCostCenter,
I_GLAccountLineItem._PartnerProfitCenter,
I_GLAccountLineItem._PartnerBusinessArea,
I_GLAccountLineItem._PartnerFunctionalArea,
I_GLAccountLineItem._PartnerCompanyCode,
I_GLAccountLineItem._PartnerSegment,
I_GLAccountLineItem._PartnerCostCtrActivityType,
_PartnerOrder,
I_GLAccountLineItem._PartnerOrderCategory,
I_GLAccountLineItem._PartnerWBSElementBasicData,
I_GLAccountLineItem._PartnerProjectBasicData,
I_GLAccountLineItem._PartnerSalesDocument,
I_GLAccountLineItem._PartnerSalesDocumentItem,
I_GLAccountLineItem._PartnerBusinessProcess,
// _User,
I_GLAccountLineItem._EliminationProfitCenter,
//_ControllingObject,
// _ControllingDebitCreditCode,
I_GLAccountLineItem._GLAccountType,
I_GLAccountLineItem._OffsettingAccountType,
I_GLAccountLineItem._OffsettingChartOfAccounts,
//_OffsettingAccount,
I_GLAccountLineItem._OffsettingAccountWithBP,
I_GLAccountLineItem._AlternativeGLAccount,
//_SenderGLAccount,
I_GLAccountLineItem._CountryChartOfAccounts,
_CorporateGroupChartOfAccounts,
_CorporateGroupAccount,
I_GLAccountLineItem._PurchasingDocument,
I_GLAccountLineItem._PurchasingDocumentItem,
I_GLAccountLineItem._SpecialGLCode,
I_GLAccountLineItem._TaxCode,
I_GLAccountLineItem._HouseBank,
I_GLAccountLineItem._HouseBankAccount,
I_GLAccountLineItem._ClearingJrnlEntryFiscalYear,
I_GLAccountLineItem._ClearingJournalEntry,
I_GLAccountLineItem._ClearingAccountingDocument,
I_GLAccountLineItem._MasterFixedAsset,
I_GLAccountLineItem._FixedAsset,
I_GLAccountLineItem._GroupMasterFixedAsset,
I_GLAccountLineItem._GroupFixedAsset,
I_GLAccountLineItem._MovementCategory,
I_GLAccountLineItem._AssetTransactionType,
// _InventorySpecialStockValnType,
I_GLAccountLineItem._InventorySpecialStockType,
I_GLAccountLineItem._InventorySpclStkSalesDocument,
I_GLAccountLineItem._InventorySpclStkSalesDocItm,
I_GLAccountLineItem._InvtrySpclStkWBSElmntBscData,
I_GLAccountLineItem._InventorySpecialStockSupplier,
I_GLAccountLineItem._InventoryValuationType,
I_GLAccountLineItem._OriginSenderObject,
I_GLAccountLineItem._OriginCostCenter,
I_GLAccountLineItem._OriginProfitCenter,
I_GLAccountLineItem._OriginCostCtrActivityType,
I_GLAccountLineItem._CostOriginGroup,
//_RelatedNetworkActivity,
//_PartnerProjectNetworkActivity,
I_GLAccountLineItem._BillingDocumentType,
I_GLAccountLineItem._SalesOrganization,
I_GLAccountLineItem._DistributionChannel,
I_GLAccountLineItem._CustomerSupplierCountry,
I_GLAccountLineItem._SalesDistrict,
I_GLAccountLineItem._BillToParty,
I_GLAccountLineItem._ShipToParty,
I_GLAccountLineItem._SoldProduct,
I_GLAccountLineItem._FundsCenter,
I_GLAccountLineItem._Fund,
I_GLAccountLineItem._PartnerFund,
I_GLAccountLineItem._FinancialManagementArea,
//_FundedProgram
I_GLAccountLineItem._BudgetPeriod,
I_GLAccountLineItem._LogicalSystem,
I_GLAccountLineItem._OperatingConcern,
I_GLAccountLineItem._PartnerCompany,
// _PurReqValuationArea,
I_GLAccountLineItem._WorkCenter
}
where I_GLAccountLineItem.FiscalYearPeriod between $parameters.P_ComprnFromFiscalYearPeriod and $parameters.P_ComprnToFiscalYearPeriod
and ( I_GLAccountLineItem.FiscalPeriod <> '000'
or ( I_GLAccountLineItem.FiscalYearPeriod = $parameters.P_ComprnFromFiscalYearPeriod and I_GLAccountLineItem.AccountingDocumentCategory = 'C' and I_GLAccountLineItem.FiscalPeriod = '000' ) /* get BCF only in case it is the BCF of the year selection starts from */
or ( I_GLAccountLineItem.GLRecordType = '5' and I_GLAccountLineItem.AccountingDocumentCategory = 'J') ) /* get year end and opening postings */
//// Alternative would be to select BCF always. As we have to consider BCF with non defined PostingDate where could be like this.
//// As also the FiscalYearPeriod Range is derived it is not possible that a BCF outside the FiscalYearPeriod Range is selected.
//where I_GLAccountLineItem.FiscalYearPeriod between $parameters.P_ComprnFromFiscalYearPeriod and $parameters.P_ComprnToFiscalYearPeriod
//and ( I_GLAccountLineItem.PostingDate between $parameters.P_ComprnFromPostingDate and $parameters.P_ComprnToPostingDate or I_GLAccountLineItem.PostingDate = '00000000' )
// or I_GLAccountLineItem.FiscalYearPeriod = $parameters.P_ComprnFromFiscalYearPeriod // get BCF only in case it is the BCF of the year selection starts from
// or ( I_GLAccountLineItem.GLRecordType = '5' and I_GLAccountLineItem.AccountingDocumentCategory = 'J') ) // get year end and opening postings