P_PurInfoRecdPrHist
Private View for Purchasing Info Record Price History
P_PurInfoRecdPrHist is a Consumption CDS View that provides data about "Private View for Purchasing Info Record Price History" in SAP S/4HANA. It reads from 2 data sources (I_PurgInfoRecordWithOrgData, I_PurInfCndPeriod) and exposes 86 fields with key fields PurchasingInfoRecord, PurchasingOrganization, PurchasingInfoRecordCategory, Plant, ConditionValidityEndDate. It has 2 associations to related views. Part of development package ODATA_MM_PUR_INFORECPRICH_MNTR.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_PurgInfoRecordWithOrgData | _Header | from |
| I_PurInfCndPeriod | _Item | union_all |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Material | _Material | _Material.Material = $projection.Material |
| [0..1] | I_PurgInfoRecordWithOrgData | _InfoRecord | $projection.PurchasingInfoRecord = _InfoRecord.PurchasingInfoRecord and $projection.Plant = _InfoRecord.Plant and $projection.PurchasingInfoRecordCategory = _InfoRecord.PurchasingInfoRecordCategory and $projection.PurchasingOrganization = _InfoRecord.PurchasingOrganization |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURINFRECHIST | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Private View for Purchasing Info Record Price History | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (86)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingInfoRecord | I_PurgInfoRecordWithOrgData | PurchasingInfoRecord | Info Record |
| KEY | PurchasingOrganization | I_PurgInfoRecordWithOrgData | PurchasingOrganization | Purchasing Organization |
| KEY | PurchasingInfoRecordCategory | I_PurgInfoRecordWithOrgData | PurchasingInfoRecordCategory | Infotype |
| KEY | Plant | I_PurgInfoRecordWithOrgData | Plant | Valuation Area |
| KEY | ConditionValidityEndDate | Valid To | ||
| KEY | ConditionRecord | Cond.Record No. | ||
| char50asFormattedPurDoc | ||||
| Currency | I_PurgInfoRecordWithOrgData | Currency | Valuation Crcy | |
| PurchasingGroup | I_PurgInfoRecordWithOrgData | PurchasingGroup | Purchasing Group | |
| PurchasingDocument | ||||
| PurchasingDocumentItem | ||||
| FormattedPurchaseOrderItem | ||||
| ConditionValidityStartDate | Valid From | |||
| ConditionIsDeleted | Deletion Indic. | |||
| ConditionRateValue | Condition Rate Value | |||
| ConditionRateValueUnit | Unit of Condition Rate Value | |||
| ConditionQuantity | ||||
| ConditionQuantityUnit | Unit of Measure | |||
| BaseUnit | I_PurgInfoRecordWithOrgData | PurgDocOrderQuantityUnit | Purchasing Document Order Qty Unit | |
| NumberOfItems | ||||
| HierarchyNodeLevel | ||||
| PurgDocDrillDownState | ||||
| PurchasingDocumentType | ||||
| ParentNode | ||||
| NetAmount | ||||
| Supplier | I_PurgInfoRecordWithOrgData | Supplier | Supplier | |
| Material | I_PurgInfoRecordWithOrgData | Material | Vehicle Model | |
| MaterialGroupendasMaterialGroup | ||||
| SupplierSubrange | I_PurgInfoRecordWithOrgData | SupplierSubrange | Suppl. Subrange | |
| Manufacturer | I_PurgInfoRecordWithOrgData | Manufacturer | Manufacturer | |
| IncotermsClassification | I_PurgInfoRecordWithOrgData | IncotermsClassification | Incoterms | |
| TaxCode | I_PurgInfoRecordWithOrgData | TaxCode | Tax Code | |
| PriorSupplier | I_PurgInfoRecordWithOrgData | PriorSupplier | Prior Supplier | |
| PricingDateControl | I_PurgInfoRecordWithOrgData | PricingDateControl | Pr. Date Cat. | |
| SupplierMaterialNumber | I_PurgInfoRecordWithOrgData | SupplierMaterialNumber | Supp. Mat. No. | |
| MaterialPlannedDeliveryDurn | I_PurgInfoRecordWithOrgData | MaterialPlannedDeliveryDurn | Pl. Deliv. Time | |
| OverdelivTolrtdLmtRatioInPct | I_PurgInfoRecordWithOrgData | OverdelivTolrtdLmtRatioInPct | Overdeliv. Tol. | |
| UnderdelivTolrtdLmtRatioInPct | I_PurgInfoRecordWithOrgData | UnderdelivTolrtdLmtRatioInPct | Underdel. Tol. | |
| IsDeleted | I_PurgInfoRecordWithOrgData | IsDeleted | TRUE | |
| AvailabilityStartDate | I_PurgInfoRecordWithOrgData | AvailabilityStartDate | Available from | |
| AvailabilityEndDate | I_PurgInfoRecordWithOrgData | AvailabilityEndDate | Available to | |
| SupplierName | ||||
| PlantName | ||||
| TaxCalculationProcedure | ||||
| PurchasingInfoRecord | Info Record | |||
| KEY | PurchasingOrganization | I_PurInfCndPeriod | PurchasingOrganization | Purchasing Organization |
| KEY | PurchasingInfoRecordCategory | I_PurInfCndPeriod | PurchasingInfoRecordCategory | Infotype |
| KEY | Plant | I_PurInfCndPeriod | Plant | Valuation Area |
| KEY | ConditionValidityEndDate | I_PurInfCndPeriod | ConditionValidityEndDate | Valid To |
| KEY | ConditionRecord | I_PurInfCndPeriod | ConditionRecord | Cond.Record No. |
| Currency | _InfoRecord | Currency | Valuation Crcy | |
| PurchasingGroup | _InfoRecord | PurchasingGroup | Purchasing Group | |
| PurchasingDocument | ||||
| PurchasingDocumentItem | ||||
| FormattedPurchaseOrderItem | ||||
| ConditionValidityStartDate | I_PurInfCndPeriod | ConditionValidityStartDate | Valid From | |
| ConditionIsDeleted | I_PurInfCndPeriod | ConditionIsDeleted | Deletion Indic. | |
| ConditionRateValue | I_PurInfCndPeriod | ConditionRateValue | Condition Rate Value | |
| ConditionRateValueUnit | I_PurInfCndPeriod | ConditionRateValueUnit | Unit of Condition Rate Value | |
| ConditionQuantity | ||||
| ConditionQuantityUnit | I_PurInfCndPeriod | ConditionQuantityUnit | Unit of Measure | |
| BaseUnit | _InfoRecord | PurgDocOrderQuantityUnit | Purchasing Document Order Qty Unit | |
| NumberOfItems | 0 | |||
| HierarchyNodeLevel | ||||
| PurgDocDrillDownState | ||||
| PurchasingDocumentType | ||||
| Supplier | _InfoRecord | Supplier | Supplier | |
| Material | _InfoRecord | Material | Vehicle Model | |
| MaterialGroup | _InfoRecord | MaterialGroup | Product Group | |
| SupplierSubrange | _InfoRecord | SupplierSubrange | Suppl. Subrange | |
| Manufacturer | _InfoRecord | Manufacturer | Manufacturer | |
| IncotermsClassification | _InfoRecord | IncotermsClassification | Incoterms | |
| TaxCode | _InfoRecord | TaxCode | Tax Code | |
| PriorSupplier | _InfoRecord | PriorSupplier | Prior Supplier | |
| PricingDateControl | _InfoRecord | PricingDateControl | Pr. Date Cat. | |
| SupplierMaterialNumber | _InfoRecord | SupplierMaterialNumber | Supp. Mat. No. | |
| MaterialPlannedDeliveryDurn | _InfoRecord | MaterialPlannedDeliveryDurn | Pl. Deliv. Time | |
| OverdelivTolrtdLmtRatioInPct | _InfoRecord | OverdelivTolrtdLmtRatioInPct | Overdeliv. Tol. | |
| UnderdelivTolrtdLmtRatioInPct | _InfoRecord | UnderdelivTolrtdLmtRatioInPct | Underdel. Tol. | |
| IsDeleted | _InfoRecord | IsDeleted | TRUE | |
| AvailabilityStartDate | _InfoRecord | AvailabilityStartDate | Available from | |
| AvailabilityEndDate | _InfoRecord | AvailabilityEndDate | Available to | |
| SupplierName | ||||
| PlantName | ||||
| TaxCalculationProcedure | ||||
| ConditionType | I_PurInfCndPeriod | ConditionType | Condition type |
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 P_PurInfoRecdPrHist.
-- 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: PPURINFRECHIST
CREATE VIEW P_PurInfoRecdPrHist AS
SELECT
_Header.PurchasingInfoRecord AS PurchasingInfoRecord,
_Header.PurchasingOrganization AS PurchasingOrganization,
_Header.PurchasingInfoRecordCategory AS PurchasingInfoRecordCategory,
_Header.Plant AS Plant,
'00000000' AS ConditionValidityEndDate,
cast('0000000000' as knumh) AS ConditionRecord,
cast(concat(concat(concat(concat(concat(concat(_Header.PurchasingInfoRecord, '/'), _Header.PurchasingOrganization),'/'), _Header.PurchasingInfoRecordCategory),'/'), _Header.Plant) as abap.char(50)) as FormattedPurDoc AS char50asFormattedPurDoc,
_Header.Currency AS Currency,
_Header.PurchasingGroup AS PurchasingGroup,
cast('_' as ebeln) AS PurchasingDocument,
cast('00000' as ebelp) AS PurchasingDocumentItem,
cast('_' as abap.char(50)) AS FormattedPurchaseOrderItem,
cast('00000000' as abap.dats) AS ConditionValidityStartDate,
'_' AS ConditionIsDeleted,
cast(0 as kbetr_kond) AS ConditionRateValue,
cast('_' as konwa) AS ConditionRateValueUnit,
cast(0 as abap.quan(13,3)) AS ConditionQuantity,
cast('_' as kmein) AS ConditionQuantityUnit,
_Header.PurgDocOrderQuantityUnit AS BaseUnit,
cast(0 as abap.int4 ) AS NumberOfItems,
cast('0' as abap.char(1)) AS HierarchyNodeLevel,
cast('expanded' as abap.char(8)) AS PurgDocDrillDownState,
cast('0' as abap.char(1)) AS PurchasingDocumentType,
cast(' ' as abap.char(50)) AS ParentNode,
cast(0 as kbetr_kond) AS NetAmount,
_Header.Supplier AS Supplier,
_Header.Material AS Material,
case when _Header.MaterialGroup = '' then _Material.MaterialGroup else _Header.MaterialGroup end as MaterialGroup AS MaterialGroupendasMaterialGroup,
_Header.SupplierSubrange AS SupplierSubrange,
_Header.Manufacturer AS Manufacturer,
_Header.IncotermsClassification AS IncotermsClassification,
_Header.TaxCode AS TaxCode,
_Header.PriorSupplier AS PriorSupplier,
_Header.PricingDateControl AS PricingDateControl,
_Header.SupplierMaterialNumber AS SupplierMaterialNumber,
_Header.MaterialPlannedDeliveryDurn AS MaterialPlannedDeliveryDurn,
_Header.OverdelivTolrtdLmtRatioInPct AS OverdelivTolrtdLmtRatioInPct,
_Header.UnderdelivTolrtdLmtRatioInPct AS UnderdelivTolrtdLmtRatioInPct,
_Header.IsDeleted AS IsDeleted,
_Header.AvailabilityStartDate AS AvailabilityStartDate,
_Header.AvailabilityEndDate AS AvailabilityEndDate,
_Header._Supplier.SupplierName AS SupplierName,
_Header._Plant.PlantName AS PlantName,
_Header._Plant._StandardOrganizationAddress._Country.TaxCalculationProcedure AS TaxCalculationProcedure,
_InfoRecord.MaterialGroup AS MaterialGroup,
_Item.ConditionType AS ConditionType
FROM I_PurgInfoRecordWithOrgData AS _Header
LEFT OUTER JOIN I_Material AS _Material ON _Material.Material = Material -- association [0..1]
LEFT OUTER JOIN I_PurgInfoRecordWithOrgData AS _InfoRecord ON PurchasingInfoRecord = _InfoRecord.PurchasingInfoRecord AND Plant = _InfoRecord.Plant AND PurchasingInfoRecordCategory = _InfoRecord.PurchasingInfoRecordCategory AND PurchasingOrganization = _InfoRecord.PurchasingOrganization -- association [0..1]
-- UNION ALL with additional select branch(es): I_PurInfCndPeriod
;
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