P_RU_PurchaseOrderHistoryGRIR
FI RU PurchaseOrder History GR/IR
P_RU_PurchaseOrderHistoryGRIR is a Consumption CDS View that provides data about "FI RU PurchaseOrder History GR/IR" in SAP S/4HANA. It reads from 2 data sources (I_PurchasingDocumentItem, P_RU_PurchaseOrderHistoryIR) and exposes 31 fields. Part of development package GLO_FIN_IS_VAT_RU_SPL.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingDocumentItem | PurchDocItem | from |
| P_RU_PurchaseOrderHistoryIR | PurchDocItemHistIR | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | PRUPURORDHGRIR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| PurchasingDocument | I_PurchasingDocumentItem | PurchasingDocument | Purchasing Document | |
| PurchasingDocumentItem | I_PurchasingDocumentItem | PurchasingDocumentItem | Purchasing Doc. Item | |
| Plant | I_PurchasingDocumentItem | Plant | Valuation Area | |
| PurchasingDocumentItemCategory | I_PurchasingDocumentItem | PurchasingDocumentItemCategory | Item Category | |
| GoodsReceiptIsExpected | I_PurchasingDocumentItem | GoodsReceiptIsExpected | Goods Receipt | |
| InvoiceIsGoodsReceiptBased | I_PurchasingDocumentItem | InvoiceIsGoodsReceiptBased | GR-Based IV | |
| IR | ||||
| IR_MaterialDocument | P_RU_PurchaseOrderHistoryIR | MaterialDocument | Material Doc. | |
| IR_MaterialDocumentYear | P_RU_PurchaseOrderHistoryIR | MaterialDocumentYear | Material Document Year | |
| IR_MaterialDocumentItem | P_RU_PurchaseOrderHistoryIR | MaterialDocumentItem | Material Document Item | |
| IR_PurchaseOrderHistCategory | P_RU_PurchaseOrderHistoryIR | PurchaseOrderHistCategory | ||
| IR_DebitCreditCode | P_RU_PurchaseOrderHistoryIR | DebitCreditCode | Single-Character Flag | |
| IR_Quantity | P_RU_PurchaseOrderHistoryIR | Quantity | Value | |
| IR_PurOrdAmountInCompCodeCrcy | P_RU_PurchaseOrderHistoryIR | PurOrdAmountInCompanyCodeCrcy | ||
| IR_PostingDate | P_RU_PurchaseOrderHistoryIR | PostingDate | Posting Date for GR | |
| IR_DocumentDate | P_RU_PurchaseOrderHistoryIR | DocumentDate | Journal Entry Date | |
| GR | ||||
| GR_MaterialDocument | PurchDocItemHistGR | MaterialDocument | Material Doc. | |
| GR_MaterialDocumentYear | PurchDocItemHistGR | MaterialDocumentYear | Material Document Year | |
| GR_MaterialDocumentItem | PurchDocItemHistGR | MaterialDocumentItem | Material Document Item | |
| GR_PurchaseOrderHistCategory | PurchDocItemHistGR | PurchaseOrderHistCategory | ||
| GR_DebitCreditCode | PurchDocItemHistGR | DebitCreditCode | Single-Character Flag | |
| GR_Quantity | PurchDocItemHistGR | Quantity | Value | |
| GR_PurOrdAmountInCompCodeCrcy | PurchDocItemHistGR | PurOrdAmountInCompanyCodeCrcy | ||
| GR_PostingDate | PurchDocItemHistGR | PostingDate | Posting Date for GR | |
| GR_DocumentDate | PurchDocItemHistGR | DocumentDate | Journal Entry Date | |
| GR_CompanyCode | PurchDocItemHistGR | CompanyCode | Receiver Company Code | |
| GRIR | ||||
| GRIR_ReferenceDocument | P_RU_PurchaseOrderHistoryIR | ReferenceDocument | Reference Document | |
| GRIR_ReferenceDocumentFisYear | P_RU_PurchaseOrderHistoryIR | ReferenceDocumentFiscalYear | Year Cur.Period | |
| GRIR_ReferenceDocumentItem | P_RU_PurchaseOrderHistoryIR | ReferenceDocumentItem | Reference item |
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_RU_PurchaseOrderHistoryGRIR.
-- 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: PRUPURORDHGRIR
CREATE VIEW P_RU_PurchaseOrderHistoryGRIR AS
SELECT
PurchDocItem.PurchasingDocument AS PurchasingDocument,
PurchDocItem.PurchasingDocumentItem AS PurchasingDocumentItem,
PurchDocItem.Plant AS Plant,
PurchDocItem.PurchasingDocumentItemCategory AS PurchasingDocumentItemCategory,
PurchDocItem.GoodsReceiptIsExpected AS GoodsReceiptIsExpected,
PurchDocItem.InvoiceIsGoodsReceiptBased AS InvoiceIsGoodsReceiptBased,
'|' AS IR,
PurchDocItemHistIR.MaterialDocument AS IR_MaterialDocument,
PurchDocItemHistIR.MaterialDocumentYear AS IR_MaterialDocumentYear,
PurchDocItemHistIR.MaterialDocumentItem AS IR_MaterialDocumentItem,
PurchDocItemHistIR.PurchaseOrderHistCategory AS IR_PurchaseOrderHistCategory,
PurchDocItemHistIR.DebitCreditCode AS IR_DebitCreditCode,
PurchDocItemHistIR.Quantity AS IR_Quantity,
PurchDocItemHistIR.PurOrdAmountInCompanyCodeCrcy AS IR_PurOrdAmountInCompCodeCrcy,
PurchDocItemHistIR.PostingDate AS IR_PostingDate,
PurchDocItemHistIR.DocumentDate AS IR_DocumentDate,
'|' AS GR,
PurchDocItemHistGR.MaterialDocument AS GR_MaterialDocument,
PurchDocItemHistGR.MaterialDocumentYear AS GR_MaterialDocumentYear,
PurchDocItemHistGR.MaterialDocumentItem AS GR_MaterialDocumentItem,
PurchDocItemHistGR.PurchaseOrderHistCategory AS GR_PurchaseOrderHistCategory,
PurchDocItemHistGR.DebitCreditCode AS GR_DebitCreditCode,
PurchDocItemHistGR.Quantity AS GR_Quantity,
PurchDocItemHistGR.PurOrdAmountInCompanyCodeCrcy AS GR_PurOrdAmountInCompCodeCrcy,
PurchDocItemHistGR.PostingDate AS GR_PostingDate,
PurchDocItemHistGR.DocumentDate AS GR_DocumentDate,
PurchDocItemHistGR.CompanyCode AS GR_CompanyCode,
'|' AS GRIR,
PurchDocItemHistIR.ReferenceDocument AS GRIR_ReferenceDocument,
PurchDocItemHistIR.ReferenceDocumentFiscalYear AS GRIR_ReferenceDocumentFisYear,
PurchDocItemHistIR.ReferenceDocumentItem AS GRIR_ReferenceDocumentItem
FROM I_PurchasingDocumentItem AS PurchDocItem
INNER JOIN P_RU_PurchaseOrderHistoryIR AS PurchDocItemHistIR 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