P_RblsItmForKeyDteDuePerd1

DDL: P_RBLSITMFORKEYDTEDUEPERD1 SQL: PRBLSKDATDUE1 Type: view COMPOSITE Package: FINS_FIS_APAR_APPS

Cash Collection Tracker 1

P_RblsItmForKeyDteDuePerd1 is a Composite CDS View that provides data about "Cash Collection Tracker 1" in SAP S/4HANA. It reads from 2 data sources (P_RblsItmForKeyDteRepPeriod, I_OperationalAcctgDocItem) and exposes 34 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, FiscalYear. Part of development package FINS_FIS_APAR_APPS.

Data Sources (2)

SourceAliasJoin Type
P_RblsItmForKeyDteRepPeriod P_RblsItmForKeyDteRepPeriod from
I_OperationalAcctgDocItem Receivables inner

Parameters (2)

NameTypeDefault
P_KeyDate bzdat
P_PeriodType fis_period_type

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PRBLSKDATDUE1 view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
InvoiceReference I_OperationalAcctgDocItem InvoiceReference
InvoiceItemReference I_OperationalAcctgDocItem InvoiceItemReference
InvoiceReferenceFiscalYear I_OperationalAcctgDocItem InvoiceReferenceFiscalYear
ClearingDate I_OperationalAcctgDocItem ClearingDate
PostingDate I_OperationalAcctgDocItem PostingDate
DocumentDate I_OperationalAcctgDocItem DocumentDate
FinancialAccountType I_OperationalAcctgDocItem FinancialAccountType
DebitCreditCode I_OperationalAcctgDocItem DebitCreditCode
Customer I_OperationalAcctgDocItem Customer
FollowOnDocumentType I_OperationalAcctgDocItem FollowOnDocumentType
NetDueDate I_OperationalAcctgDocItem NetDueDate
SpecialGLCode I_OperationalAcctgDocItem SpecialGLCode
GLAccount I_OperationalAcctgDocItem GLAccount
DisplayCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
FunctionalCurrency I_OperationalAcctgDocItem FunctionalCurrency
TransactionCurrency I_OperationalAcctgDocItem TransactionCurrency
OpenDueAmountInDisplayCrcy I_OperationalAcctgDocItem AmountInCompanyCodeCurrency
AmountInCompanyCodeCurrency I_OperationalAcctgDocItem AmountInCompanyCodeCurrency
AccountingDocumentCategory I_OperationalAcctgDocItem AccountingDocumentCategory
AmountInFunctionalCurrency I_OperationalAcctgDocItem AmountInFunctionalCurrency
AmountInTransactionCurrency I_OperationalAcctgDocItem AmountInTransactionCurrency
PostingKey I_OperationalAcctgDocItem PostingKey
IsUsedInPaymentTransaction I_OperationalAcctgDocItem IsUsedInPaymentTransaction
BusinessArea I_OperationalAcctgDocItem BusinessArea
FiscalPeriod I_OperationalAcctgDocItem FiscalPeriod
ReportingPeriodStartDate Period ReportingPeriodStartDate
ReportingPeriodEndDate Period ReportingPeriodEndDate
ReportingPeriod Period ReportingPeriod
ReportingYear Period ReportingYear
@AbapCatalog.sqlViewName: 'PRBLSKDATDUE1'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RblsItmForKeyDteDuePerd1                 
with parameters
    P_KeyDate    : bzdat,
    P_PeriodType : fis_period_type
    
  as select from  P_RblsItmForKeyDteRepPeriod( P_KeyDate: :P_KeyDate,
                                         P_PeriodType: :P_PeriodType ) as Period
                                         
  inner join I_OperationalAcctgDocItem as Receivables
  on Period.CompanyCode = Receivables.CompanyCode                                                          
{
  key Receivables.CompanyCode,
  key Receivables.AccountingDocument,
  key Receivables.AccountingDocumentItem,
  key Receivables.FiscalYear,
      Receivables.InvoiceReference,
      Receivables.InvoiceItemReference,
      Receivables.InvoiceReferenceFiscalYear,
      Receivables.ClearingDate,
      Receivables.PostingDate,
      Receivables.DocumentDate,
      Receivables.FinancialAccountType,
      Receivables.DebitCreditCode,
      Receivables.Customer,
      Receivables.FollowOnDocumentType,
      Receivables.NetDueDate,
      Receivables.SpecialGLCode,
      Receivables.GLAccount,
      Receivables.CompanyCodeCurrency as DisplayCurrency,
      Receivables.CompanyCodeCurrency,
      Receivables.FunctionalCurrency,
      Receivables.TransactionCurrency,
      Receivables.AmountInCompanyCodeCurrency as OpenDueAmountInDisplayCrcy,
      Receivables.AmountInCompanyCodeCurrency,
      Receivables.AccountingDocumentCategory,
      Receivables.AmountInFunctionalCurrency,
      Receivables.AmountInTransactionCurrency,
      Receivables.PostingKey,
      Receivables.IsUsedInPaymentTransaction,
      Receivables.BusinessArea,
      Receivables.FiscalPeriod, 
      
      Period.ReportingPeriodStartDate,
      Period.ReportingPeriodEndDate,
      Period.ReportingPeriod,
      Period.ReportingYear
}

where
// receivables

  Receivables.FinancialAccountType = 'D'
  and Receivables.AccountingDocumentCategory =  ''  
  and Receivables.IsUsedInPaymentTransaction = ' ' 
  and  
  ( 
  //  Overdue items

  ( Receivables.NetDueDate  <  Period.ReportingPeriodStartDate  
    and ( Receivables.ClearingDate = '00000000' or Receivables.ClearingDate >= Period.ReportingPeriodStartDate ) )
//  Due this period  

  or
  ( Receivables.NetDueDate  >= Period.ReportingPeriodStartDate
    and Receivables.NetDueDate  <= Period.ReportingPeriodEndDate
    and Receivables.PostingDate < Period.ReportingPeriodStartDate )
  or 
//  New Invoices

  (     Receivables.PostingDate >= Period.ReportingPeriodStartDate 
    and Receivables.PostingDate <= Period.ReportingPeriodEndDate 
    and Receivables.NetDueDate  >= Period.ReportingPeriodStartDate 
    and Receivables.NetDueDate  <= Period.ReportingPeriodEndDate
    and Receivables.PostingDate <= $parameters.P_KeyDate
    //and  _PostingKey.IsUsedInPaymentTransaction = ' ' 

    ) 
  )