C_SI_OpnSupplierInvoiceItemC

DDL: C_SI_OPNSUPPLIERINVOICEITEMC Type: view_entity CONSUMPTION Package: GLO_FIN_IS_SI_AP

Epobot Slovenia - Cube

C_SI_OpnSupplierInvoiceItemC is a Consumption CDS View (Cube) that provides data about "Epobot Slovenia - Cube" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 27 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, FiscalYear, StatryRptCategory. Part of development package GLO_FIN_IS_SI_AP.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem Item from

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
EndUserText.label Epobot Slovenia - Cube view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
KEY StatryRptCategory Log StatryRptCategory
KEY StatryRptRunID Log StatryRptRunID
KEY StatryRptgEntity Log StatryRptgEntity
FiscalPeriod I_OperationalAcctgDocItem FiscalPeriod
PostingDate I_OperationalAcctgDocItem PostingDate
DocumentDate I_OperationalAcctgDocItem DocumentDate
DueCalculationBaseDate I_OperationalAcctgDocItem DueCalculationBaseDate
NetDueDate I_OperationalAcctgDocItem NetDueDate
DebitCreditCode I_OperationalAcctgDocItem DebitCreditCode
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
Reference1IDByBusinessPartner I_OperationalAcctgDocItem Reference1IDByBusinessPartner
Reference2IDByBusinessPartner I_OperationalAcctgDocItem Reference2IDByBusinessPartner
Reference3IDByBusinessPartner I_OperationalAcctgDocItem Reference3IDByBusinessPartner
DocumentReferenceID
SupplierVATRegistration BPTaxNumber1 BPTaxNumber
Supplier I_OperationalAcctgDocItem Supplier
CustomerSupplierCountry I_OperationalAcctgDocItem CustomerSupplierCountry
Country
InvoiceReference I_OperationalAcctgDocItem InvoiceReference
InvoiceReferenceFiscalYear I_OperationalAcctgDocItem InvoiceReferenceFiscalYear
InvoiceItemReference I_OperationalAcctgDocItem InvoiceItemReference
GLAccount I_OperationalAcctgDocItem GLAccount
PaymentBlockingReason I_OperationalAcctgDocItem PaymentBlockingReason
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@Analytics.dataCategory: #CUBE
@Analytics.internalName:#LOCAL
@EndUserText.label: 'Epobot Slovenia - Cube'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #CONSUMPTION
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations: true

define view entity C_SI_OpnSupplierInvoiceItemC
  as select from    I_OperationalAcctgDocItem as Item

    left outer to many join I_StRpJournalEntryLog as Log on Log.AccountingDocument = Item.AccountingDocument
                                                        and Log.CompanyCode        = Item.CompanyCode
                                                        and Log.FiscalYear         = Item.FiscalYear
                                                 
    left outer to one join I_BusinessPartnerSupplier as BPSupplier on BPSupplier.Supplier = Item.Supplier
    
    left outer to one join I_Businesspartnertaxnumber as BPTaxNumber1 on BPTaxNumber1.BusinessPartner = BPSupplier.BusinessPartner
                                                                     and BPTaxNumber1.BPTaxType = 'SI1'
                                                                     
{
  key Item.CompanyCode,
  key Item.AccountingDocument,
  key Item.AccountingDocumentItem,
  key Item.FiscalYear,
  key Log.StatryRptCategory,
  key Log.StatryRptRunID,
  key Log.StatryRptgEntity,
      Item.FiscalPeriod,
      Item.PostingDate,
      Item.DocumentDate, //racuna

      Item.DueCalculationBaseDate, //zapadlosti

      Item.NetDueDate, //nastanka

      Item.DebitCreditCode,
      Item.CompanyCodeCurrency,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      case Item.DebitCreditCode
        when 'H' then -1 * Item.AmountInCompanyCodeCurrency
        else Item.AmountInCompanyCodeCurrency
      end as AmountInCompanyCodeCurrency,
      Item.Reference1IDByBusinessPartner,
      Item.Reference2IDByBusinessPartner,
      Item.Reference3IDByBusinessPartner,
      Item._JournalEntry.DocumentReferenceID,
      BPTaxNumber1.BPTaxNumber as SupplierVATRegistration,
      Item.Supplier,
      Item.CustomerSupplierCountry,
      Item._Supplier.Country,
      Item.InvoiceReference,
      Item.InvoiceReferenceFiscalYear,
      Item.InvoiceItemReference,
      Item.GLAccount,
      Item.PaymentBlockingReason
}
where
  //Open vendor items:

      Item.FinancialAccountType       =  'K'
  and Item.ClearingJournalEntry       =  ''
  and Item.AccountingDocumentCategory <> 'D'
  and Item.AccountingDocumentCategory <> 'M'
  //excluding partial payments without link to invoice

  and (Item.DebitCreditCode = 'H' or 
      (Item.DebitCreditCode = 'S' and Item.InvoiceReference is not initial))
  and (Item.PaymentBlockingReason is initial or Item.PaymentBlockingReason = ' ')
  and Item.SpecialGLCode <> 'F' //Down Payment request