P_PurchasingDocumentItem

DDL: P_PURCHASINGDOCUMENTITEM SQL: PPURDOCITEM Type: view COMPOSITE

P_PurchasingDocumentItem is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (ekpo) and exposes 21 fields with key fields PurchasingDocument, PurchasingDocumentItem. It has 6 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ekpo ekpo from

Associations (6)

CardinalityTargetAliasCondition
[1..1] I_PurchasingDocument _PurchasingDocument $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_PurchasingDocumentCategory _PurgDocumentCategory $projection.PurchasingDocumentCategory = _PurgDocumentCategory.PurchasingDocumentCategory
[0..1] I_UnitOfMeasure _OrderQuantityUnit $projection.OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure
[0..*] I_PurgDocScheduleLine _ScheduleLine $projection.PurchasingDocument = _ScheduleLine.PurchasingDocument and $projection.PurchasingDocumentItem = _ScheduleLine.PurchasingDocumentItem

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PPURDOCITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument ekpo ebeln Source PurchDoc
KEY PurchasingDocumentItem ekpo ebelp Item pur. doc.
PurchasingDocumentCategory ekpo bstyp Source doc.cat.
PurchasingDocumentDeletionCode ekpo loekz Status
PurchasingDocumentItemText ekpo txz01 Text
IsCompletelyDelivered ekpo elikz Delivery Completion
OrderQuantityUnit ekpo meins Valuation Unit
OrderQuantity ekpo menge WarrCountValue
DocumentCurrency _PurchasingDocument DocumentCurrency Document Currency
NetAmount ekpo netwr Value
Material ekpo matnr Vehicle Model
MRPArea ekpo berid Single-Character Flag
CompanyCode ekpo bukrs Value
InventorySpecialStockType ekpo sobkz Special Stock
_Material _Material
_DocumentCurrency _PurchasingDocument _DocumentCurrency
_CompanyCode _CompanyCode
_PurgDocumentCategory _PurgDocumentCategory
_OrderQuantityUnit _OrderQuantityUnit
_ScheduleLine _ScheduleLine
_PurchasingDocument _PurchasingDocument

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_PurchasingDocumentItem.
-- 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: PPURDOCITEM

CREATE VIEW P_PurchasingDocumentItem AS
SELECT
  ekpo.ebeln AS PurchasingDocument,
  ekpo.ebelp AS PurchasingDocumentItem,
  ekpo.bstyp AS PurchasingDocumentCategory,
  ekpo.loekz AS PurchasingDocumentDeletionCode,
  ekpo.txz01 AS PurchasingDocumentItemText,
  ekpo.elikz AS IsCompletelyDelivered,
  ekpo.meins AS OrderQuantityUnit,
  ekpo.menge AS OrderQuantity,
  _PurchasingDocument.DocumentCurrency AS DocumentCurrency,
  ekpo.netwr AS NetAmount,
  ekpo.matnr AS Material,
  ekpo.berid AS MRPArea,
  ekpo.bukrs AS CompanyCode,
  ekpo.sobkz AS InventorySpecialStockType,
  _PurchasingDocument._DocumentCurrency AS _DocumentCurrency
FROM ekpo
LEFT OUTER JOIN I_PurchasingDocument AS _PurchasingDocument ON PurchasingDocument = _PurchasingDocument.PurchasingDocument  -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_PurchasingDocumentCategory AS _PurgDocumentCategory ON PurchasingDocumentCategory = _PurgDocumentCategory.PurchasingDocumentCategory  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderQuantityUnit ON OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_PurgDocScheduleLine AS _ScheduleLine ON PurchasingDocument = _ScheduleLine.PurchasingDocument AND PurchasingDocumentItem = _ScheduleLine.PurchasingDocumentItem  -- association [0..*]
;