C_PurOrderItemHistoryValues2
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)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | Calendar | left_outer |
| P_PurchaseOrderItemHistory1 | P_PurchaseOrderItemHistory1 | from |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StartDate | bedat | |
| P_EndDate | bedat | |
| P_DisplayCurrency | displaycurrency |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
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