视图名称:应收账龄表 I_ARJrnlEntrItmAgingGrid
视图类型:参数
视图代码:
点击查看代码
@AbapCatalog.sqlViewName: 'IARJEITMAGGRID'
@AbapCatalog.compiler.compareFilter:true
@AbapCatalog.preserveKey:true
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Aging Grid of Accounts Receivables'
@Analytics: { dataCategory: #CUBE }
@Analytics.internalName: #LOCAL // released with Cloud 1808 and OP 1809 hence no design studio usage before
@Search.searchable: false // I_Region is annotated as true, hence this new must have an annotation for searchable
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions:true
@AccessControl.authorizationCheck:#CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER, #CDS_MODELING_DATA_SOURCE ]
@AccessControl.personalData.blocking: #REQUIRED
define view I_ARJrnlEntrItmAgingGridwith parameters@Environment.systemField: #SYSTEM_DATEP_KeyDate : sydate,P_NetDueInterval1InDays : farp_net_due_interval1,P_NetDueInterval2InDays : farp_net_due_interval2,P_NetDueInterval3InDays : farp_net_due_interval3,P_DisplayCurrency : vdm_v_display_currency,P_ExchangeRateType : kurstas select from P_ARJrnlEntrItmAgingGrid4(P_KeyDate: :P_KeyDate,P_NetDueInterval1InDays: :P_NetDueInterval1InDays,P_NetDueInterval2InDays: :P_NetDueInterval2InDays,P_NetDueInterval3InDays: :P_NetDueInterval3InDays)association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYearand $projection.CompanyCode = _FiscalYear.CompanyCodeassociation [1..1] to I_JournalEntry as _JournalEntry on $projection.CompanyCode = _JournalEntry.CompanyCodeand $projection.FiscalYear = _JournalEntry.FiscalYearand $projection.AccountingDocument = _JournalEntry.AccountingDocumentassociation [0..1] to I_CompanyCode as _Company on _Company.CompanyCode = $projection.CompanyCodeassociation [0..1] to I_Customer as _Customer on _Customer.Customer = $projection.Customerassociation [0..1] to I_FinancialAccountType as _FinancialAccountType on _FinancialAccountType.FinancialAccountType = $projection.FinancialAccountTypeassociation [0..1] to I_CustomerCompany as _CustomerCompany on _CustomerCompany.CompanyCode = $projection.CompanyCodeand _CustomerCompany.Customer = $projection.Customerassociation [0..1] to I_AccountingClerk as _AccountingClerk on _AccountingClerk.CompanyCode = $projection.CompanyCodeand _AccountingClerk.AccountingClerk = $projection.AccountingClerkassociation [0..1] to I_Country as _CustomerCountry on _CustomerCountry.Country = $projection.CustomerCountryassociation [0..1] to I_Region as _CustomerRegion on _CustomerRegion.Region = $projection.CustomerRegionand _CustomerRegion.Country = $projection.CustomerCountryassociation [0..1] to I_Currency as _DisplayCurrency on _DisplayCurrency.Currency = $projection.DisplayCurrencyassociation [0..1] to I_SpecialGLCode as _SpecialGLCode on _SpecialGLCode.SpecialGLCode = $projection.SpecialGLCodeand _SpecialGLCode.FinancialAccountType = 'D'association [0..1] to I_ChartOfAccounts as _ChartOfAccounts on _ChartOfAccounts.ChartOfAccounts = $projection.ChartOfAccountsassociation [0..1] to I_GLAccountInChartOfAccounts as _GLAccountInChartOfAccounts on _GLAccountInChartOfAccounts.ChartOfAccounts = $projection.ChartOfAccountsand _GLAccountInChartOfAccounts.GLAccount = $projection.GLAccountassociation [0..1] to I_GLAccountInChartOfAccounts as _ReconciliationAccount on _ReconciliationAccount.ChartOfAccounts = $projection.ChartOfAccountsand _ReconciliationAccount.GLAccount = $projection.ReconciliationAccountassociation [0..1] to I_CustomerAccountGroup as _CustomerAccountGroup on _CustomerAccountGroup.CustomerAccountGroup = $projection.CustomerAccountGroupassociation [0..1] to I_CustomerClassification as _CustomerClassification on _CustomerClassification.CustomerClassification = $projection.CustomerClassification
// association [0..*] to I_ProfitCenter as _ProfitCenter on _ProfitCenter.ProfitCenter = $projection.ProfitCenter
// and _ProfitCenter.ControllingArea = $projection.ControllingAreaassociation [0..1] to I_ProfitCenter as _CurrentProfitCenter on $projection.ControllingArea = _CurrentProfitCenter.ControllingAreaand $projection.ProfitCenter = _CurrentProfitCenter.ProfitCenterand _CurrentProfitCenter.ValidityStartDate <= $session.system_dateand _CurrentProfitCenter.ValidityEndDate >= $session.system_dateassociation [0..1] to I_ControllingArea as _ControllingArea on _ControllingArea.ControllingArea = $projection.ControllingArea{@ObjectModel.foreignKey.association: '_Company'key CompanyCode,@ObjectModel.foreignKey.association: '_FiscalYear'key FiscalYear,@ObjectModel.foreignKey.association: '_JournalEntry'key AccountingDocument,key LedgerGLLineItem,AccountingDocumentItem,
// will be sorted as char (- 1, -10, -100, -2, -20, ...) as of now hence useless
// @DefaultAggregation: #NONE
// cast( NetDueArrearsDays as zmm_verzn_char ) as NetDueArrearsDays,@ObjectModel.foreignKey.association: '_FinancialAccountType'cast( 'D' as fis_koart ) as FinancialAccountType,@ObjectModel.foreignKey.association: '_Customer'Customer,@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'GLAccount,@ObjectModel.foreignKey.association: '_SpecialGLCode'SpecialGLCode,
// foreign key 0..* will cause problem with SADL calling AE (not with AE itself which assumes and searches in view definition for time restrictions)
// @ObjectModel.foreignKey.association: '_ProfitCenter'ProfitCenter,BusinessArea,Segment,@ObjectModel.foreignKey.association: '_ControllingArea'ControllingArea,BillingDocument,AssignmentReference,cast(case when NumberOfParameters = 3 and NetDueInterval = MaxNetDueIntervalInDays then CONCAT_WITH_SPACE('H.',CONCAT_WITH_SPACE('>', cast(PosNetDueInterval3InDays as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = PosNetDueInterval3InDays then CONCAT_WITH_SPACE('G.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(PosNetDueInterval2InDays + 1 as abap.char(20)), '-',1), cast(PosNetDueInterval3InDays as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = PosNetDueInterval2InDays then CONCAT_WITH_SPACE('F.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(PosNetDueInterval1InDays + 1 as abap.char(20)), '-',1), cast(PosNetDueInterval2InDays as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = PosNetDueInterval1InDays then CONCAT_WITH_SPACE('E.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE('1','-',1), cast(PosNetDueInterval1InDays as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = 0 then CONCAT_WITH_SPACE('D.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval1InDays as abap.char(20)), '-',1), '0',1),1)when NumberOfParameters = 3 and NetDueInterval = NegNetDueInterval1InDays then CONCAT_WITH_SPACE('C.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval2InDays as abap.char(20)), '-',1), cast(NegNetDueInterval1InDays - 1 as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = NegNetDueInterval2InDays then CONCAT_WITH_SPACE('B.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval3InDays as abap.char(20)), '-',1), cast(NegNetDueInterval2InDays - 1 as abap.char(20)),1),1)when NumberOfParameters = 3 and NetDueInterval = NegNetDueInterval3InDays then CONCAT_WITH_SPACE('A.',CONCAT_WITH_SPACE('<', cast(NegNetDueInterval3InDays as abap.char(20)),1),1)when NumberOfParameters = 2 and NetDueInterval = MaxNetDueIntervalInDays then CONCAT_WITH_SPACE('F.',CONCAT_WITH_SPACE('>', cast(PosNetDueInterval2InDays as abap.char(20)),1),1)when NumberOfParameters = 2 and NetDueInterval = PosNetDueInterval2InDays then CONCAT_WITH_SPACE('E.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(PosNetDueInterval1InDays + 1 as abap.char(20)), '-',1), cast(PosNetDueInterval2InDays as abap.char(20)),1),1)when NumberOfParameters = 2 and NetDueInterval = PosNetDueInterval1InDays then CONCAT_WITH_SPACE('D.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE('1', '-',1), cast(PosNetDueInterval1InDays as abap.char(20)),1),1)when NumberOfParameters = 2 and NetDueInterval = 0 then CONCAT_WITH_SPACE('C.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval1InDays as abap.char(20)), '-',1), '0',1),1)when NumberOfParameters = 2 and NetDueInterval = NegNetDueInterval1InDays then CONCAT_WITH_SPACE('B.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval2InDays as abap.char(20)), '-',1), cast(NegNetDueInterval1InDays - 1 as abap.char(20)),1),1)when NumberOfParameters = 2 and NetDueInterval = NegNetDueInterval2InDays then CONCAT_WITH_SPACE('A.',CONCAT_WITH_SPACE('<', cast(NegNetDueInterval2InDays as abap.char(20)),1),1)when NumberOfParameters = 1 and NetDueInterval = MaxNetDueIntervalInDays then CONCAT_WITH_SPACE('D.',CONCAT_WITH_SPACE('>', cast(PosNetDueInterval1InDays as abap.char(20)),1),1)when NumberOfParameters = 1 and NetDueInterval = PosNetDueInterval1InDays then CONCAT_WITH_SPACE('C.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE('1', '-',1), cast(PosNetDueInterval1InDays as abap.char(20)),1),1)when NumberOfParameters = 1 and NetDueInterval = 0 then CONCAT_WITH_SPACE('B.',CONCAT_WITH_SPACE(CONCAT_WITH_SPACE(cast(NegNetDueInterval1InDays as abap.char(20)),'-',1),'0',1),1)when NumberOfParameters = 1 and NetDueInterval = NegNetDueInterval1InDays then CONCAT_WITH_SPACE('A.',CONCAT_WITH_SPACE('<', cast(NegNetDueInterval1InDays as abap.char(20)),1),1)when NumberOfParameters = 0 and NetDueInterval = MaxNetDueIntervalInDays then 'A. > 0'when NumberOfParameters = 0 and NetDueInterval = 0 then 'B. <= 0'else 'ERROR' // dummyend as farp_netdue_intvl_text ) as NetDueIntervalText,@ObjectModel.foreignKey.association: '_CustomerCountry'cast( _Customer._StandardAddress._Country.Country as farp_land1 ) as CustomerCountry,@ObjectModel.foreignKey.association: '_CustomerRegion'_Customer._StandardAddress._Region.Region as CustomerRegion,@ObjectModel.foreignKey.association: '_AccountingClerk'cast( _CustomerCompany.AccountingClerk as farp_busab ) as AccountingClerk,@ObjectModel.foreignKey.association: '_ChartOfAccounts'cast( _Company.ChartOfAccounts as fis_ktopl ) as ChartOfAccounts,@ObjectModel.foreignKey.association: '_ReconciliationAccount'cast( _CustomerCompany.ReconciliationAccount as farp_akont ) as ReconciliationAccount,// fields for authorization checks via DCLcast( _Customer.AuthorizationGroup as fis_customer_basic_auth_grp ) as CustomerBasicAuthorizationGrp,_CustomerCompany.AuthorizationGroup as CustomerFinsAuthorizationGrp,@ObjectModel.foreignKey.association: '_CustomerAccountGroup'_Customer.CustomerAccountGroup as CustomerAccountGroup,@ObjectModel.foreignKey.association: '_CustomerClassification'_Customer.CustomerClassification as CustomerClassification,@Semantics.currencyCode:true@ObjectModel.foreignKey.association: '_DisplayCurrency'cast(:P_DisplayCurrency as vdm_v_display_currency) as DisplayCurrency,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => AmountInCompanyCodeCurrency,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_total_amount_display_crcy ) as TotalAmountInDisplayCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => TotalNotOverdueAmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_tot_not_ovrd_amt_dspcrcy ) as TotalNotOvrdAmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => TotalOverdueAmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_total_overdue_amt_dspcrcy) as TotalOverdueAmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => NetDueIntvl1AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_netdue_intvl1_amt_dspcrcy ) as NetDueIntvl1AmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => NetDueIntvl2AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_netdue_intvl2_amt_dspcrcy ) as NetDueIntvl2AmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => NetDueIntvl3AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_netdue_intvl3_amt_dspcrcy ) as NetDueIntvl3AmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => NetDueIntvl4AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_netdue_intvl4_amt_dspcrcy ) as NetDueIntvl4AmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => FutureIntvl1AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_futdue_intvl1_amt_dspcrcy ) as FirstIntvlFutrDueAmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => FutureIntvl2AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_futdue_intvl2_amt_dspcrcy ) as SecondIntvlFutrDueAmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => FutureIntvl3AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_futdue_intvl3_amt_dspcrcy ) as ThirdIntvlFutrDueAmtInDspCrcy,@DefaultAggregation: #SUM@Semantics.amount.currencyCode: 'DisplayCurrency'cast( currency_conversion(amount => FutureIntvl4AmtInCoCodeCrcy,source_currency => CompanyCodeCurrency,target_currency => :P_DisplayCurrency,exchange_rate_date => :P_KeyDate,exchange_rate_type => :P_ExchangeRateType,// error_handling => 'FAIL_ON_ERROR',round => #CDSBoolean.true,decimal_shift => #CDSBoolean.true,decimal_shift_back => #CDSBoolean.true) as farp_futdue_lintvl_amt_dspcrcy ) as FourthIntvlFutrDueAmtInDspCrcy,_FiscalYear,_JournalEntry,_Company,_Customer,_CustomerCompany,_FinancialAccountType,_AccountingClerk,_CustomerCountry,_CustomerRegion,_SpecialGLCode,
// _ProfitCenter,_CurrentProfitCenter,_ControllingArea,_GLAccountInChartOfAccounts,_ReconciliationAccount,_ChartOfAccounts,_DisplayCurrency,_CustomerClassification,_CustomerAccountGroup
}
事务代码:参数
净额到期间隔 1:距离关键日期第一个间隔最大天数
全额付款到期间隔 2:距离关键日期第二个间隔最大天数
净额到期间隔 3:距离关键日期第二个间隔最大天数
汇率类型:使用的汇率类型
CDATE:关键日期
显示货币:显示的货币类型
视图结构:
字段名称 | 技术名称 |
---|---|
公司代码 | COMPANYCODE |
会计年度 | FISCALYEAR |
日记账分录 | ACCOUNTINGDOCUMENT |
日记账分录项目 | LEDGERGLLINEITEM |
过账视图项目 | ACCOUNTINGDOCUMENTITEM |
财务科目类型 | FINANCIALACCOUNTTYPE |
客户 | CUSTOMER |
总账科目 | GLACCOUNT |
特殊总账 | SPECIALGLCODE |
利润中心 | PROFITCENTER |
业务范围 | BUSINESSAREA |
段 | SEGMENT |
成本控制范围 | CONTROLLINGAREA |
开票凭证 | BILLINGDOCUMENT |
分配参考 | ASSIGNMENTREFERENCE |
全额付款到期日间隔 | NETDUEINTERVALTEXT |
国家/地区代码 | CUSTOMERCOUNTRY |
地区 | CUSTOMERREGION |
会计员 | ACCOUNTINGCLERK |
科目表 | CHARTOFACCOUNTS |
对账科目 | RECONCILIATIONACCOUNT |
客户基本权限组 | CUSTOMERBASICAUTHORIZATIONGRP |
权限 | CUSTOMERFINSAUTHORIZATIONGRP |
客户科目组 | CUSTOMERACCOUNTGROUP |
客户分类 | CUSTOMERCLASSIFICATION |
显示货币 | DISPLAYCURRENCY |
总金额 | TOTALAMOUNTINDISPLAYCRCY |
未来金额 | TOTALNOTOVRDAMTINDSPCRCY |
逾期金额 | TOTALOVERDUEAMTINDSPCRCY |
1 期到期期间金额 | NETDUEINTVL1AMTINDSPCRCY |
2 期到期期间金额 | NETDUEINTVL2AMTINDSPCRCY |
3 期到期期间金额 | NETDUEINTVL3AMTINDSPCRCY |
4 期到期期间金额 | NETDUEINTVL4AMTINDSPCRCY |
1 期到期期间未来金额 | FIRSTINTVLFUTRDUEAMTINDSPCRCY |
2 期到期期间未来金额 | SECONDINTVLFUTRDUEAMTINDSPCRCY |
3 期到期期间未来金额 | THIRDINTVLFUTRDUEAMTINDSPCRCY |
上一到期期间未来金额 | FOURTHINTVLFUTRDUEAMTINDSPCRCY |