P_PurchasingSpndComparison2
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)
| Source | Alias | Join Type |
|---|---|---|
| I_PurgDocAccountAssignment | AccountAssignment | left_outer |
| P_PurchasingSpndComparison1 | P_PurchasingSpndComparison1 | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | bedat | |
| P_EndDate | bedat |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 */
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA