P_StRpBPTaxItem

DDL: P_STRPBPTAXITEM SQL: PSTRPBPTAXITEM Type: view COMPOSITE

P_StRpBPTaxItem is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntryItem, I_Ledger) and exposes 11 fields.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntryItem I_JournalEntryItem from
I_Ledger I_Ledger inner

Annotations (7)

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

Fields (11)

KeyFieldSource TableSource FieldDescription
CompanyCode I_JournalEntryItem CompanyCode
FiscalYear I_JournalEntryItem FiscalYear
AccountingDocument I_JournalEntryItem AccountingDocument
FinancialAccountType I_JournalEntryItem FinancialAccountType
AccountingDocumentItem
InvoiceReference
InvoiceReferenceFiscalYear
ReferenceDocument
ReferenceDocumentContext
Supplier
Customer
@AbapCatalog.sqlViewName: 'PSTRPBPTAXITEM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE

define view P_StRpBPTaxItem
  as select from I_JournalEntryItem
    inner join   I_Ledger on  I_JournalEntryItem.Ledger = I_Ledger.Ledger
                          and I_Ledger.IsLeadingLedger  = 'X'

{
  I_JournalEntryItem.CompanyCode,
  I_JournalEntryItem.FiscalYear,
  I_JournalEntryItem.AccountingDocument,
  I_JournalEntryItem.FinancialAccountType,
  min(I_JournalEntryItem.AccountingDocumentItem)     as AccountingDocumentItem,
  min(I_JournalEntryItem.InvoiceReference)           as InvoiceReference,
  min(I_JournalEntryItem.InvoiceReferenceFiscalYear) as InvoiceReferenceFiscalYear,
  min(I_JournalEntryItem.ReferenceDocument)          as ReferenceDocument,
  min(I_JournalEntryItem.ReferenceDocumentContext)   as ReferenceDocumentContext,
  min(I_JournalEntryItem.Supplier)                   as Supplier,
  min(I_JournalEntryItem.Customer)                   as Customer
}
where
  (
       I_JournalEntryItem.FinancialAccountType =  'K'
    or I_JournalEntryItem.FinancialAccountType =  'D'
  )
--  and  I_JournalEntryItem.TaxCode              <> ''
group by
  I_JournalEntryItem.CompanyCode,
  I_JournalEntryItem.FiscalYear,
  I_JournalEntryItem.AccountingDocument,
  I_JournalEntryItem.FinancialAccountType
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRYITEM",
"I_LEDGER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/