P_PURCHASINGSPNDCOMPARISON

CDS View

Purchasing Spend Comparison

P_PURCHASINGSPNDCOMPARISON is a CDS View in S/4HANA. Purchasing Spend Comparison. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_PurchasingSpndComparison1 view from CONSUMPTION Purchasing Spend Comparison 1
@AbapCatalog.sqlViewName: 'PMMPURSPNDCOMP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType : #CONSUMPTION
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Purchasing Spend Comparison'
define view P_PurchasingSpndComparison 
with parameters 
    P_DisplayCurrency : displaycurrency,
    P_StartDate       : bedat,
    P_EndDate         : bedat

as select from P_PurOrderConvertedValues 

{
    key  PurchaseOrder,  
    key  PurchaseOrderItem,
    
    Supplier,
    PurchasingOrganization,
    PurchasingGroup,
    CompanyCode,
    PurgDocHdrCompanyCode,
    PurchaseOrderType,
    PurchaseOrderDate,
    CreatedByUser,
    DocumentCurrency,
    MaterialGroup,
    Material,
    Plant,
    PurchaseOrderItemCategory,
    PurchaseOrderCategory,
    ProductType,
    ServicePerformer,
    AccountAssignmentCategory,
    MultipleAcctAssgmtDistribution,
    PurchaseOrderQuantityUnit,
 
    case
        when AnalyticalReportingCurrency = $parameters.P_DisplayCurrency
            then NetAmountInReportingCurrency
        when  AnalyticalReportingCurrency2 = $parameters.P_DisplayCurrency
            then NetAmountInReportingCurrency2
        else
             currency_conversion(
                                 amount             => NetAmount,
                                 source_currency    => DocumentCurrency,
                                 target_currency    => :P_DisplayCurrency,
                                 exchange_rate_date => PurchaseOrderDate,
                                 exchange_rate_type => 'M',
                                 error_handling => 'FAIL_ON_ERROR'
                              ) end as PurchaseOrderAmount,   
    IsReturnsItem,    
    OrderQuantity
     
    
} where  ReleaseIsNotCompleted          = ''
  and PurchasingCompletenessStatus   = ''
  and PurchasingDocumentDeletionCode = ''
  and PurgDocumentItemDeletionCode   = ''
  and PurOrdItmAnlytsIndIsActv = 'X'
  and PurchaseOrderDate              <= $parameters.P_EndDate
  and PurchaseOrderDate              >= $parameters.P_StartDate