C_PurgInfoRecdAvgPrHist

DDL: C_PURGINFORECDAVGPRHIST SQL: CPIRAVGPRHIST Type: view CONSUMPTION

Calculating Average Price History for PIR

C_PurgInfoRecdAvgPrHist is a Consumption CDS View that provides data about "Calculating Average Price History for PIR" in SAP S/4HANA. It reads from 1 data source (P_PurInfoRecdPrHist) and exposes 17 fields with key fields PurchasingInfoRecord, PurchasingOrganization, PurchasingInfoRecordCategory, Plant, ConditionValidityEndDate. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_PurInfoRecdPrHist P_PurInfoRecdPrHist from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _CalendarDate $projection.ConditionValidityStartDate = _CalendarDate.CalendarDate

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CPIRAVGPRHIST view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #NONE view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Calculating Average Price History for PIR view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY PurchasingInfoRecord PurchasingInfoRecord Info Record
KEY PurchasingOrganization PurchasingOrganization Purchasing Organization
KEY PurchasingInfoRecordCategory PurchasingInfoRecordCategory Infotype
KEY Plant Plant Valuation Area
KEY ConditionValidityEndDate ConditionValidityEndDate Valid To
KEY PurchasingDocument PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem PurchasingDocumentItem Purchasing Doc. Item
KEY ConditionRecord ConditionRecord Cond.Record No.
FormattedPurDoc FormattedPurDoc
ParentNode ParentNode Parent Node
PurchasingGroup PurchasingGroup Purchasing Group
HierarchyNodeLevel HierarchyNodeLevel Hierarchy Node Level
ConditionValidityStartDate ConditionValidityStartDate Valid From
NetAmount NetAmount Stated Amount
Currency Currency Valuation Crcy
FirstDayOfMonthDate _CalendarDate FirstDayOfMonthDate First Day of Month
PurchasingDocumentType PurchasingDocumentType RFQ 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 C_PurgInfoRecdAvgPrHist.
-- 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: CPIRAVGPRHIST

CREATE VIEW C_PurgInfoRecdAvgPrHist AS
SELECT
  PurchasingInfoRecord,
  PurchasingOrganization,
  PurchasingInfoRecordCategory,
  Plant,
  ConditionValidityEndDate,
  PurchasingDocument,
  PurchasingDocumentItem,
  ConditionRecord,
  FormattedPurDoc,
  ParentNode,
  PurchasingGroup,
  HierarchyNodeLevel,
  ConditionValidityStartDate,
  NetAmount,
  Currency,
  _CalendarDate.FirstDayOfMonthDate AS FirstDayOfMonthDate,
  PurchasingDocumentType
FROM P_PurInfoRecdPrHist
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON ConditionValidityStartDate = _CalendarDate.CalendarDate  -- association [0..1]
;