P_NONMNGDPURCHASINGSPEND2
Non Managed Spend
P_NONMNGDPURCHASINGSPEND2 is a CDS View in S/4HANA. Non Managed Spend. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_NonMngdPurchasingSpend3 | view | from | CONSUMPTION | Non Managed Spend |
@AbapCatalog.sqlViewName: 'PMMNONMNGDPURS2'
@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_NonMngdPurchasingSpend2
with parameters
P_DisplayCurrency : displaycurrency,
P_StartDate : budat,
P_EndDate : budat
as select from P_NonMngdPurchasingSpend4( P_DisplayCurrency:$parameters.P_DisplayCurrency , P_StartDate: $parameters.P_StartDate,
P_EndDate: $parameters.P_EndDate) as Supplier
// left outer join I_ReceivablesPayablesItem as _AcctAssgmt on (Supplier.PostingDate = _AcctAssgmt.PostingDate // 2749901
// and Supplier.CompanyCode = _AcctAssgmt.CompanyCode
// and Supplier.AccountingDocument = _AcctAssgmt.AccountingDocument
// and Supplier.FiscalYear = _AcctAssgmt.FiscalYear
// and _AcctAssgmt.IsSalesRelated = ''
// and _AcctAssgmt.TaxType = ''
// and (
// ( Supplier.AmountInCompanyCodeCurrency > 0
// and _AcctAssgmt.AmountInCompanyCodeCurrency < 0 )
// or ( Supplier.AmountInCompanyCodeCurrency < 0
// and _AcctAssgmt.AmountInCompanyCodeCurrency > 0 )
// ))
inner join I_OperationalAcctgDocItem as _CCTotal on Supplier.PostingDate = _CCTotal.PostingDate // 2749901
and Supplier.CompanyCode = _CCTotal.CompanyCode
and Supplier.AccountingDocument = _CCTotal.AccountingDocument
and Supplier.FiscalYear = _CCTotal.FiscalYear
and _CCTotal.IsSalesRelated = ''
and _CCTotal.TaxType = ''
and _CCTotal.PostingDate >= $parameters.P_StartDate // 3026005
and _CCTotal.PostingDate <= $parameters.P_EndDate // 3026005
and ( ( Supplier.SupplierAmount > 0 // 2722982
and _CCTotal.AmountInCompanyCodeCurrency < 0 )
or ( Supplier.SupplierAmount < 0
and _CCTotal.AmountInCompanyCodeCurrency > 0 ) )
and _CCTotal.FinancialAccountType <> 'K' // 3001120
and _CCTotal.FinancialAccountType <> 'D' // 3001120
{
key Supplier.AccountingDocument,
key Supplier.FiscalYear,
key Supplier.CompanyCode,
key Supplier.Creditor,
Supplier.PostingDate,
Supplier.AccountingDocumentType, // 3119821
Supplier.CompanyCodeCurrency,
// key _AcctAssgmt.GLAccount as GLAccount, // 2749901
//
// cast(_AcctAssgmt.AccountingDocumentType as mm_a_farp_blart) as AccountingDocumentType,
// _AcctAssgmt.PostingDate as PostingDate,
// _AcctAssgmt.Material as Material,
// _AcctAssgmt.ProfitCenter,
// _AcctAssgmt.CostCenter,
// cast(_AcctAssgmt._JournalEntry.AccountingDocCreatedByUser as ernam ) as AccountingDocCreatedByUser,
//
// _AcctAssgmt.ControllingArea,
// _AcctAssgmt.WBSElement,
// _AcctAssgmt.Fund,
// _AcctAssgmt.Plant as Plant,
//
// _AcctAssgmt.PurchasingDocument as PurchaseOrder,
// _AcctAssgmt.CompanyCodeCurrency,
Supplier.SupplierAmount, // 3119821
sum( _CCTotal.AmountInCompanyCodeCurrency ) as CostCenterAmount1 // 3026005
}
group by
Supplier.AccountingDocument,
// _AcctAssgmt.GLAccount,
// _AcctAssgmt.AccountingDocumentItem, // 2722982
Supplier.FiscalYear,
Supplier.CompanyCode,
Supplier.Creditor,
Supplier.PostingDate,
Supplier.AccountingDocumentType, // 3119821
Supplier.CompanyCodeCurrency,
Supplier.SupplierAmount
// _AcctAssgmt.AccountingDocumentType, // 2749901
// _AcctAssgmt.PostingDate,
// _AcctAssgmt.GLAccount,
//
//
// _AcctAssgmt.ProfitCenter,
// _AcctAssgmt.CostCenter,
// _AcctAssgmt.Material,
// _AcctAssgmt._JournalEntry.AccountingDocCreatedByUser,
// _AcctAssgmt.ControllingArea,
// _AcctAssgmt.AmountInCompanyCodeCurrency,
// _AcctAssgmt.WBSElement,
// _AcctAssgmt.Fund,
// _AcctAssgmt.Plant,
// _AcctAssgmt.CompanyCodeCurrency,
// _AcctAssgmt.PurchasingDocument