P_POItem
Legacy Purchase Order items
P_POItem is a Consumption CDS View that provides data about "Legacy Purchase Order items" in SAP S/4HANA. It reads from 3 data sources (P_POItemCnvrtdAmounts, P_POItemCnvrtdAmounts, P_POItemCnvrtdAmounts) and exposes 160 fields with key fields PurchaseOrder, PurchaseOrderItem, PurchaseOrderItem, PurchaseOrderItem. It has 1 association to related views. Part of development package ODATA_MM_PUR_POITEMS_MONI.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_POItemCnvrtdAmounts | P_POItemCnvrtdAmounts | from |
| P_POItemCnvrtdAmounts | P_POItemCnvrtdAmounts | union_all |
| P_POItemCnvrtdAmounts | P_POItemCnvrtdAmounts | union_all |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | abap.cuky(5) |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_POItemNextOpenSchedLineQty | _NextOpenScheduleLine | $projection.PurchaseOrder = _NextOpenScheduleLine.PurchaseOrder and $projection.PurchaseOrderItem = _NextOpenScheduleLine.PurchaseOrderItem |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURORDITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Legacy Purchase Order items | view |
Fields (160)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | Purchasing Document | |
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| Supplier | Supplier | Supplier | ||
| SupplierQuotation | SupplierQuotation | RFQ | ||
| SupplierQuotationItem | SupplierQuotationItem | Supplier Quotation Item | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CreationDate | CreationDate | Time Stamp | ||
| CreatedByUser | CreatedByUser | User Name | ||
| PurchaseOrderItemText | PurchaseOrderItemText | Short Text | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Plant | Plant | Valuation Area | ||
| ProductType | ProductType | Product Type Group | ||
| PurchaseOrderItemCategory | PurchaseOrderItemCategory | Item Category | ||
| PurOrderItemExtCategory | ||||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| ServicePerformer | ServicePerformer | Service Performer | ||
| IsReturnsItem | IsReturnsItem | Returns Item | ||
| GoodsReceiptIsExpected | GoodsReceiptIsExpected | Goods Receipt | ||
| GoodsReceiptIsNonValuated | GoodsReceiptIsNonValuated | GR Non-Valuated | ||
| IsCompletelyDelivered | IsCompletelyDelivered | Is completely delivered | ||
| InvoiceIsExpected | InvoiceIsExpected | Invoice Receipt | ||
| InvoiceIsGoodsReceiptBased | InvoiceIsGoodsReceiptBased | GR-Based IV | ||
| IsFinallyInvoiced | IsFinallyInvoiced | Final Invoice | ||
| IsCompleted | ||||
| StorageLocation | StorageLocation | StorageLocation | ||
| PurchasingInfoRecord | PurchasingInfoRecord | Info Record | ||
| IsInfoRecordUpdated | IsInfoRecordUpdated | InfoUpdate | ||
| PurchaseContract | PurchaseContract | Purchasing Doc. | ||
| PurchaseContractItem | PurchaseContractItem | Item | ||
| PurchaseRequisition | PurchaseRequisition | Requisition | ||
| PurchaseRequisitionItem | PurchaseRequisitionItem | Requisn. item | ||
| RequestForQuotation | RequestForQuotation | RFQ | ||
| RequestForQuotationItem | RequestForQuotationItem | RFQ Item | ||
| RequirementTracking | RequirementTracking | Tracking Number | ||
| RequisitionerName | RequisitionerName | Requisitioner | ||
| quan143endasNextDeliveryQuantity | ||||
| ScheduleLine | _NextOpenScheduleLine | ScheduleLine | Schedule Line | |
| curr215endasExpectedOverallLimitAmount | ||||
| curr215endasOverallLimitAmount | ||||
| NetPriceAmount | NetPriceAmount | Net Price | ||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| curr215endendasStillToBeDeliveredValue | ||||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| OrderPriceUnit | OrderPriceUnit | Order Price Un. | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| Supplier | Supplier | Supplier | ||
| SupplierQuotation | SupplierQuotation | RFQ | ||
| SupplierQuotationItem | SupplierQuotationItem | Supplier Quotation Item | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CreationDate | CreationDate | Time Stamp | ||
| CreatedByUser | CreatedByUser | User Name | ||
| PurchaseOrderItemText | PurchaseOrderItemText | Short Text | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Plant | Plant | Valuation Area | ||
| ProductType | ProductType | Product Type Group | ||
| PurchaseOrderItemCategory | PurchaseOrderItemCategory | Item Category | ||
| PurOrderItemExtCategory | ||||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| ServicePerformer | ServicePerformer | Service Performer | ||
| IsReturnsItem | IsReturnsItem | Returns Item | ||
| GoodsReceiptIsExpected | GoodsReceiptIsExpected | Goods Receipt | ||
| GoodsReceiptIsNonValuated | GoodsReceiptIsNonValuated | GR Non-Valuated | ||
| IsCompletelyDelivered | IsCompletelyDelivered | Is completely delivered | ||
| InvoiceIsExpected | InvoiceIsExpected | Invoice Receipt | ||
| InvoiceIsGoodsReceiptBased | InvoiceIsGoodsReceiptBased | GR-Based IV | ||
| IsFinallyInvoiced | IsFinallyInvoiced | Final Invoice | ||
| IsCompleted | ||||
| StorageLocation | StorageLocation | StorageLocation | ||
| PurchasingInfoRecord | PurchasingInfoRecord | Info Record | ||
| IsInfoRecordUpdated | IsInfoRecordUpdated | InfoUpdate | ||
| PurchaseContract | PurchaseContract | Purchasing Doc. | ||
| PurchaseContractItem | PurchaseContractItem | Item | ||
| PurchaseRequisition | PurchaseRequisition | Requisition | ||
| PurchaseRequisitionItem | PurchaseRequisitionItem | Requisn. item | ||
| RequestForQuotation | RequestForQuotation | RFQ | ||
| RequestForQuotationItem | RequestForQuotationItem | RFQ Item | ||
| RequirementTracking | RequirementTracking | Tracking Number | ||
| RequisitionerName | RequisitionerName | Requisitioner | ||
| NextDeliveryDate | ||||
| NextDeliveryQuantity | ||||
| NextDeliveryStatus | ||||
| ScheduleLine | Schedule Line | |||
| curr215endasExpectedOverallLimitAmount | ||||
| curr215endasOverallLimitAmount | ||||
| NetPriceAmount | NetPriceAmount | Net Price | ||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| StillToBeDeliveredQuantity | ||||
| StillToBeDeliveredValue | ||||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| OrderPriceUnit | OrderPriceUnit | Order Price Un. | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| Supplier | Supplier | Supplier | ||
| SupplierQuotation | SupplierQuotation | RFQ | ||
| SupplierQuotationItem | SupplierQuotationItem | Supplier Quotation Item | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| CreationDate | CreationDate | Time Stamp | ||
| CreatedByUser | CreatedByUser | User Name | ||
| PurchaseOrderItemText | PurchaseOrderItemText | Short Text | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Plant | Plant | Valuation Area | ||
| ProductType | ProductType | Product Type Group | ||
| PurchaseOrderItemCategory | PurchaseOrderItemCategory | Item Category | ||
| PurOrderItemExtCategory | ||||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| ServicePerformer | ServicePerformer | Service Performer | ||
| IsReturnsItem | IsReturnsItem | Returns Item | ||
| GoodsReceiptIsExpected | GoodsReceiptIsExpected | Goods Receipt | ||
| GoodsReceiptIsNonValuated | GoodsReceiptIsNonValuated | GR Non-Valuated | ||
| IsCompletelyDelivered | IsCompletelyDelivered | Is completely delivered | ||
| InvoiceIsExpected | InvoiceIsExpected | Invoice Receipt | ||
| InvoiceIsGoodsReceiptBased | InvoiceIsGoodsReceiptBased | GR-Based IV | ||
| IsFinallyInvoiced | IsFinallyInvoiced | Final Invoice | ||
| IsCompleted | ||||
| StorageLocation | StorageLocation | StorageLocation | ||
| PurchasingInfoRecord | PurchasingInfoRecord | Info Record | ||
| IsInfoRecordUpdated | IsInfoRecordUpdated | InfoUpdate | ||
| PurchaseContract | PurchaseContract | Purchasing Doc. | ||
| PurchaseContractItem | PurchaseContractItem | Item | ||
| PurchaseRequisition | PurchaseRequisition | Requisition | ||
| PurchaseRequisitionItem | PurchaseRequisitionItem | Requisn. item | ||
| RequestForQuotation | RequestForQuotation | RFQ | ||
| RequestForQuotationItem | RequestForQuotationItem | RFQ Item | ||
| RequirementTracking | RequirementTracking | Tracking Number | ||
| RequisitionerName | RequisitionerName | Requisitioner | ||
| NextDeliveryDate | ||||
| NextDeliveryQuantity | ||||
| NextDeliveryStatus | ||||
| ScheduleLine | Schedule Line | |||
| curr215endasExpectedOverallLimitAmount | ||||
| curr215endasOverallLimitAmount | ||||
| NetPriceAmount | NetPriceAmount | Net Price | ||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| StillToBeDeliveredQuantity | ||||
| StillToBeDeliveredValue | ||||
| StillToInvoiceQuantity | ||||
| StillToInvoiceValue | ||||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| OrderPriceUnit | OrderPriceUnit | Order Price Un. | ||
| today |
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_POItem.
-- 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: PPURORDITEM
-- Parameters: P_DisplayCurrency : abap.cuky(5)
CREATE VIEW P_POItem AS
SELECT
PurchaseOrder,
PurchaseOrderItem,
PurchaseOrderType,
Supplier,
SupplierQuotation,
SupplierQuotationItem,
SupplyingPlant,
PurchasingOrganization,
PurchasingGroup,
CompanyCode,
DocumentCurrency,
PurchaseOrderDate,
CreationDate,
CreatedByUser,
PurchaseOrderItemText,
Material,
MaterialGroup,
Plant,
ProductType,
PurchaseOrderItemCategory,
cast('' as dtext) AS PurOrderItemExtCategory,
AccountAssignmentCategory,
ServicePerformer,
IsReturnsItem,
GoodsReceiptIsExpected,
GoodsReceiptIsNonValuated,
IsCompletelyDelivered,
InvoiceIsExpected,
InvoiceIsGoodsReceiptBased,
IsFinallyInvoiced,
cast('' as xfeld) AS IsCompleted,
StorageLocation,
PurchasingInfoRecord,
IsInfoRecordUpdated,
PurchaseContract,
PurchaseContractItem,
PurchaseRequisition,
PurchaseRequisitionItem,
RequestForQuotation,
RequestForQuotationItem,
RequirementTracking,
RequisitionerName,
case when (GoodsReceiptIsExpected <> 'X' or IsCompletelyDelivered = 'X' or PurchaseOrderItemCategory = 'A' or _NextOpenScheduleLine.ScheduleLineDeliveryDate is null) then cast( 0 as abap.quan(14,3)) when IsReturnsItem = 'X' then -abs(cast(_NextOpenScheduleLine.OpenPurchaseOrderQuantity as abap.quan(14,3))) else cast(_NextOpenScheduleLine.OpenPurchaseOrderQuantity as abap.quan(14,3)) end as NextDeliveryQuantity AS quan143endasNextDeliveryQuantity,
_NextOpenScheduleLine.ScheduleLine AS ScheduleLine,
case when PurchaseOrderItemCategory = 'A' then ExpectedOverallLimitAmount else cast (0 as abap.curr(21, 5)) end as ExpectedOverallLimitAmount AS curr215endasExpectedOverallLimitAmount,
case when PurchaseOrderItemCategory = 'A' then OverallLimitAmount else cast (0 as abap.curr(21, 5)) end as OverallLimitAmount AS curr215endasOverallLimitAmount,
NetPriceAmount,
NetPriceQuantity,
case when (GoodsReceiptIsExpected <> 'X' or IsCompletelyDelivered = 'X' or GoodsReceiptIsNonValuated = 'X' or (PurchaseOrderItemCategory = 'A' and ProductType = '1')) then cast(0 as abap.curr(21, 5)) when (PurchaseOrderItemCategory = 'A' and ProductType = '2') then case when GoodsReceiptAmount is null then NetAmount else NetAmount - GoodsReceiptAmount end when OrderQuantity is null or OrderQuantity = 0 or NetPriceQuantity = 0 then cast (0 as abap.curr(21, 5)) when IsReturnsItem = 'X' then case when GoodsReceiptQty is null or GoodsReceiptQty = 0 then -abs(NetAmount) else -abs(NetAmount - abs(-GoodsReceiptAmount ) ) end else case when GoodsReceiptQty is null or GoodsReceiptQty = 0 then NetAmount else cast( division(NetPriceAmount,NetPriceQuantity,5) * ( OrderQuantity - GoodsReceiptQty ) as abap.curr( 21, 5 ) ) end end as StillToBeDeliveredValue AS curr215endendasStillToBeDeliveredValue,
PurchaseOrderQuantityUnit,
OrderPriceUnit,
cast('00000000' as abap.dats) AS NextDeliveryDate,
cast( 0 as abap.quan(14,3)) AS NextDeliveryQuantity,
'04' AS NextDeliveryStatus,
cast(0 as abap.quan(13, 3)) AS StillToBeDeliveredQuantity,
cast(0 as abap.curr(21, 5)) AS StillToBeDeliveredValue,
cast(0 as abap.quan(13, 3)) AS StillToInvoiceQuantity,
cast(0 as abap.curr(21, 5)) AS StillToInvoiceValue,
$session.system_date AS today
FROM P_POItemCnvrtdAmounts
LEFT OUTER JOIN P_POItemNextOpenSchedLineQty AS _NextOpenScheduleLine ON PurchaseOrder = _NextOpenScheduleLine.PurchaseOrder AND PurchaseOrderItem = _NextOpenScheduleLine.PurchaseOrderItem -- association [0..1]
-- UNION ALL with additional select branch(es): P_POItemCnvrtdAmounts
;
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