P_PurchasingSpndComparison1

DDL: P_PURCHASINGSPNDCOMPARISON1 SQL: PMMPURSPNDCOMP1 Type: view CONSUMPTION

Purchasing Spend Comparison 1

P_PurchasingSpndComparison1 is a Consumption CDS View that provides data about "Purchasing Spend Comparison 1" in SAP S/4HANA. It reads from 2 data sources (P_PurchasingSpndComparison, P_PurchasingSpndComparison3) and exposes 47 fields with key fields PurchaseOrder, PurchaseOrderItem, PurchaseOrderItem.

Data Sources (2)

SourceAliasJoin Type
P_PurchasingSpndComparison P_PurchasingSpndComparison from
P_PurchasingSpndComparison3 P_PurchasingSpndComparison3 union_all

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMMPURSPNDCOMP1 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Purchasing Spend Comparison 1 view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
Supplier Supplier Supplier
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
PurgDocHdrCompanyCode PurgDocHdrCompanyCode Receiver Company Code
CompanyCode CompanyCode Receiver Company Code
PurchaseOrderType PurchaseOrderType PO Type
PurchaseOrderDate PurchaseOrderDate PO Date
CreatedByUser CreatedByUser User Name
Currency DocumentCurrency Document Currency
MaterialGroup MaterialGroup Product Group
Material Material Vehicle Model
Plant Plant Valuation Area
PurchaseOrderItemCategory PurchaseOrderItemCategory Item Category
PurchaseOrderCategory PurchaseOrderCategory Doc. Category
ProductType ProductType Product Type Group
ServicePerformer ServicePerformer Service Performer
AccountAssignmentCategory AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
DocumentCurrency DocumentCurrency Document Currency
PurchaseOrderAmount PurchaseOrderAmount
ReturnItems
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
Supplier Supplier Supplier
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
PurgDocHdrCompanyCode PurgDocHdrCompanyCode Receiver Company Code
CompanyCode CompanyCode Receiver Company Code
PurchaseOrderType PurchaseOrderType PO Type
PurchaseOrderDate PurchaseOrderDate PO Date
CreatedByUser CreatedByUser User Name
Currency DocumentCurrency Document Currency
MaterialGroup MaterialGroup Product Group
Material Material Vehicle Model
Plant Plant Valuation Area
PurchaseOrderItemCategory PurchaseOrderItemCategory Item Category
PurchaseOrderCategory PurchaseOrderCategory Doc. Category
ProductType ProductType Product Type Group
ServicePerformer ServicePerformer Service Performer
AccountAssignmentCategory AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
DocumentCurrency DocumentCurrency Document Currency
ReturnItems ReturnItems
OrderQuantity OrderQuantity Quantity

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_PurchasingSpndComparison1.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PMMPURSPNDCOMP1
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_PurchasingSpndComparison1 AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  Supplier,
  PurchasingOrganization,
  PurchasingGroup,
  PurgDocHdrCompanyCode,
  CompanyCode,
  PurchaseOrderType,
  PurchaseOrderDate,
  CreatedByUser,
  DocumentCurrency AS Currency,
  MaterialGroup,
  Material,
  Plant,
  PurchaseOrderItemCategory,
  PurchaseOrderCategory,
  ProductType,
  ServicePerformer,
  AccountAssignmentCategory,
  MultipleAcctAssgmtDistribution,
  PurchaseOrderQuantityUnit,
  DocumentCurrency,
  PurchaseOrderAmount,
  case when IsReturnsItem = 'X' then -1 else 1 end AS ReturnItems,
  OrderQuantity
FROM P_PurchasingSpndComparison
-- UNION ALL with additional select branch(es): P_PurchasingSpndComparison3
;