C_PurOrderItemHistoryValues2

DDL: C_PURORDERITEMHISTORYVALUES2 SQL: CMMPUOITMHISV2 Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Purchase Order Item History Values 2

C_PurOrderItemHistoryValues2 is a Consumption CDS View (Cube) that provides data about "Purchase Order Item History Values 2" in SAP S/4HANA. It reads from 3 data sources (I_CalendarDate, P_PurchaseOrderItemHistory1, I_PurchasingCategoryMatlGroup) and exposes 32 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 7 associations to related views. Part of development package ODATA_MM_ANALYTICS.

Data Sources (3)

SourceAliasJoin Type
I_CalendarDate Calendar left_outer
P_PurchaseOrderItemHistory1 P_PurchaseOrderItemHistory1 from
I_PurchasingCategoryMatlGroup PurchasingCategoryMatlGroup left_outer

Parameters (3)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat
P_DisplayCurrency displaycurrency

Associations (7)

CardinalityTargetAliasCondition
[1..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[1..1] I_Country _Country $projection.SupplierCountry = _Country.Country
[1..1] I_Material _Material $projection.Material = _Material.Material
[1..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup

Annotations (11)

NameValueLevelField
EndUserText.label Purchase Order Item History Values 2 view
AbapCatalog.sqlViewName CMMPUOITMHISV2 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
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
Supplier Supplier Supplier
SupplierCountry _Supplier Country Venue: Ctry/Reg
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
CompanyCode CompanyCode Receiver Company Code
PurchasingCategory
PurgCatName
PurchaseOrderDate PurchaseOrderDate PO Date
CalendarYear I_CalendarDate CalendarYear Year
CalendarQuarter I_CalendarDate CalendarQuarter Calendar Quarter
CalendarMonth I_CalendarDate CalendarMonth Calendar Month
CalendarWeek I_CalendarDate CalendarWeek Calendar Week
Material Material Vehicle Model
MaterialGroup P_PurchaseOrderItemHistory1 MaterialGroup Product Group
Plant Plant Valuation Area
DeliveryTime DeliveryTime TimeOfDelivery
DisplayCurrency
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
GoodsReceiptQty GoodsReceiptQty Quantity
GoodsReceiptAmountInDspCrcy GoodsReceiptAmountInDspCrcy
DeliveryItem DeliveryItem
WeightedDeliveryTime
WeightedReceiptQuantity
_Material _Material
_MaterialGroup _MaterialGroup
_Supplier _Supplier
_Country _Country
_Plant _Plant
_PurchasingOrganization _PurchasingOrganization
_PurchasingGroup _PurchasingGroup

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

CREATE VIEW C_PurOrderItemHistoryValues2 AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  Supplier,
  _Supplier.Country AS SupplierCountry,
  PurchasingOrganization,
  PurchasingGroup,
  CompanyCode,
  PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
  PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName AS PurgCatName,
  PurchaseOrderDate,
  Calendar.CalendarYear AS CalendarYear,
  Calendar.CalendarQuarter AS CalendarQuarter,
  Calendar.CalendarMonth AS CalendarMonth,
  Calendar.CalendarWeek AS CalendarWeek,
  Material,
  P_PurchaseOrderItemHistory1.MaterialGroup AS MaterialGroup,
  Plant,
  DeliveryTime,
  cast( $parameters.P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
  PurchaseOrderQuantityUnit,
  GoodsReceiptQty,
  GoodsReceiptAmountInDspCrcy,
  DeliveryItem,
  cast( DeliveryTime * GoodsReceiptQty as abap.dec(15,2)) AS WeightedDeliveryTime,
  division(GoodsReceiptQty, WeightedReceiptQuantity, 3 ) AS WeightedReceiptQuantity
FROM P_PurchaseOrderItemHistory1
LEFT OUTER JOIN I_CalendarDate AS Calendar ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS PurchasingCategoryMatlGroup ON /* join condition not captured in parsed metadata */
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_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [1..1]
LEFT OUTER JOIN I_Country AS _Country ON SupplierCountry = _Country.Country  -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [1..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup  -- association [1..1]
;