P_PurchasingDocHistory

DDL: P_PURCHASINGDOCHISTORY SQL: PPURGDOCHIST Type: view BASIC

P_PurchasingDocHistory is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (ekbe) and exposes 11 fields with key fields PurchasingDocument, PurchasingDocumentItem, PurchaseOrderTransactionType, MaterialDocumentYear, MaterialDocument.

Data Sources (1)

SourceAliasJoin Type
ekbe ekbe from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPURGDOCHIST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
VDM.viewType #BASIC view
VDM.private true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument ebeln Source PurchDoc
KEY PurchasingDocumentItem ebelp Item pur. doc.
KEY PurchaseOrderTransactionType vgabe Transact. Type
KEY MaterialDocumentYear gjahr Settlement Year
KEY MaterialDocument belnr SD Document
KEY MaterialDocumentItem buzei Posting View Item
ReferenceDocument lfbnr Reference Doc.
ReferenceDocumentItem lfpos Ref. Doc. Item
GoodsMovementType bwart Valuation Type
FiscalYear lfgja Year Cur.Period
Quantity menge WarrCountValue

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_PurchasingDocHistory.
-- 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: PPURGDOCHIST

CREATE VIEW P_PurchasingDocHistory AS
SELECT
  ebeln AS PurchasingDocument,
  ebelp AS PurchasingDocumentItem,
  vgabe AS PurchaseOrderTransactionType,
  gjahr AS MaterialDocumentYear,
  belnr AS MaterialDocument,
  buzei AS MaterialDocumentItem,
  lfbnr AS ReferenceDocument,
  lfpos AS ReferenceDocumentItem,
  bwart AS GoodsMovementType,
  lfgja AS FiscalYear,
  menge AS Quantity
FROM ekbe
;