C_PurchaseOrderSpend

DDL: C_PURCHASEORDERSPEND SQL: CMMPURORDSPND Type: view CONSUMPTION

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)

SourceAliasJoin Type
P_PurOrdItemAcctAssgmt P_PurOrdItemAcctAssgmt from
I_PurchasingCategoryMatlGroup PurchasingCategoryMatlGroup left_outer

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Associations (5)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;