P_NonMngdPurchasingSpend3

DDL: P_NONMNGDPURCHASINGSPEND3 SQL: PMMNONMNGDPURS3 Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Non Managed Spend

P_NonMngdPurchasingSpend3 is a Consumption CDS View that provides data about "Non Managed Spend" in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, P_NonMngdPurchasingSpend2) and exposes 21 fields with key fields AccountingDocument, FiscalYear, CompanyCode, Creditor, GLAccount. Part of development package ODATA_MM_ANALYTICS.

Data Sources (2)

SourceAliasJoin Type
I_OperationalAcctgDocItem _AcctAssgmt inner
P_NonMngdPurchasingSpend2 P_NonMngdPurchasingSpend2 from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate budat
P_EndDate budat

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMMNONMNGDPURS3 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 (21)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument Supplier AccountingDocument
KEY FiscalYear Supplier FiscalYear
KEY CompanyCode Supplier CompanyCode
KEY Creditor Supplier Creditor
KEY GLAccount I_OperationalAcctgDocItem GLAccount
AccountingDocumentType
PostingDate I_OperationalAcctgDocItem PostingDate
Material I_OperationalAcctgDocItem Material
ProfitCenter I_OperationalAcctgDocItem ProfitCenter
CostCenter I_OperationalAcctgDocItem CostCenter
AccountingDocCreatedByUser
ControllingArea I_OperationalAcctgDocItem ControllingArea
WBSElement
WBSElementInternalID I_OperationalAcctgDocItem WBSElementInternalID
Fund I_OperationalAcctgDocItem Fund
Plant I_OperationalAcctgDocItem Plant
PurchaseOrder I_OperationalAcctgDocItem PurchasingDocument
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
SupplierAmount Supplier SupplierAmount
CostCenterAmount I_OperationalAcctgDocItem AmountInCompanyCodeCurrency
CostCenterAmount1 Supplier CostCenterAmount1
@AbapCatalog.sqlViewName: 'PMMNONMNGDPURS3'
@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_NonMngdPurchasingSpend3 // 2749901


with parameters
P_DisplayCurrency : displaycurrency,
P_StartDate : budat,
P_EndDate : budat

as select from P_NonMngdPurchasingSpend2( P_DisplayCurrency:$parameters.P_DisplayCurrency , P_StartDate: $parameters.P_StartDate,
                                     P_EndDate: $parameters.P_EndDate) as Supplier

        inner join   I_OperationalAcctgDocItem    as _AcctAssgmt on (  Supplier.CompanyCode        = _AcctAssgmt.CompanyCode
                                                                 and  Supplier.AccountingDocument = _AcctAssgmt.AccountingDocument
                                                                 and Supplier.FiscalYear         = _AcctAssgmt.FiscalYear
                                                                 and _AcctAssgmt.IsSalesRelated = ''
                                                                 and _AcctAssgmt.TaxType         = ''
                                                                 and  _AcctAssgmt.PostingDate >= $parameters.P_StartDate
                                                                 and  _AcctAssgmt.PostingDate <= $parameters.P_EndDate
                                                                 and (
                                                                        ( Supplier.SupplierAmount > 0
                                                                        and _AcctAssgmt.AmountInCompanyCodeCurrency < 0 )
                                                                    or (  Supplier.SupplierAmount < 0
                                                                        and _AcctAssgmt.AmountInCompanyCodeCurrency > 0 )
                                                                 ))
                                                                 and _AcctAssgmt.FinancialAccountType <> 'K'         // 3001120

                                                                 and _AcctAssgmt.FinancialAccountType <> 'D'         // 3001120

{
  key Supplier.AccountingDocument,
  key Supplier.FiscalYear,
  key Supplier.CompanyCode,
  key Supplier.Creditor ,
  key _AcctAssgmt.GLAccount as GLAccount,

      cast( Supplier.AccountingDocumentType as mm_a_farp_blart)            as AccountingDocumentType,     // 3119821

      _AcctAssgmt.PostingDate                                              as PostingDate,
      _AcctAssgmt.Material                                                 as Material,
      _AcctAssgmt.ProfitCenter,
      _AcctAssgmt.CostCenter,
      cast(_AcctAssgmt._JournalEntry.AccountingDocCreatedByUser as ernam ) as AccountingDocCreatedByUser,

      _AcctAssgmt.ControllingArea,
      cast( _AcctAssgmt.WBSElementInternalID as ps_posnr ) as WBSElement, 
      _AcctAssgmt.WBSElementInternalID,
      
      _AcctAssgmt.Fund,
      _AcctAssgmt.Plant                                                    as Plant,

      _AcctAssgmt.PurchasingDocument                                       as PurchaseOrder,
      _AcctAssgmt.CompanyCodeCurrency,

      Supplier.SupplierAmount ,

      _AcctAssgmt.AmountInCompanyCodeCurrency as CostCenterAmount,                                                   // 3026005


      Supplier.CostCenterAmount1

}
  group by
  Supplier.AccountingDocument,
  _AcctAssgmt.GLAccount,
  _AcctAssgmt.AccountingDocumentItem,
   Supplier.FiscalYear,
   Supplier.CompanyCode,
   Supplier.Creditor,
   Supplier.PostingDate,
   Supplier.CompanyCodeCurrency,
   Supplier.SupplierAmount,
   Supplier.CostCenterAmount1,
   Supplier.AccountingDocumentType, 
  _AcctAssgmt.PostingDate,
  _AcctAssgmt.GLAccount,


  _AcctAssgmt.ProfitCenter,
  _AcctAssgmt.CostCenter,
  _AcctAssgmt.Material,
  _AcctAssgmt._JournalEntry.AccountingDocCreatedByUser,
  _AcctAssgmt.ControllingArea,
  _AcctAssgmt.AmountInCompanyCodeCurrency,
  _AcctAssgmt.WBSElementInternalID,
  _AcctAssgmt.Fund,
  _AcctAssgmt.Plant,
  _AcctAssgmt.CompanyCodeCurrency,
  _AcctAssgmt.PurchasingDocument