P_PurReqnItm
Purchase Requisition Item details
P_PurReqnItm is a Consumption CDS View that provides data about "Purchase Requisition Item details" in SAP S/4HANA. It reads from 2 data sources (P_PurReqnItmAccountAssignment, I_Purchaserequisitionitem) and exposes 110 fields with key fields PurchaseRequisition, PurchaseRequisitionItem, PurchaseReqnAcctAssgmtNumber, PurchaseRequisitionItem, PurchaseReqnAcctAssgmtNumber. It has 1 association to related views. Part of development package ODATA_MM_PUR_MYPURGDOCITEMS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_PurReqnItmAccountAssignment | ebkn | from |
| I_Purchaserequisitionitem | I_Purchaserequisitionitem | union_all |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Purchaserequisitionitem | eban | ebkn.PurchaseRequisition = eban.PurchaseRequisition and ebkn.PurchaseRequisitionItem = eban.PurchaseRequisitionItem |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURGDOCITEMSPR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Purchase Requisition Item details | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (110)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseRequisition | P_PurReqnItmAccountAssignment | PurchaseRequisition | Requisition |
| KEY | PurchaseRequisitionItem | P_PurReqnItmAccountAssignment | PurchaseRequisitionItem | Requisn. item |
| KEY | PurchaseReqnAcctAssgmtNumber | P_PurReqnItmAccountAssignment | PurchaseReqnAcctAssgmtNumber | |
| PurchaseReqnItemUniqueID | eban | PurchaseReqnItemUniqueID | Purch. Doc. ID | |
| PurchaseRequisitionItemText | eban | PurchaseRequisitionItemText | Short Text | |
| FormattedPurRequisitionItem | ||||
| PurchaseRequisitionType | eban | PurchaseRequisitionType | Order Type | |
| PurchasingDocumentItemCategory | eban | PurchasingDocumentItemCategory | Item Category | |
| MaterialGroup | eban | MaterialGroup | Product Group | |
| Material | eban | Material | Vehicle Model | |
| Batch | eban | Batch | Lot No. | |
| PurchasingOrganization | eban | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | eban | PurchasingGroup | Purchasing Group | |
| CompanyCode | eban | CompanyCode | Receiver Company Code | |
| Plant | eban | Plant | Valuation Area | |
| StorageLocation | eban | StorageLocation | StorageLocation | |
| AccountAssignmentCategory | eban | AccountAssignmentCategory | Acct Assgmt Cat | |
| curr252asPurReqnItemTotalAmount | ||||
| QuantityendasQuantity | ||||
| RequestedQuantity | eban | RequestedQuantity | Requested Quantity | |
| OrderedQuantity | eban | OrderedQuantity | Quantity | |
| OpenQuantity | ||||
| Supplier | eban | FixedSupplier | Fixed Vendor | |
| ExtDesiredSupplierForPurg | eban | Supplier | Supplier | |
| RequirementTracking | eban | RequirementTracking | Tracking Number | |
| RequisitionerName | eban | RequisitionerName | Requisitioner | |
| DeliveryDate | eban | DeliveryDate | Delivery Date | |
| CreatedByUser | eban | CreatedByUser | User Name | |
| PurchaseRequisitionReleaseDate | eban | PurchaseRequisitionReleaseDate | Release Date | |
| PurReqCreationDate | eban | PurReqCreationDate | Requisn Date | |
| PurchaseRequisitionPrice | eban | PurchaseRequisitionPrice | Valuation Price | |
| PurReqnPriceQuantity | eban | PurReqnPriceQuantity | Price unit | |
| BaseUnit | eban | BaseUnit | Unit of Measure | |
| PurReqnItemCurrency | eban | PurReqnItemCurrency | Currency | |
| PurReqnReleaseStatus | eban | PurReqnReleaseStatus | Proc.state | |
| Status | eban | ProcessingStatus | Worklist Status | |
| ObjectType | ||||
| ServicePerformer | eban | ServicePerformer | Service Performer | |
| CostCenter | P_PurReqnItmAccountAssignment | CostCenter | Cost Center | |
| SalesOrder | P_PurReqnItmAccountAssignment | SalesOrder | SD Document | |
| _Supplier | eban | _Supplier | ||
| _AccAssgnmtCategory | eban | _AccAssgnmtCategory | ||
| _Plant | eban | _Plant | ||
| _PurchasingDocumentType | eban | _PurchasingDocumentType | ||
| _MaterialGroup | eban | _MaterialGroup | ||
| _Material | eban | _Material | ||
| _PurchasingOrganization | eban | _PurchasingOrganization | ||
| _PurchasingGroup | eban | _PurchasingGroup | ||
| _StorageLocation | eban | _StorageLocation | ||
| SupplyingPlant | eban | SupplyingPlant | Supplying Plant | |
| PurchaseOrder | eban | PurchasingDocument | Purchasing Document | |
| _SupplyingPlant | eban | _SupplyingPlant | ||
| WBSElementExternalID | P_PurReqnItmAccountAssignment | WBSElementExternalID | WBS Element External ID | |
| WBSElementObject | WBSElementObject | Object number | ||
| KEY | PurchaseRequisitionItem | PurchaseRequisitionItem | Requisn. item | |
| KEY | PurchaseReqnAcctAssgmtNumber | |||
| PurchaseReqnItemUniqueID | PurchaseReqnItemUniqueID | Purch. Doc. ID | ||
| PurchaseRequisitionItemText | PurchaseRequisitionItemText | Short Text | ||
| FormattedPurRequisitionItem | ||||
| PurchaseRequisitionType | PurchaseRequisitionType | Order Type | ||
| PurchasingDocumentItemCategory | PurchasingDocumentItemCategory | Item Category | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Material | Material | Vehicle Model | ||
| Batch | Batch | Lot No. | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| MultipleAcctAssgmtDistrPercent | ||||
| curr252asPurReqnItemTotalAmount | ||||
| PurgDocNetAmount | ||||
| Quantity | ||||
| RequestedQuantity | RequestedQuantity | Requested Quantity | ||
| OrderedQuantity | OrderedQuantity | Quantity | ||
| OpenQuantity | ||||
| Supplier | FixedSupplier | Fixed Vendor | ||
| ExtDesiredSupplierForPurg | Supplier | Supplier | ||
| RequirementTracking | RequirementTracking | Tracking Number | ||
| RequisitionerName | RequisitionerName | Requisitioner | ||
| DeliveryDate | DeliveryDate | Delivery Date | ||
| CreatedByUser | CreatedByUser | User Name | ||
| PurchaseRequisitionReleaseDate | PurchaseRequisitionReleaseDate | Release Date | ||
| PurReqCreationDate | PurReqCreationDate | Requisn Date | ||
| PurchaseRequisitionPrice | PurchaseRequisitionPrice | Valuation Price | ||
| PurReqnPriceQuantity | PurReqnPriceQuantity | Price unit | ||
| BaseUnit | BaseUnit | Unit of Measure | ||
| PurReqnItemCurrency | PurReqnItemCurrency | Currency | ||
| PurReqnReleaseStatus | PurReqnReleaseStatus | Proc.state | ||
| Status | ProcessingStatus | Worklist Status | ||
| ObjectType | ||||
| ServicePerformer | Service Performer | |||
| CostCenter | Cost Center | |||
| SalesOrder | SD Document | |||
| _Supplier | _Supplier | |||
| _AccAssgnmtCategory | _AccAssgnmtCategory | |||
| _Plant | _Plant | |||
| _PurchasingDocumentType | _PurchasingDocumentType | |||
| _MaterialGroup | _MaterialGroup | |||
| _Material | _Material | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _StorageLocation | _StorageLocation | |||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| PurchaseOrder | PurchasingDocument | Purchasing Document | ||
| _SupplyingPlant | _SupplyingPlant | |||
| WBSElementExternalID | WBS Element External ID | |||
| WBSElementObject | Object number | |||
| WorkItem |
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_PurReqnItm.
-- 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: PPURGDOCITEMSPR
CREATE VIEW P_PurReqnItm AS
SELECT
ebkn.PurchaseRequisition AS PurchaseRequisition,
ebkn.PurchaseRequisitionItem AS PurchaseRequisitionItem,
ebkn.PurchaseReqnAcctAssgmtNumber AS PurchaseReqnAcctAssgmtNumber,
eban.PurchaseReqnItemUniqueID AS PurchaseReqnItemUniqueID,
eban.PurchaseRequisitionItemText AS PurchaseRequisitionItemText,
concat(concat(ebkn.PurchaseRequisition, '/'), ebkn.PurchaseRequisitionItem) AS FormattedPurRequisitionItem,
eban.PurchaseRequisitionType AS PurchaseRequisitionType,
eban.PurchasingDocumentItemCategory AS PurchasingDocumentItemCategory,
eban.MaterialGroup AS MaterialGroup,
eban.Material AS Material,
eban.Batch AS Batch,
eban.PurchasingOrganization AS PurchasingOrganization,
eban.PurchasingGroup AS PurchasingGroup,
eban.CompanyCode AS CompanyCode,
eban.Plant AS Plant,
eban.StorageLocation AS StorageLocation,
eban.AccountAssignmentCategory AS AccountAssignmentCategory,
cast( case eban.PurReqnPriceQuantity when 0 then eban.PurchaseRequisitionPrice * eban.RequestedQuantity else division(eban.PurchaseRequisitionPrice * eban.RequestedQuantity, eban.PurReqnPriceQuantity, 2) end as abap.curr( 25, 2 )) as PurReqnItemTotalAmount AS curr252asPurReqnItemTotalAmount,
case when PurchaseReqnAcctAssgmtNumber = '00' then cast(0 as abap.quan(13,3)) else ebkn.Quantity end as Quantity AS QuantityendasQuantity,
eban.RequestedQuantity AS RequestedQuantity,
eban.OrderedQuantity AS OrderedQuantity,
cast (eban.RequestedQuantity - eban.OrderedQuantity as obmng) AS OpenQuantity,
eban.FixedSupplier AS Supplier,
eban.Supplier AS ExtDesiredSupplierForPurg,
eban.RequirementTracking AS RequirementTracking,
eban.RequisitionerName AS RequisitionerName,
eban.DeliveryDate AS DeliveryDate,
eban.CreatedByUser AS CreatedByUser,
eban.PurchaseRequisitionReleaseDate AS PurchaseRequisitionReleaseDate,
eban.PurReqCreationDate AS PurReqCreationDate,
eban.PurchaseRequisitionPrice AS PurchaseRequisitionPrice,
eban.PurReqnPriceQuantity AS PurReqnPriceQuantity,
eban.BaseUnit AS BaseUnit,
eban.PurReqnItemCurrency AS PurReqnItemCurrency,
eban.PurReqnReleaseStatus AS PurReqnReleaseStatus,
eban.ProcessingStatus AS Status,
cast('0' as numc1) AS ObjectType,
eban.ServicePerformer AS ServicePerformer,
ebkn.CostCenter AS CostCenter,
ebkn.SalesOrder AS SalesOrder,
eban._Supplier AS _Supplier,
eban._AccAssgnmtCategory AS _AccAssgnmtCategory,
eban._Plant AS _Plant,
eban._PurchasingDocumentType AS _PurchasingDocumentType,
eban._MaterialGroup AS _MaterialGroup,
eban._Material AS _Material,
eban._PurchasingOrganization AS _PurchasingOrganization,
eban._PurchasingGroup AS _PurchasingGroup,
eban._StorageLocation AS _StorageLocation,
eban.SupplyingPlant AS SupplyingPlant,
eban.PurchasingDocument AS PurchaseOrder,
eban._SupplyingPlant AS _SupplyingPlant,
ebkn.WBSElementExternalID AS WBSElementExternalID,
WBSElementObject,
cast(0 as abap.dec(3)) AS MultipleAcctAssgmtDistrPercent,
cast(0 as mm_a_target_amount) AS PurgDocNetAmount,
cast(0 as abap.quan(13,3)) AS Quantity,
'' AS WorkItem
FROM P_PurReqnItmAccountAssignment AS ebkn
LEFT OUTER JOIN I_Purchaserequisitionitem AS eban ON ebkn.PurchaseRequisition = eban.PurchaseRequisition AND ebkn.PurchaseRequisitionItem = eban.PurchaseRequisitionItem -- association [1..1]
-- UNION ALL with additional select branch(es): I_Purchaserequisitionitem
;
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