P_PurchasingSpndComparison2

DDL: P_PURCHASINGSPNDCOMPARISON2 SQL: PMMPURSPNDCOMP2 Type: view CONSUMPTION

Purchasing Spend Comparison 2

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

Data Sources (2)

SourceAliasJoin Type
I_PurgDocAccountAssignment AccountAssignment left_outer
P_PurchasingSpndComparison1 P_PurchasingSpndComparison1 from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMMPURSPNDCOMP2 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 2 view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY AccountAssignmentNumber I_PurgDocAccountAssignment AccountAssignmentNumber Account Assgmt No.
Supplier Supplier Supplier
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
PurgDocHdrCompanyCode PurgDocHdrCompanyCode
CompanyCode CompanyCode Receiver Company Code
PurchaseOrderType PurchaseOrderType PO Type
PurchaseOrderDate PurchaseOrderDate PO Date
Currency Currency Valuation Crcy
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
ReturnItems ReturnItems
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
AccountAssignmentCategory AccountAssignmentCategory Acct Assgmt Cat
CostCenter I_PurgDocAccountAssignment CostCenter Cost Center
CostCenterName
WBSElementInternalID I_PurgDocAccountAssignment WBSElementInternalID WBS Internal ID
DisplayCurrency

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_PurchasingSpndComparison2.
-- 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: PMMPURSPNDCOMP2
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_PurchasingSpndComparison2 AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  AccountAssignment.AccountAssignmentNumber AS AccountAssignmentNumber,
  Supplier,
  PurchasingOrganization,
  PurchasingGroup,
  PurgDocHdrCompanyCode,
  CompanyCode,
  PurchaseOrderType,
  PurchaseOrderDate,
  Currency,
  MaterialGroup,
  Material,
  Plant,
  PurchaseOrderItemCategory,
  PurchaseOrderCategory,
  ProductType,
  ServicePerformer,
  ReturnItems,
  MultipleAcctAssgmtDistribution,
  AccountAssignmentCategory,
  AccountAssignment.CostCenter AS CostCenter,
  AccountAssignment._CostCenter._Text[1: Language = $session.system_language ].CostCenterName AS CostCenterName,
  AccountAssignment.WBSElementInternalID AS WBSElementInternalID,
  cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency
FROM P_PurchasingSpndComparison1
LEFT OUTER JOIN I_PurgDocAccountAssignment AS AccountAssignment ON /* join condition not captured in parsed metadata */
;