I_USFedPurchasingHistory

DDL: I_USFEDPURCHASINGHISTORY Type: view_entity COMPOSITE

History per Purchasing Document and Item

I_USFedPurchasingHistory is a Composite CDS View that provides data about "History per Purchasing Document and Item" in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrderHistoryAPI01) and exposes 5 fields with key fields PurchasingDocument, PurchasingDocumentItem, PPSPurgHistDocumentCategory.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseOrderHistoryAPI01 PurchasingHistory from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label History per Purchasing Document and Item view
Metadata.ignorePropagatedAnnotations true view
Analytics.internalName #LOCAL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument
KEY PurchasingDocumentItem
KEY PPSPurgHistDocumentCategory I_PurchaseOrderHistoryAPI01 PurchasingHistoryDocumentType
UnitOfMeasure I_PurchaseOrderHistoryAPI01 PurchaseOrderQuantityUnit Order Unit
QuantityendasQuantity

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 I_USFedPurchasingHistory.
-- 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.

CREATE VIEW I_USFedPurchasingHistory AS
SELECT
  cast( PurchasingHistory.PurchaseOrder as pps_purchasing_document preserving type ) AS PurchasingDocument,
  cast( PurchasingHistory.PurchaseOrderItem as pps_purchasing_document_item preserving type ) AS PurchasingDocumentItem,
  PurchasingHistory.PurchasingHistoryDocumentType AS PPSPurgHistDocumentCategory,
  PurchasingHistory.PurchaseOrderQuantityUnit AS UnitOfMeasure,
  sum( ( case PurchasingHistory.DebitCreditCode when 'H' then ( PurchasingHistory.Quantity * -1 ) else PurchasingHistory.Quantity end ) ) as Quantity AS QuantityendasQuantity
FROM I_PurchaseOrderHistoryAPI01 AS PurchasingHistory
;