P_NonMngdPurchasingSpend1

DDL: P_NONMNGDPURCHASINGSPEND1 SQL: PMMNONMNGDPURSP1 Type: view CONSUMPTION

Non Managed Spend

P_NonMngdPurchasingSpend1 is a Consumption CDS View that provides data about "Non Managed Spend" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, I_OperationalAcctgDocItem) and exposes 8 fields with key fields AccountingDocument, FiscalYear, CompanyCode, Creditor.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry JournalEntry inner
I_OperationalAcctgDocItem Supplier from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate mm_a_delivery_date
P_EndDate mm_a_delivery_date

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMMNONMNGDPURSP1 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Non Managed Spend view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY Creditor I_OperationalAcctgDocItem Supplier
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
PostingDate I_OperationalAcctgDocItem PostingDate
AccountingDocumentType I_JournalEntry AccountingDocumentType
AmountInCompanyCodeCurrency
@AbapCatalog.sqlViewName: 'PMMNONMNGDPURSP1'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Non Managed Spend'
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.personalData.blocking: #NOT_REQUIRED
define view P_NonMngdPurchasingSpend1 
  with parameters
    P_DisplayCurrency           : displaycurrency,
    P_StartDate: mm_a_delivery_date,
    P_EndDate: mm_a_delivery_date

as select from I_OperationalAcctgDocItem as Supplier

    inner join   I_JournalEntry            as JournalEntry on  Supplier.CompanyCode         = JournalEntry.CompanyCode // ^3026005

                                                           and Supplier.FiscalYear          = JournalEntry.FiscalYear
                                                           and Supplier.AccountingDocument  = JournalEntry.AccountingDocument
                                                           and JournalEntry.ReverseDocument = ''                       // v3026005

                                                           
{
  key Supplier.AccountingDocument,
  key Supplier.FiscalYear,
  key Supplier.CompanyCode,
  key Supplier.Supplier as Creditor,
//  key Supplier.AccountingDocumentItem,    // 3119821

  Supplier.CompanyCodeCurrency,
  Supplier.PostingDate,
  JournalEntry.AccountingDocumentType,      // 3119821  

  
  sum( Supplier.AmountInCompanyCodeCurrency ) as AmountInCompanyCodeCurrency
  
}where 
      Supplier.IsSalesRelated       = 'X'
  and Supplier.FinancialAccountType = 'K'
  and Supplier.PostingDate >= $parameters.P_StartDate
  and Supplier.PostingDate <= $parameters.P_EndDate
   
  group by 
   Supplier.AccountingDocument,
//   Supplier.AccountingDocumentItem,       // 3119821

   Supplier.FiscalYear,
   Supplier.CompanyCode,
   Supplier.Supplier,
   Supplier.PostingDate,
   Supplier.CompanyCodeCurrency,
   JournalEntry.AccountingDocumentType      // 3119821 

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