P_PurchasingDocumentItem
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)
| Source | Alias | Join Type |
|---|---|---|
| ekpo | ekpo | from |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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..*]
;
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