P_PurchaseOrderItemPAI_08
Purchase OrderItem PAI 08
P_PurchaseOrderItemPAI_08 is a Consumption CDS View that provides data about "Purchase OrderItem PAI 08" in SAP S/4HANA. It reads from 2 data sources (P_QuantityContractWithHistory1, P_PurchaseOrderItemPAI) and exposes 18 fields. Part of development package ODATA_MM_ANALYTICS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_QuantityContractWithHistory1 | History | from |
| P_PurchaseOrderItemPAI | P_PurchaseOrderItemPAI | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPOITEMPAI48 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| PurchaseOrder | P_PurchaseOrderItemPAI | PurchaseOrder | Purchasing Document | |
| PurchaseOrderItem | P_PurchaseOrderItemPAI | PurchaseOrderItem | Purchasing Document Item | |
| PurchaseOrderCategory | P_PurchaseOrderItemPAI | PurchaseOrderCategory | Doc. Category | |
| DocumentCurrency | P_PurchaseOrderItemPAI | DocumentCurrency | Document Currency | |
| PurchaseContractItem | P_PurchaseOrderItemPAI | PurchaseContractItem | Item | |
| PurchaseContract | P_PurchaseOrderItemPAI | PurchaseContract | Purchasing Doc. | |
| Plant | P_PurchaseOrderItemPAI | Plant | Valuation Area | |
| CompanyCode | P_PurchaseOrderItemPAI | CompanyCode | Receiver Company Code | |
| CONT_LEN | CONT_LEN | |||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndDate | ValidityEndDate | ValidTo | ||
| TargetQuantity | P_QuantityContractWithHistory1 | TargetQuantity | Target Quantity | |
| TargetAmount | P_QuantityContractWithHistory1 | TargetAmount | Target Value | |
| CONT_DAYS_LEFT | ||||
| RunningDays | ||||
| NetAmount | NetAmount | Stated Amount | ||
| ConsumedQty |
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_PurchaseOrderItemPAI_08.
-- 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: PPOITEMPAI48
CREATE VIEW P_PurchaseOrderItemPAI_08 AS
SELECT
P_PurchaseOrderItemPAI.PurchaseOrder AS PurchaseOrder,
P_PurchaseOrderItemPAI.PurchaseOrderItem AS PurchaseOrderItem,
P_PurchaseOrderItemPAI.PurchaseOrderCategory AS PurchaseOrderCategory,
P_PurchaseOrderItemPAI.DocumentCurrency AS DocumentCurrency,
P_PurchaseOrderItemPAI.PurchaseContractItem AS PurchaseContractItem,
P_PurchaseOrderItemPAI.PurchaseContract AS PurchaseContract,
P_PurchaseOrderItemPAI.Plant AS Plant,
P_PurchaseOrderItemPAI.CompanyCode AS CompanyCode,
CONT_LEN,
PurchaseOrderDate,
ValidityStartDate,
ValidityEndDate,
History.TargetQuantity AS TargetQuantity,
History.TargetAmount AS TargetAmount,
dats_days_between(PurchaseOrderDate, ValidityEndDate) AS CONT_DAYS_LEFT,
dats_days_between(ValidityStartDate , PurchaseOrderDate ) AS RunningDays,
NetAmount,
sum(ReleaseOrderItemOrderQuantity ) AS ConsumedQty
FROM P_QuantityContractWithHistory1 AS History
INNER JOIN P_PurchaseOrderItemPAI ON /* join condition not captured in parsed metadata */
;
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