P_PurchasingSpndComparison1
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 4 data sources (I_PurgAnalyticsConfiguration, P_PurchasingSpndComparison, I_PurchaseOrder, I_PurchaseOrderItem) and exposes 48 fields with key fields PurchaseOrder, PurchaseOrderItem, PurchaseOrderItem. Part of development package ODATA_MM_ANALYTICS.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_PurgAnalyticsConfiguration | MigrationStatus | union_all |
| P_PurchasingSpndComparison | P_PurchasingSpndComparison | from |
| I_PurchaseOrder | PurchaseOrder | inner |
| I_PurchaseOrderItem | PurchaseOrderItem | inner |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | bedat | |
| P_EndDate | bedat |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 (48)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 | ||||
| PurchaseOrder | Purchasing Document | |||
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| Supplier | Supplier | Supplier | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurgDocHdrCompanyCode | I_PurchaseOrder | CompanyCode | Receiver Company Code | |
| CompanyCode | I_PurchaseOrderItem | CompanyCode | Receiver Company Code | |
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CreatedByUser | CreatedByUser | User Name | ||
| Currency | I_PurchaseOrderItem | 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 | I_PurchaseOrderItem | DocumentCurrency | Document Currency | |
| 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
INNER JOIN I_PurchaseOrderItem AS PurchaseOrderItem ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurchaseOrder AS PurchaseOrder ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): I_PurgAnalyticsConfiguration
;
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