C_SuplrComprnViaPurVals2

DDL: C_SUPLRCOMPRNVIAPURVALS2 SQL: CMMSPLRCMPURVAL2 Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Supplier Comparison via Purchase Values Cube

C_SuplrComprnViaPurVals2 is a Consumption CDS View (Cube) that provides data about "Supplier Comparison via Purchase Values Cube" in SAP S/4HANA. It reads from 2 data sources (P_PurOrdHistDelivCost2, P_SuplrComprnViaPurValCurrCon) and exposes 40 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 11 associations to related views. Part of development package ODATA_MM_ANALYTICS.

Data Sources (2)

SourceAliasJoin Type
P_PurOrdHistDelivCost2 P_PurOrdHistDelivCost2 left_outer
P_SuplrComprnViaPurValCurrCon P_SuplrComprnViaPurValCurrCon from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Associations (11)

CardinalityTargetAliasCondition
[1..1] I_PurgCatMaterialGroupAPI01 PurchasingCategoryMatlGroup AccountAssignment.MaterialGroup = PurchasingCategoryMatlGroup.MaterialGroup
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] I_CalendarDate _CalendarDate $projection.PurchaseOrderDate = _CalendarDate.CalendarDate
[1..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[1..1] I_Material _Material $projection.Material = _Material.Material
[1..1] I_Country _Country $projection.SupplierCountry = _Country.Country
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_CompanyCode _ReceivingCompanyCode $projection.ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode

Annotations (14)

NameValueLevelField
EndUserText.label Supplier Comparison via Purchase Values Cube view
AbapCatalog.sqlViewName CMMSPLRCMPURVAL2 view
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
Analytics.internalName #LOCAL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder AccountAssignment PurchaseOrder Purchasing Document
KEY PurchaseOrderItem AccountAssignment PurchaseOrderItem Purchasing Document Item
KEY AccountAssignmentNumber AccountAssignmentNumber Account Assgmt No.
PurchasingOrganization AccountAssignment PurchasingOrganization Purchasing Organization
PurchasingGroup AccountAssignment PurchasingGroup Purchasing Group
Supplier Supplier Supplier
SupplierCountry
CompanyCode AccountAssignment CompanyCode Receiver Company Code
ReceivingCompanyCode AccountAssignment ReceivingCompanyCode Rcvg Co Code
MaterialGroup MaterialGroup Product Group
Material Material Vehicle Model
Plant AccountAssignment Plant Valuation Area
ProductType ProductType Product Type Group
ServicePerformer ServicePerformer Service Performer
PurchasingCategory
PurgCatName
CostCenter CostCenter Cost Center
WBSElement WBSElementInternalID WBS Internal ID
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
PurchaseOrderQty PurchaseOrderQty Purchase Order Quantity
DisplayCurrency
PurOrdNetAmountInDisplayCrcy
IsCompletelyDelivered IsCompletelyDelivered Is completely delivered
InvoiceIsGoodsReceiptBased InvoiceIsGoodsReceiptBased GR-Based IV
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct Overdeliv. Tol.
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct Underdel. Tol.
PurchaseOrderDate PurchaseOrderDate PO Date
CalendarYear _CalendarDate CalendarYear Year
CalendarQuarter _CalendarDate CalendarQuarter Calendar Quarter
CalendarMonth _CalendarDate CalendarMonth Calendar Month
CalendarWeek _CalendarDate CalendarWeek Calendar Week
_PurchasingOrganization _PurchasingOrganization
_PurchasingGroup _PurchasingGroup
_Plant _Plant
_Country _Country
_Material _Material
_MaterialGroup _MaterialGroup
_Supplier _Supplier
_CompanyCode _CompanyCode
_ReceivingCompanyCode _ReceivingCompanyCode

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_SuplrComprnViaPurVals2.
-- 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: CMMSPLRCMPURVAL2
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW C_SuplrComprnViaPurVals2 AS
SELECT
  AccountAssignment.PurchaseOrder AS PurchaseOrder,
  AccountAssignment.PurchaseOrderItem AS PurchaseOrderItem,
  AccountAssignmentNumber,
  AccountAssignment.PurchasingOrganization AS PurchasingOrganization,
  AccountAssignment.PurchasingGroup AS PurchasingGroup,
  Supplier,
  cast( _Supplier.Country as mm_a_supplier_country ) AS SupplierCountry,
  AccountAssignment.CompanyCode AS CompanyCode,
  AccountAssignment.ReceivingCompanyCode AS ReceivingCompanyCode,
  MaterialGroup,
  Material,
  AccountAssignment.Plant AS Plant,
  ProductType,
  ServicePerformer,
  PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
  PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName AS PurgCatName,
  CostCenter,
  WBSElementInternalID AS WBSElement,
  PurchaseOrderQuantityUnit,
  PurchaseOrderQty,
  cast( $parameters.P_DisplayCurrency as displaycurrency) AS DisplayCurrency,
  cast(PurOrdNetAmountInDisplayCrcy * ReturnsItem as purchase_order_net_amt_22_3 ) AS PurOrdNetAmountInDisplayCrcy,
  IsCompletelyDelivered,
  InvoiceIsGoodsReceiptBased,
  OverdelivTolrtdLmtRatioInPct,
  UnderdelivTolrtdLmtRatioInPct,
  PurchaseOrderDate,
  _CalendarDate.CalendarYear AS CalendarYear,
  _CalendarDate.CalendarQuarter AS CalendarQuarter,
  _CalendarDate.CalendarMonth AS CalendarMonth,
  _CalendarDate.CalendarWeek AS CalendarWeek
FROM P_SuplrComprnViaPurValCurrCon
LEFT OUTER JOIN P_PurOrdHistDelivCost2 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurgCatMaterialGroupAPI01 AS PurchasingCategoryMatlGroup ON AccountAssignment.MaterialGroup = PurchasingCategoryMatlGroup.MaterialGroup  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [1..1]
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization  -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup  -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON PurchaseOrderDate = _CalendarDate.CalendarDate  -- association [1..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup  -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [1..1]
LEFT OUTER JOIN I_Country AS _Country ON SupplierCountry = _Country.Country  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _ReceivingCompanyCode ON ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode  -- association [0..1]
;