C_SupplierPurchasingSpend
Purchasing Spend for Supplier
C_SupplierPurchasingSpend is a Consumption CDS View (Cube) that provides data about "Purchasing Spend for Supplier" in SAP S/4HANA. It reads from 3 data sources (P_UNSGNDMATGRPTXT, P_SupplierPurchasingSpend, I_PurchasingCategoryMatlGroup) and exposes 27 fields with key field PurchaseOrderItem. It has 5 associations to related views. It is exposed through 1 OData service (ASQL_F0354). Part of development package ODATA_MM_ANALYTICS.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_UNSGNDMATGRPTXT | _Doc | left_outer |
| P_SupplierPurchasingSpend | P_SupplierPurchasingSpend | from |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
Parameters (5)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_DateFunction | datefunctionid | |
| P_StartDate | bedat | |
| P_EndDate | bedat | |
| P_Language | sylangu |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Material | _MaterialText | $projection.Material = _MaterialText.Material |
| [1..1] | I_MaterialGroup | _MaterialGroup | $projection.MaterialGroup = _MaterialGroup.MaterialGroup |
| [1..1] | I_CalendarDate | _CalendarDate | $projection.PurchaseOrderDate = _CalendarDate.CalendarDate |
| [1..1] | I_PurchasingGroup | _PurchasingGroup | $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup |
| [1..1] | I_PurchasingOrganization | _PurchasingOrganization | $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| EndUserText.label | Purchasing Spend for Supplier | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.dataCategory | #CUBE | view | |
| AbapCatalog.sqlViewName | CMMSUPLRPURSPND | view | |
| OData.publish | true | view | |
| Metadata.allowExtensions | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| Analytics.internalName | #LOCAL | view |
OData Services (1)
| Service | Binding | Version | Contract | Release |
|---|---|---|---|---|
| ASQL_F0354 | ASQL_F0354 | C2 | NOT_RELEASED |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| resultElementDateFunctionStartDate | ||||
| resultElementDateFunctionEndDate | ||||
| P_DisplayCurrency | ||||
| P_StartDate | ||||
| KEY | PurchaseOrderItem | Purchasing Document Item | ||
| Supplier | Supplier | Supplier | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CalendarYear | _CalendarDate | CalendarYear | Year | |
| CalendarQuarter | _CalendarDate | CalendarQuarter | Calendar Quarter | |
| CalendarMonth | _CalendarDate | CalendarMonth | Calendar Month | |
| CalendarWeek | _CalendarDate | CalendarWeek | Calendar Week | |
| YearQuarter | _CalendarDate | YearQuarter | Year Quarter | |
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingOrganizationName | _PurchasingOrganization | PurchasingOrganizationName | Purch. Org. Name | |
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingGroupName | _PurchasingGroup | PurchasingGroupName | Purchasing Grp. Name | |
| Material | Material | Vehicle Model | ||
| MaterialName | ||||
| MaterialGroup | P_PurOrdItmAcctAssgmt | MaterialGroup | Product Group | |
| MaterialGroupName | ||||
| Plant | Plant | Valuation Area | ||
| PlantName | _Plant | PlantName | Plant Name | |
| PurchasingCategory | ||||
| PurgCatNameendasPurgCatName | ||||
| DisplayCurrency | ||||
| PurOrdNetAmountInDisplayCrcy |
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 C_SupplierPurchasingSpend.
-- 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: CMMSUPLRPURSPND
-- Parameters: P_DisplayCurrency : displaycurrency, P_DateFunction : datefunctionid, P_StartDate : bedat, P_EndDate : bedat, P_Language : sylangu
CREATE VIEW C_SupplierPurchasingSpend AS
SELECT
resultElement: 'DateFunctionStartDate' AS resultElementDateFunctionStartDate,
resultElement: 'DateFunctionEndDate' AS resultElementDateFunctionEndDate,
binding: [ { targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' AS P_DisplayCurrency,
P_StartDate : $parameters.P_StartDate AS P_StartDate,
cast(PurchaseOrderItem as vdm_purchaseorderitem) AS PurchaseOrderItem,
Supplier,
PurchaseOrderDate,
_CalendarDate.CalendarYear AS CalendarYear,
_CalendarDate.CalendarQuarter AS CalendarQuarter,
_CalendarDate.CalendarMonth AS CalendarMonth,
_CalendarDate.CalendarWeek AS CalendarWeek,
_CalendarDate.YearQuarter AS YearQuarter,
PurchasingOrganization,
_PurchasingOrganization.PurchasingOrganizationName AS PurchasingOrganizationName,
CompanyCode,
PurchasingGroup,
_PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
Material,
_MaterialText._Text[1: Language = $parameters.P_Language].MaterialName AS MaterialName,
P_PurOrdItmAcctAssgmt.MaterialGroup AS MaterialGroup,
_MaterialGroup._Text[1: Language = $parameters.P_Language].MaterialGroupName AS MaterialGroupName,
Plant,
_Plant.PlantName AS PlantName,
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
case when PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName is null then cast( _Doc.DomainText as /srmsmc/puc_name preserving type) else PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName end as PurgCatName AS PurgCatNameendasPurgCatName,
cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
cast(PurOrdNetAmountInDisplayCrcy as purchase_order_net_amount) AS PurOrdNetAmountInDisplayCrcy
FROM P_SupplierPurchasingSpend
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS PurchasingCategoryMatlGroup ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_UNSGNDMATGRPTXT AS _Doc ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Material AS _MaterialText ON Material = _MaterialText.Material -- association [1..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON PurchaseOrderDate = _CalendarDate.CalendarDate -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup -- association [1..1]
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- OData Services in SAP S/4HANA Explained
- Service Bindings and Service Definitions in SAP S/4HANA
- 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