P_RblsItmForKeyDteDuePerd1b

DDL: P_RBLSITMFORKEYDTEDUEPERD1B SQL: PRBLSKDATDUE1B Type: view COMPOSITE Package: FINS_FIS_APAR_APPS

Cash Collection Tracker 1

P_RblsItmForKeyDteDuePerd1b is a Composite CDS View that provides data about "Cash Collection Tracker 1" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItemRawData) and exposes 29 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, PostingFiscalYear. It has 1 association to related views. Part of development package FINS_FIS_APAR_APPS.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItemRawData Receivables from

Parameters (3)

NameTypeDefault
P_KeyDate sydate
P_PeriodType fis_period_type
P_CompanyCode fis_bukrs

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _CalendarDate _CalendarDate.CalendarDate = $parameters.P_KeyDate

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PRBLSKDATDUE1B view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_GLAccountLineItemRawData CompanyCode
KEY AccountingDocument I_GLAccountLineItemRawData AccountingDocument
KEY AccountingDocumentItem I_GLAccountLineItemRawData AccountingDocumentItem
KEY PostingFiscalYear I_GLAccountLineItemRawData FiscalYear
InvoiceReference I_GLAccountLineItemRawData InvoiceReference
InvoiceItemReference I_GLAccountLineItemRawData InvoiceItemReference
InvoiceReferenceFiscalYear I_GLAccountLineItemRawData InvoiceReferenceFiscalYear
ClearingDate I_GLAccountLineItemRawData ClearingDate
PostingDate I_GLAccountLineItemRawData PostingDate
DocumentDate I_GLAccountLineItemRawData DocumentDate
FinancialAccountType I_GLAccountLineItemRawData FinancialAccountType
DebitCreditCode I_GLAccountLineItemRawData DebitCreditCode
Customer I_GLAccountLineItemRawData Customer
FollowOnDocumentType I_GLAccountLineItemRawData FollowOnDocumentType
NetDueDate I_GLAccountLineItemRawData NetDueDate
SpecialGLCode I_GLAccountLineItemRawData SpecialGLCode
GLAccount I_GLAccountLineItemRawData GLAccount
CompanyCodeCurrency I_GLAccountLineItemRawData CompanyCodeCurrency
FunctionalCurrency I_GLAccountLineItemRawData FunctionalCurrency
GlobalCurrency I_GLAccountLineItemRawData GlobalCurrency
AmountInCompanyCodeCurrency I_GLAccountLineItemRawData AmountInCompanyCodeCurrency
AmountInFunctionalCurrency I_GLAccountLineItemRawData AmountInFunctionalCurrency
AmountInGlobalCurrency I_GLAccountLineItemRawData AmountInGlobalCurrency
PostingKey I_GLAccountLineItemRawData PostingKey
AccountingDocumentCategory I_GLAccountLineItemRawData AccountingDocumentCategory
BusinessArea I_GLAccountLineItemRawData BusinessArea
FiscalPeriod I_GLAccountLineItemRawData FiscalPeriod
CalendarYearendasReportingYear
CalendarWeekendasReportingPeriod
@AbapCatalog.sqlViewName: 'PRBLSKDATDUE1B'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter:true 
@AbapCatalog.preserveKey:true 
define view P_RblsItmForKeyDteDuePerd1b
  with parameters
    P_KeyDate    : sydate,
    P_PeriodType : fis_period_type,
    P_CompanyCode : fis_bukrs

  as select from I_GLAccountLineItemRawData as Receivables

  left outer to one join I_FiscCalendarDateForCompCode as _FiscalPeriod on  _FiscalPeriod.CompanyCode  = Receivables.CompanyCode
                                                                       and _FiscalPeriod.CalendarDate = $parameters.P_KeyDate
  association [0..1] to I_CalendarDate                as _CalendarDate on  _CalendarDate.CalendarDate = $parameters.P_KeyDate
{
  key Receivables.CompanyCode,
  key Receivables.AccountingDocument,
  key Receivables.AccountingDocumentItem,
  key Receivables.FiscalYear as PostingFiscalYear,
      Receivables.InvoiceReference,
      Receivables.InvoiceItemReference,
      Receivables.InvoiceReferenceFiscalYear,
      Receivables.ClearingDate,
      Receivables.PostingDate,
      Receivables.DocumentDate,
//      Receivables.NetPaymentDays,

//      Receivables.CashDiscount2Days,

//      Receivables.CashDiscount1Days,

//      Receivables.DueCalculationBaseDate,

      Receivables.FinancialAccountType,
      Receivables.DebitCreditCode,
      Receivables.Customer,
      Receivables.FollowOnDocumentType,
      Receivables.NetDueDate,
      Receivables.SpecialGLCode,
      Receivables.GLAccount,
      Receivables.CompanyCodeCurrency,
      Receivables.FunctionalCurrency,
      Receivables.GlobalCurrency,
      Receivables.AmountInCompanyCodeCurrency,
      Receivables.AmountInFunctionalCurrency,
      Receivables.AmountInGlobalCurrency,
      Receivables.PostingKey,
      Receivables.AccountingDocumentCategory,
      Receivables.BusinessArea,
      Receivables.FiscalPeriod,

      case $parameters.P_PeriodType
           when 'F' then _FiscalPeriod.FiscalYear
           when 'M' then _CalendarDate.CalendarYear
           when 'W' then _CalendarDate.CalendarYear
      end as ReportingYear,

      case $parameters.P_PeriodType
           when 'F' then _FiscalPeriod.FiscalPeriod
           when 'M' then cast(_CalendarDate.CalendarMonth as char3)
           when 'W' then _CalendarDate.CalendarWeek
      end as ReportingPeriod,

      case $parameters.P_PeriodType
           when 'F' then _FiscalPeriod.FiscalPeriodStartDate
           when 'M' then _CalendarDate.FirstDayOfMonthDate
           when 'W' then _CalendarDate.FirstDayOfWeekDate
      end as ReportingPeriodStartDate,

      case $parameters.P_PeriodType
           when 'F' then _FiscalPeriod.FiscalPeriodEndDate
           when 'M' then dats_add_days(dats_add_months(_CalendarDate.FirstDayOfMonthDate, 1, 'UNCHANGED'), -1, 'UNCHANGED')
           when 'W' then dats_add_days(_CalendarDate.FirstDayOfWeekDate, 7, 'UNCHANGED')
      end as ReportingPeriodEndDate
}
where Receivables.FinancialAccountType = 'D'
  and Receivables.AccountingDocumentCategory =  '' 
  and Receivables.CompanyCode = $parameters.P_CompanyCode