C_PurchaseOrderValue

DDL: C_PURCHASEORDERVALUE SQL: CMMPURORDVALUE Type: view CONSUMPTION

Purchase Order Value

C_PurchaseOrderValue (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Sourcing & Procurement

C_PurchaseOrderValue is a Consumption CDS View (Cube) that provides data about "Purchase Order Value" in SAP S/4HANA. It reads from 3 data sources (P_UNSGNDMATGRPTXT, P_PURCHASEORDERVALUE, I_PurchasingCategoryMatlGroup) and exposes 61 fields with key fields PurchaseOrderItem, AccountAssignmentNumber, PurgDocMigrtnIsCmpltdForAnlyts. It has 11 associations to related views. It is used in 3 Fiori applications: Spend Variance, Purchase Order Value and Scheduling Agreement Value, Purchase Order Average Delivery Time.

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-ANA
CapabilitiesData Provider for Analytical Queries
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (3)

SourceAliasJoin Type
P_UNSGNDMATGRPTXT _Doc left_outer
P_PURCHASEORDERVALUE P_PURCHASEORDERVALUE from
I_PurchasingCategoryMatlGroup PurchasingCategoryMatlGroup left_outer

Parameters (5)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_DateFunction datefunctionid
P_StartDate bedat
P_EndDate bedat
P_Language sylangu

Associations (11)

CardinalityTargetAliasCondition
[1..1] P_Purordmaintaincustproj _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[1..1] I_Product _MaterialText $projection.Material = _MaterialText.Product
[1..1] I_ProductGroup _MaterialGroupText $projection.MaterialGroup = _MaterialGroupText.MaterialGroup
[1..1] I_CalendarDate _CalendarDate $projection.PurchaseOrderDate = _CalendarDate.CalendarDate
[0..1] I_WBSElementByInternalKey _WBSElementByInternal $projection.WBSElementInternalID = _WBSElementByInternal.WBSElementInternalID
[1..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_CalendarMonth _CalendarMonth _CalendarDate.CalendarMonth = _CalendarMonth.CalendarMonth
[1..1] I_CalendarMonth _CalendarMonthWithText $projection.PostingMonth = _CalendarMonthWithText.CalendarMonth
[0..1] I_CountryGeoPoint _CountryGeoPoint $projection.Country = _CountryGeoPoint.Country
[0..1] I_Region _SupplierRegion $projection.region = _SupplierRegion.Region and $projection.SupplierCountry = _SupplierRegion.Country

Annotations (14)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
EndUserText.label Purchase Order Value view
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
AbapCatalog.sqlViewName CMMPURORDVALUE view
OData.publish true view
Metadata.allowExtensions true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view

Fiori Apps (3)

App IDApp NameTypeDescription
F1377 Spend Variance Analytical You can use this app to determine the sum of the purchase order value, goods receipt value, and invoice value per supplier or material. It then calculates the relation between the purchase orders, good receipts, and invoice value for a given filter.
F1378 Purchase Order Value and Scheduling Agreement Value Analytical You can use this app to retrieve the order value for all the purchase orders over time. The app also helps to determine the KPI value of the purchase orders for a given set of filter criteria such as the materials, supplier, and plant. The business value of the app is that you can determine all the current value of all purchase orders in the system.
F1380 Purchase Order Average Delivery Time Analytical You can use this app to check the average delivery time of orders to the suppliers.

Spend Variance

Business Role: Strategic Buyer

With the Spend Variance app, you can determine the sum of the purchase order value, goods receipt value, and invoice value per supplier or material. It then calculates the relation between the purchase orders, good receipts, and invoice value for a given filter. The role Strategic Buyer (SAP_BR_BUYER) is required to access the app. The KPI is displayed in the following views: •By Supplier•By Purchasing Category•By Material Group•Plant•By Purchasing Group•By Material•Document

Purchase Order Value and Scheduling Agreement Value

Business Role: Strategic Buyer

You can use this app to retrieve the order value for all the purchase orders within a stipulated time. The app also helps to determine the KPI value of the purchase orders for a given set of filter criteria such as the materials, supplier, and plant. The business value of the app is that you can determine all the current value of all purchase orders in the system. The role Strategic Buyer (SAP_BR_BUYER) is required to access the app. This KPI is displayed in the following views: •By Supplier•By Purchasing Category•By Material Group•By Purchasing Group•By Plant•By WBS Element•Document•Trend

Purchase Order Average Delivery Time

Business Role: Strategic Buyer

Using the Purchase Order Average Delivery Time Weighted app, you can check the average delivery time of orders to the suppliers. The role Strategic Buyer (SAP_BR_BUYER) is required to access the app. The app is displayed in the following views: •By Supplier•By Material Group•By Plant•By Purchasing Category•Document

Fields (61)

KeyFieldSource TableSource FieldDescription
resultElementDateFunctionStartDate
resultElementDateFunctionEndDate
P_DisplayCurrency
P_StartDate
KEY PurchaseOrderItem Item Number of Purchase Order
KEY AccountAssignmentNumber AccountAssignmentNumber Sequential Number of Account Assignment
KEY PurgDocMigrtnIsCmpltdForAnlyts PurgDocMigrtnIsCmpltdForAnlyts Indicator for Data Migration of Schedule Line
PurgCatUUID PurgCatUUID Purchasing Category UUID
Supplier Supplier Account Number of Supplier
SupplierName _Supplier SupplierName Name of Supplier
SupplierCountry SupplierCountry Supplier Country/Region
CountryName Country/Region Name
Country SupplierCountry Supplier Country/Region
Region _Supplier Region Region (State, Province, County)
PurchaseOrderDate PurchaseOrderDate Purchasing Document Date
IsCompletelyDelivered IsCompletelyDelivered "Delivery Completed" Indicator
CalendarYear _CalendarDate CalendarYear Calendar Year
CalendarQuarter _CalendarDate CalendarQuarter Calendar Quarter
CalendarMonth _CalendarDate CalendarMonth Calendar Month
PostingMonth _CalendarDate CalendarMonth Calendar Month
CalendarWeek _CalendarDate CalendarWeek Calendar Week
YearQuarter _CalendarDate YearQuarter Year Quarter
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingOrganizationName _PurchasingOrganization PurchasingOrganizationName Purchasing Organization Name
CompanyCode CompanyCode Receiver Company Code
PurchasingGroup PurchasingGroup Purchasing Group
PurchasingGroupName _PurchasingGroup PurchasingGroupName Purchasing Group Name
Material Material Material Number
MaterialName Product Description
MaterialGroup P_PurOrdItmAcctAssgmt MaterialGroup Material Group
MaterialGroupName Product Group Description
Plant Plant Valuation Area
PlantName _Plant PlantName Plant Name
ProductTypeCode ProductType Product Type Group
ProductType Product Type Group
ServicePerformer ServicePerformer Service Performer
PurchasingCategory Purchasing Category(Deprecated)
PurgCatRelatedToMaterialGroup Purchasing Category
PurgCatNameendasPurgCatName
WBSElementInternalID WBSElementInternalID Work Breakdown Structure Element (WBS Element)
CustomerProjectName _WBSElement CustomerProjectName Customer Project Name
CustProjWorkPackageName _WBSElement CustProjWorkPackageName Plan Item Description
WBSElement _WBSElementByInternal WBSElement Work Breakdown Structure Element (WBS Element)
WBSDescription _WBSElementByInternal WBSDescription Work Breakdown Structure Element Name
CostCenter CostCenter Cost Center
DisplayCurrency Display Currency
PurOrdNetAmountInDisplayCrcy PurOrdNetAmountInDisplayCrcy Purchase Order Net Amount
NumberOfPurchaseOrders
NmbrOfCmpltlyDlvrdPurOrdItms
NumberOfPurchaseOrderItems
_MaterialGroupText _MaterialGroupText
_Plant _Plant
_PurchasingGroup _PurchasingGroup
_PurchasingOrganization _PurchasingOrganization
_Supplier _Supplier
_SupplierCountry _SupplierCountry
_MaterialText _MaterialText
_CalendarMonthWithText _CalendarMonthWithText
_CalendarMonth _CalendarMonth
_CountryGeoPoint _CountryGeoPoint
_SupplierRegion _SupplierRegion

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_PurchaseOrderValue.
-- 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: CMMPURORDVALUE
-- Parameters: P_DisplayCurrency : displaycurrency, P_DateFunction : datefunctionid, P_StartDate : bedat, P_EndDate : bedat, P_Language : sylangu

CREATE VIEW C_PurchaseOrderValue 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,
  AccountAssignmentNumber,
  PurgDocMigrtnIsCmpltdForAnlyts,
  PurgCatUUID,
  Supplier,
  _Supplier.SupplierName AS SupplierName,
  SupplierCountry,
  _SupplierCountry._Text[1: Language = $parameters.P_Language].CountryName AS CountryName,
  SupplierCountry AS Country,
  _Supplier.Region AS Region,
  PurchaseOrderDate,
  IsCompletelyDelivered,
  _CalendarDate.CalendarYear AS CalendarYear,
  _CalendarDate.CalendarQuarter AS CalendarQuarter,
  _CalendarDate.CalendarMonth AS CalendarMonth,
  _CalendarDate.CalendarMonth AS PostingMonth,
  _CalendarDate.CalendarWeek AS CalendarWeek,
  _CalendarDate.YearQuarter AS YearQuarter,
  PurchasingOrganization,
  _PurchasingOrganization.PurchasingOrganizationName AS PurchasingOrganizationName,
  CompanyCode,
  PurchasingGroup,
  _PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
  Material,
  _MaterialText._Text[1: Language = $session.system_language].ProductName AS MaterialName,
  P_PurOrdItmAcctAssgmt.MaterialGroup AS MaterialGroup,
  _MaterialGroupText._Text[1: Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
  Plant,
  _Plant.PlantName AS PlantName,
  ProductType AS ProductTypeCode,
  cast ( ProductType as producttype) AS ProductType,
  ServicePerformer,
  PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
  coalesce(PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory,'') AS PurgCatRelatedToMaterialGroup,
  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,
  WBSElementInternalID,
  _WBSElement.CustomerProjectName AS CustomerProjectName,
  _WBSElement.CustProjWorkPackageName AS CustProjWorkPackageName,
  _WBSElementByInternal.WBSElement AS WBSElement,
  _WBSElementByInternal.WBSDescription AS WBSDescription,
  CostCenter,
  cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
  PurOrdNetAmountInDisplayCrcy,
  cast( 1 as abap.int4 ) AS NumberOfPurchaseOrders,
  cast( 1 as abap.int4 ) AS NmbrOfCmpltlyDlvrdPurOrdItms,
  cast( 1 as abap.int4 ) AS NumberOfPurchaseOrderItems
FROM P_PURCHASEORDERVALUE
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 P_Purordmaintaincustproj AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID  -- association [1..1]
LEFT OUTER JOIN I_Product AS _MaterialText ON Material = _MaterialText.Product  -- association [1..1]
LEFT OUTER JOIN I_ProductGroup AS _MaterialGroupText ON MaterialGroup = _MaterialGroupText.MaterialGroup  -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON PurchaseOrderDate = _CalendarDate.CalendarDate  -- association [1..1]
LEFT OUTER JOIN I_WBSElementByInternalKey AS _WBSElementByInternal ON WBSElementInternalID = _WBSElementByInternal.WBSElementInternalID  -- association [0..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]
LEFT OUTER JOIN I_CalendarMonth AS _CalendarMonth ON _CalendarDate.CalendarMonth = _CalendarMonth.CalendarMonth  -- association [1..1]
LEFT OUTER JOIN I_CalendarMonth AS _CalendarMonthWithText ON PostingMonth = _CalendarMonthWithText.CalendarMonth  -- association [1..1]
LEFT OUTER JOIN I_CountryGeoPoint AS _CountryGeoPoint ON Country = _CountryGeoPoint.Country  -- association [0..1]
LEFT OUTER JOIN I_Region AS _SupplierRegion ON region = _SupplierRegion.Region AND SupplierCountry = _SupplierRegion.Country  -- association [0..1]
;