C_PurchaseOrderSpend
Purchase Order Spend
C_PurchaseOrderSpend is a Consumption CDS View (Cube) that provides data about "Purchase Order Spend" in SAP S/4HANA. It reads from 2 data sources (P_PurOrdItemAcctAssgmt, I_PurchasingCategoryMatlGroup) and exposes 40 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 5 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_PurOrdItemAcctAssgmt | P_PurOrdItemAcctAssgmt | from |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | bedat | |
| P_EndDate | bedat |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | P_Purordmaintaincustproj | _WBSElement | $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID |
| [1..1] | I_Material | _MaterialText | $projection.Material = _MaterialText.Material |
| [1..1] | I_MaterialGroup | _MaterialGroup | $projection.MaterialGroup = _MaterialGroup.MaterialGroup |
| [1..1] | I_PurchasingDocumentStatus | _PurchasingDocumentStatus | $projection.PurchasingDocumentStatus = _PurchasingDocumentStatus.PurchasingDocumentStatus |
| [1..1] | I_Country | _Country | $projection.SupplierCountry = _Country.Country |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.dataCategory | #CUBE | view | |
| Metadata.allowExtensions | true | view | |
| AbapCatalog.sqlViewName | CMMPURORDSPND | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| EndUserText.label | Purchase Order Spend | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_CUBE | view |
Fields (40)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | |||
| KEY | PurchaseOrderItem | Purchasing Document Item | ||
| KEY | AccountAssignmentNumber | AccountAssignmentNumber | Account Assgmt No. | |
| PurgCatUUID | PurgCatUUID | |||
| Supplier | Supplier | Supplier | ||
| SupplierCountry | SupplierCountry | |||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CalendarYear | CalendarYear | Year | ||
| CalendarQuarter | CalendarQuarter | Calendar Quarter | ||
| CalendarMonth | CalendarMonth | Calendar Month | ||
| CalendarWeek | CalendarWeek | Calendar Week | ||
| YearQuarter | YearQuarter | Year Quarter | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingDocumentStatus | PurchasingDocumentStatus | Short Description | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | P_PurOrdItmAcctAssgmt | MaterialGroup | Product Group | |
| Plant | Plant | Valuation Area | ||
| ProductTypeCode | ProductType | Product Type Group | ||
| ProductType | Product Type Group | |||
| ServicePerformer | ServicePerformer | Service Performer | ||
| PurchasingCategory | ||||
| PurgCatName | _PurchasingCategory | PurgCatName | Purchasing Cat. Name | |
| WBSElementInternalID | WBSElementInternalID | WBS Internal ID | ||
| WBSElement | WBSElement | WBS Internal ID | ||
| WBSDescription | WBSDescription | WBS Element Name | ||
| CustomerProjectName | _WBSElement | CustomerProjectName | ||
| CustProjWorkPackageName | _WBSElement | CustProjWorkPackageName | ||
| CostCenter | CostCenter | Cost Center | ||
| DisplayCurrency | ||||
| PurOrdNetAmountInDisplayCrcy | PurOrdNetAmountInDisplayCrcy | |||
| _Plant | _Plant | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingDocumentStatus | _PurchasingDocumentStatus | |||
| _Supplier | _Supplier | |||
| _MaterialGroup | _MaterialGroup | |||
| _MaterialText | _MaterialText | |||
| _Country | _Country |
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_PurchaseOrderSpend.
-- 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: CMMPURORDSPND
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat
CREATE VIEW C_PurchaseOrderSpend AS
SELECT
cast(P_PurOrdItmAcctAssgmt.PurchaseOrder as vdm_purchaseorder) AS PurchaseOrder,
cast(PurchaseOrderItem as vdm_purchaseorderitem) AS PurchaseOrderItem,
AccountAssignmentNumber,
PurgCatUUID,
Supplier,
SupplierCountry,
PurchaseOrderDate,
CalendarYear,
CalendarQuarter,
CalendarMonth,
CalendarWeek,
YearQuarter,
PurchasingOrganization,
CompanyCode,
PurchasingGroup,
PurchasingDocumentStatus,
Material,
P_PurOrdItmAcctAssgmt.MaterialGroup AS MaterialGroup,
Plant,
ProductType AS ProductTypeCode,
cast ( ProductType as producttype) AS ProductType,
ServicePerformer,
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
_PurchasingCategory.PurgCatName AS PurgCatName,
WBSElementInternalID,
WBSElement,
WBSDescription,
_WBSElement.CustomerProjectName AS CustomerProjectName,
_WBSElement.CustProjWorkPackageName AS CustProjWorkPackageName,
CostCenter,
cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
PurOrdNetAmountInDisplayCrcy
FROM P_PurOrdItemAcctAssgmt
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS PurchasingCategoryMatlGroup ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_Purordmaintaincustproj AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID -- association [1..1]
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_PurchasingDocumentStatus AS _PurchasingDocumentStatus ON PurchasingDocumentStatus = _PurchasingDocumentStatus.PurchasingDocumentStatus -- association [1..1]
LEFT OUTER JOIN I_Country AS _Country ON SupplierCountry = _Country.Country -- association [1..1]
;
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