P_RblsItmForKeyDteDuePerd2

DDL: P_RBLSITMFORKEYDTEDUEPERD2 SQL: PRBLSKDATDUE2 Type: view COMPOSITE

P_RblsItmForKeyDteDuePerd2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_RblsItmForKeyDteDuePerd1) and exposes 33 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, FiscalYear.

Data Sources (1)

SourceAliasJoin Type
P_RblsItmForKeyDteDuePerd1 P_RblsItmForKeyDteDuePerd1 from

Parameters (2)

NameTypeDefault
P_KeyDate sydate
P_PeriodType fis_period_type

Annotations (5)

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

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY AccountingDocumentItem AccountingDocumentItem
KEY FiscalYear FiscalYear
ReportingPeriodStartDate ReportingPeriodStartDate
ReportingPeriodEndDate ReportingPeriodEndDate
InvoiceReference InvoiceReference
InvoiceItemReference InvoiceItemReference
InvoiceReferenceFiscalYear InvoiceReferenceFiscalYear
ClearingDate ClearingDate
PostingDate PostingDate
DocumentDate DocumentDate
FinancialAccountType FinancialAccountType
DebitCreditCode DebitCreditCode
Customer Customer
FollowOnDocumentType FollowOnDocumentType
SpecialGLCode SpecialGLCode
GLAccount GLAccount
CompanyCodeCurrency CompanyCodeCurrency
BusinessArea BusinessArea
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency
OpenDueAmountInDisplayCrcy OpenDueAmountInDisplayCrcy
DisplayCurrency DisplayCurrency
NetDueDate NetDueDate
RefInvcDocumentDate
RefInvcFinancialAccountType
RefInvcDebitCreditCode
RefInvcNetPaymentDays
RefInvcCashDiscount2Days
RefInvcCashDiscount1Days
RefInvcDueCalculationBaseDate
RefInvcInvoiceReference
RefInvcNetDueDate
@AbapCatalog.sqlViewName: 'PRBLSKDATDUE2'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RblsItmForKeyDteDuePerd2
  with parameters
    P_KeyDate    : sydate,
    P_PeriodType : fis_period_type

  as select from P_RblsItmForKeyDteDuePerd1( P_KeyDate: :P_KeyDate,
                                          P_PeriodType: :P_PeriodType )

{
  key CompanyCode,
  key AccountingDocument,
  key AccountingDocumentItem,
  key FiscalYear,
      ReportingPeriodStartDate,
      ReportingPeriodEndDate,
      InvoiceReference,
      InvoiceItemReference,
      InvoiceReferenceFiscalYear,
      ClearingDate,
      PostingDate,
      DocumentDate,
      FinancialAccountType,
      DebitCreditCode,
      Customer,
      FollowOnDocumentType,
      SpecialGLCode,
      GLAccount,
      @Semantics.currencyCode: true
      CompanyCodeCurrency,
      BusinessArea,
      
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      AmountInCompanyCodeCurrency,
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      OpenDueAmountInDisplayCrcy,
      @Semantics.currencyCode: true
      DisplayCurrency,

      NetDueDate,

      cast( '00000000' as fis_bldat )  as RefInvcDocumentDate,
      cast( '' as farp_koart )         as RefInvcFinancialAccountType,
      cast( '' as fis_shkzg )          as RefInvcDebitCreditCode,
      cast( 0 as farp_dzbd3t )         as RefInvcNetPaymentDays,
      cast( 0 as farp_dzbd2t )         as RefInvcCashDiscount2Days,
      cast( 0 as farp_dzbd1t )         as RefInvcCashDiscount1Days,
      cast( '00000000' as fis_dzfbdt ) as RefInvcDueCalculationBaseDate,
      cast( '' as farp_rebzg )         as RefInvcInvoiceReference,
      cast( '00000000' as farp_netdt ) as RefInvcNetDueDate
}
where
        FollowOnDocumentType       = ''
  or    FollowOnDocumentType       = 'V'
  or    FollowOnDocumentType       = 'P'
  or    InvoiceReference           = 'V' // V is a valid invoice reference value for credit memos via e.g. transaction FB75 (see documentation of DTEL REBZG)

  or(
        InvoiceReference           = ''
    and InvoiceItemReference       = '000' // it is required to specify an invoice item reference (also for join) in contrast to documentation of DTEL REBZZ

    and InvoiceReferenceFiscalYear = '0000' // it is required to specify an invoice item reference (also for join) in contrast to documentation of DTEL REBZJ

  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_RBLSITMFORKEYDTEDUEPERD1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/