P_GRIRProcHistPredecessor
GR/IR Process History with Predecessor
P_GRIRProcHistPredecessor is a Consumption CDS View that provides data about "GR/IR Process History with Predecessor" in SAP S/4HANA. It reads from 1 data source (I_GRIRProcessHistory) and exposes 71 fields with key fields CompanyCode, PurchasingDocument, PurchasingDocumentItem, LastChangeDateTime. It has 1 association to related views. Part of development package FINS_FIS_FICO.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GRIRProcessHistory | I_GRIRProcessHistory | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_GRIRProcHistSuccssrTimestamp | prev | $projection.CompanyCode = prev.CompanyCode and $projection.PurchasingDocument = prev.PurchasingDocument and $projection.PurchasingDocumentItem = prev.PurchasingDocumentItem and $projection.LastChangeDateTime = prev.ImmediateNextChangeDateTime |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (71)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_GRIRProcessHistory | CompanyCode | Receiver Company Code |
| KEY | PurchasingDocument | I_GRIRProcessHistory | PurchasingDocument | Purchasing Document |
| KEY | PurchasingDocumentItem | I_GRIRProcessHistory | PurchasingDocumentItem | Purchasing Doc. Item |
| KEY | LastChangeDateTime | I_GRIRProcessHistory | LastChangeDateTime | Timestamp |
| LastChangedByUser | I_GRIRProcessHistory | LastChangedByUser | User Name | |
| GRIRClearingProcessStatus | I_GRIRProcessHistory | GRIRClearingProcessStatus | Status | |
| PrevGRIRClearingProcessStatus | prev | GRIRClearingProcessStatus | Status | |
| GRIRClearingProcessPriority | I_GRIRProcessHistory | GRIRClearingProcessPriority | Priority | |
| PrevGRIRClrgProcPriority | prev | GRIRClearingProcessPriority | Priority | |
| ResponsiblePerson | I_GRIRProcessHistory | ResponsiblePerson | Processor | |
| PrevResponsiblePerson | prev | ResponsiblePerson | Processor | |
| ResponsibleDepartment | I_GRIRProcessHistory | ResponsibleDepartment | Processing Department | |
| PrevResponsibleDepartment | prev | ResponsibleDepartment | Processing Department | |
| GRIRClearingProcessRootCause | I_GRIRProcessHistory | GRIRClearingProcessRootCause | Root Cause | |
| HasNote | I_GRIRProcessHistory | HasNote | TRUE | |
| SystemMessageIdentification | I_GRIRProcessHistory | SystemMessageIdentification | Message ID | |
| SystemMessageType | I_GRIRProcessHistory | SystemMessageType | Message type | |
| SystemMessageNumber | I_GRIRProcessHistory | SystemMessageNumber | Message Number | |
| AccountAssignmentCategory | I_GRIRProcessHistory | AccountAssignmentCategory | Acct Assgmt Cat | |
| BalAmtInCompanyCodeCrcy | I_GRIRProcessHistory | BalAmtInCompanyCodeCrcy | Balance Amount | |
| BalanceQuantity | I_GRIRProcessHistory | BalanceQuantity | Balance Quantity | |
| IsFinallyInvoiced | I_GRIRProcessHistory | IsFinallyInvoiced | Final Invoice | |
| LatestOpenItemPostingDate | I_GRIRProcessHistory | LatestOpenItemPostingDate | Latest Posting Date | |
| MaterialGroup | I_GRIRProcessHistory | MaterialGroup | Product Group | |
| NumberOfGoodsReceipts | I_GRIRProcessHistory | NumberOfGoodsReceipts | Number of Goods Receipts | |
| NumberOfInvoiceReceipts | I_GRIRProcessHistory | NumberOfInvoiceReceipts | Number of Invoice Receipts | |
| OldestOpenItemPostingDate | I_GRIRProcessHistory | OldestOpenItemPostingDate | Oldest Posting Date | |
| Plant | I_GRIRProcessHistory | Plant | Valuation Area | |
| PurchasingGroup | I_GRIRProcessHistory | PurchasingGroup | Purchasing Group | |
| PurchasingOrganization | I_GRIRProcessHistory | PurchasingOrganization | Purchasing Organization | |
| Supplier | I_GRIRProcessHistory | Supplier | Supplier | |
| DueDays | I_GRIRProcessHistory | DueDays | Processing Time | |
| CompanyCodeCurrency | I_GRIRProcessHistory | CompanyCodeCurrency | Local Currency | |
| PurgDocOrderQuantityUnit | I_GRIRProcessHistory | PurgDocOrderQuantityUnit | Purchasing Document Order Qty Unit | |
| PrpsdResponsibleDepartment | I_GRIRProcessHistory | PrpsdResponsibleDepartment | Proposed Processing Department | |
| ProposedResponsiblePerson | I_GRIRProcessHistory | ProposedResponsiblePerson | Proposed Processor | |
| GRIRClrgProcessPrpsdStatus | I_GRIRProcessHistory | GRIRClrgProcessPrpsdStatus | Proposed Status | |
| GRIRClrgProcPrpsdPriority | I_GRIRProcessHistory | GRIRClrgProcPrpsdPriority | Proposed Priority | |
| GRIRClrgProcessPrpsdRootCause | I_GRIRProcessHistory | GRIRClrgProcessPrpsdRootCause | Proposed Root Cause | |
| PrpsdRespDeptMaxClProbability | I_GRIRProcessHistory | PrpsdRespDeptMaxClProbability | Processing Department Proposal Confidence | |
| PrpsdRespPersonMaxClassProblty | I_GRIRProcessHistory | PrpsdRespPersonMaxClassProblty | Processor Proposal Confidence | |
| GRIRProposedStatusMaxClProblty | I_GRIRProcessHistory | GRIRProposedStatusMaxClProblty | Status Proposal Confidence | |
| GRIRProposedPrioMaxClProblty | I_GRIRProcessHistory | GRIRProposedPrioMaxClProblty | Priority Proposal Confidence | |
| GRIRPrpsdRootCauseMaxClProblty | I_GRIRProcessHistory | GRIRPrpsdRootCauseMaxClProblty | Root Cause Proposal Confidence | |
| GoodsReceiptGoodsAmtInCCCrcy | I_GRIRProcessHistory | GoodsReceiptGoodsAmtInCCCrcy | Goods Receipt Amount (Goods) | |
| InvoiceRcptGoodsAmtInCCCrcy | I_GRIRProcessHistory | InvoiceRcptGoodsAmtInCCCrcy | Invoice Receipt Amount (Goods) | |
| GdsRcptDelivCostAmtInCCCrcy | I_GRIRProcessHistory | GdsRcptDelivCostAmtInCCCrcy | Goods Receipt Amount (Delivery Costs) | |
| InvcRcptDelivCostAmtInCCCrcy | I_GRIRProcessHistory | InvcRcptDelivCostAmtInCCCrcy | Invoice Receipt Amount (Delivery Costs) | |
| GoodsReceiptGoodsQuantity | I_GRIRProcessHistory | GoodsReceiptGoodsQuantity | Goods Receipt Quantity (Goods) | |
| InvoiceReceiptGoodsQuantity | I_GRIRProcessHistory | InvoiceReceiptGoodsQuantity | Invoice Receipt Quantity (Goods) | |
| GoodsReceiptDeliveryCostQty | I_GRIRProcessHistory | GoodsReceiptDeliveryCostQty | Goods Receipt Quantity (Delivery Costs) | |
| InvoiceRcptDeliveryCostQty | I_GRIRProcessHistory | InvoiceRcptDeliveryCostQty | Invoice Receipt Quantity (Deliv. Costs) | |
| GoodsBalanceAmountInCCCrcy | I_GRIRProcessHistory | GoodsBalanceAmountInCCCrcy | ||
| GoodsBalanceQuantity | I_GRIRProcessHistory | GoodsBalanceQuantity | ||
| DeliveryCostBalAmtInCCCrcy | I_GRIRProcessHistory | DeliveryCostBalAmtInCCCrcy | ||
| DeliveryCostBalanceQuantity | I_GRIRProcessHistory | DeliveryCostBalanceQuantity | ||
| GoodsReceiptAmountInCoCodeCrcy | I_GRIRProcessHistory | GoodsReceiptAmountInCoCodeCrcy | ||
| GoodsReceiptQty | I_GRIRProcessHistory | GoodsReceiptQty | Quantity | |
| InvoiceRcptAmtInCoCodeCrcy | I_GRIRProcessHistory | InvoiceRcptAmtInCoCodeCrcy | ||
| InvoiceReceiptQty | I_GRIRProcessHistory | InvoiceReceiptQty | ||
| IsGoodsRcptGoodsAmtSurplus | I_GRIRProcessHistory | IsGoodsRcptGoodsAmtSurplus | ||
| IsInvoiceGoodsAmountSurplus | I_GRIRProcessHistory | IsInvoiceGoodsAmountSurplus | ||
| IsGdsRcptDelivCostAmtSurplus | I_GRIRProcessHistory | IsGdsRcptDelivCostAmtSurplus | ||
| IsInvoiceDelivCostAmtSurplus | I_GRIRProcessHistory | IsInvoiceDelivCostAmtSurplus | ||
| IsGoodsRcptGoodsQtySurplus | I_GRIRProcessHistory | IsGoodsRcptGoodsQtySurplus | ||
| IsInvoiceGoodsQtySurplus | I_GRIRProcessHistory | IsInvoiceGoodsQtySurplus | ||
| IsGdsRcptDelivCostQtySurplus | I_GRIRProcessHistory | IsGdsRcptDelivCostQtySurplus | ||
| IsInvoiceDelivCostQtySurplus | I_GRIRProcessHistory | IsInvoiceDelivCostQtySurplus | ||
| _CompanyCode | I_GRIRProcessHistory | _CompanyCode | ||
| _PurchasingDocument | I_GRIRProcessHistory | _PurchasingDocument | ||
| _PurchasingDocumentItem | I_GRIRProcessHistory | _PurchasingDocumentItem |
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_GRIRProcHistPredecessor.
-- 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.
CREATE VIEW P_GRIRProcHistPredecessor AS
SELECT
I_GRIRProcessHistory.CompanyCode AS CompanyCode,
I_GRIRProcessHistory.PurchasingDocument AS PurchasingDocument,
I_GRIRProcessHistory.PurchasingDocumentItem AS PurchasingDocumentItem,
I_GRIRProcessHistory.LastChangeDateTime AS LastChangeDateTime,
I_GRIRProcessHistory.LastChangedByUser AS LastChangedByUser,
I_GRIRProcessHistory.GRIRClearingProcessStatus AS GRIRClearingProcessStatus,
prev.GRIRClearingProcessStatus AS PrevGRIRClearingProcessStatus,
I_GRIRProcessHistory.GRIRClearingProcessPriority AS GRIRClearingProcessPriority,
prev.GRIRClearingProcessPriority AS PrevGRIRClrgProcPriority,
I_GRIRProcessHistory.ResponsiblePerson AS ResponsiblePerson,
prev.ResponsiblePerson AS PrevResponsiblePerson,
I_GRIRProcessHistory.ResponsibleDepartment AS ResponsibleDepartment,
prev.ResponsibleDepartment AS PrevResponsibleDepartment,
I_GRIRProcessHistory.GRIRClearingProcessRootCause AS GRIRClearingProcessRootCause,
I_GRIRProcessHistory.HasNote AS HasNote,
I_GRIRProcessHistory.SystemMessageIdentification AS SystemMessageIdentification,
I_GRIRProcessHistory.SystemMessageType AS SystemMessageType,
I_GRIRProcessHistory.SystemMessageNumber AS SystemMessageNumber,
I_GRIRProcessHistory.AccountAssignmentCategory AS AccountAssignmentCategory,
I_GRIRProcessHistory.BalAmtInCompanyCodeCrcy AS BalAmtInCompanyCodeCrcy,
I_GRIRProcessHistory.BalanceQuantity AS BalanceQuantity,
I_GRIRProcessHistory.IsFinallyInvoiced AS IsFinallyInvoiced,
I_GRIRProcessHistory.LatestOpenItemPostingDate AS LatestOpenItemPostingDate,
I_GRIRProcessHistory.MaterialGroup AS MaterialGroup,
I_GRIRProcessHistory.NumberOfGoodsReceipts AS NumberOfGoodsReceipts,
I_GRIRProcessHistory.NumberOfInvoiceReceipts AS NumberOfInvoiceReceipts,
I_GRIRProcessHistory.OldestOpenItemPostingDate AS OldestOpenItemPostingDate,
I_GRIRProcessHistory.Plant AS Plant,
I_GRIRProcessHistory.PurchasingGroup AS PurchasingGroup,
I_GRIRProcessHistory.PurchasingOrganization AS PurchasingOrganization,
I_GRIRProcessHistory.Supplier AS Supplier,
I_GRIRProcessHistory.DueDays AS DueDays,
I_GRIRProcessHistory.CompanyCodeCurrency AS CompanyCodeCurrency,
I_GRIRProcessHistory.PurgDocOrderQuantityUnit AS PurgDocOrderQuantityUnit,
I_GRIRProcessHistory.PrpsdResponsibleDepartment AS PrpsdResponsibleDepartment,
I_GRIRProcessHistory.ProposedResponsiblePerson AS ProposedResponsiblePerson,
I_GRIRProcessHistory.GRIRClrgProcessPrpsdStatus AS GRIRClrgProcessPrpsdStatus,
I_GRIRProcessHistory.GRIRClrgProcPrpsdPriority AS GRIRClrgProcPrpsdPriority,
I_GRIRProcessHistory.GRIRClrgProcessPrpsdRootCause AS GRIRClrgProcessPrpsdRootCause,
I_GRIRProcessHistory.PrpsdRespDeptMaxClProbability AS PrpsdRespDeptMaxClProbability,
I_GRIRProcessHistory.PrpsdRespPersonMaxClassProblty AS PrpsdRespPersonMaxClassProblty,
I_GRIRProcessHistory.GRIRProposedStatusMaxClProblty AS GRIRProposedStatusMaxClProblty,
I_GRIRProcessHistory.GRIRProposedPrioMaxClProblty AS GRIRProposedPrioMaxClProblty,
I_GRIRProcessHistory.GRIRPrpsdRootCauseMaxClProblty AS GRIRPrpsdRootCauseMaxClProblty,
I_GRIRProcessHistory.GoodsReceiptGoodsAmtInCCCrcy AS GoodsReceiptGoodsAmtInCCCrcy,
I_GRIRProcessHistory.InvoiceRcptGoodsAmtInCCCrcy AS InvoiceRcptGoodsAmtInCCCrcy,
I_GRIRProcessHistory.GdsRcptDelivCostAmtInCCCrcy AS GdsRcptDelivCostAmtInCCCrcy,
I_GRIRProcessHistory.InvcRcptDelivCostAmtInCCCrcy AS InvcRcptDelivCostAmtInCCCrcy,
I_GRIRProcessHistory.GoodsReceiptGoodsQuantity AS GoodsReceiptGoodsQuantity,
I_GRIRProcessHistory.InvoiceReceiptGoodsQuantity AS InvoiceReceiptGoodsQuantity,
I_GRIRProcessHistory.GoodsReceiptDeliveryCostQty AS GoodsReceiptDeliveryCostQty,
I_GRIRProcessHistory.InvoiceRcptDeliveryCostQty AS InvoiceRcptDeliveryCostQty,
I_GRIRProcessHistory.GoodsBalanceAmountInCCCrcy AS GoodsBalanceAmountInCCCrcy,
I_GRIRProcessHistory.GoodsBalanceQuantity AS GoodsBalanceQuantity,
I_GRIRProcessHistory.DeliveryCostBalAmtInCCCrcy AS DeliveryCostBalAmtInCCCrcy,
I_GRIRProcessHistory.DeliveryCostBalanceQuantity AS DeliveryCostBalanceQuantity,
I_GRIRProcessHistory.GoodsReceiptAmountInCoCodeCrcy AS GoodsReceiptAmountInCoCodeCrcy,
I_GRIRProcessHistory.GoodsReceiptQty AS GoodsReceiptQty,
I_GRIRProcessHistory.InvoiceRcptAmtInCoCodeCrcy AS InvoiceRcptAmtInCoCodeCrcy,
I_GRIRProcessHistory.InvoiceReceiptQty AS InvoiceReceiptQty,
I_GRIRProcessHistory.IsGoodsRcptGoodsAmtSurplus AS IsGoodsRcptGoodsAmtSurplus,
I_GRIRProcessHistory.IsInvoiceGoodsAmountSurplus AS IsInvoiceGoodsAmountSurplus,
I_GRIRProcessHistory.IsGdsRcptDelivCostAmtSurplus AS IsGdsRcptDelivCostAmtSurplus,
I_GRIRProcessHistory.IsInvoiceDelivCostAmtSurplus AS IsInvoiceDelivCostAmtSurplus,
I_GRIRProcessHistory.IsGoodsRcptGoodsQtySurplus AS IsGoodsRcptGoodsQtySurplus,
I_GRIRProcessHistory.IsInvoiceGoodsQtySurplus AS IsInvoiceGoodsQtySurplus,
I_GRIRProcessHistory.IsGdsRcptDelivCostQtySurplus AS IsGdsRcptDelivCostQtySurplus,
I_GRIRProcessHistory.IsInvoiceDelivCostQtySurplus AS IsInvoiceDelivCostQtySurplus,
I_GRIRProcessHistory._CompanyCode AS _CompanyCode,
I_GRIRProcessHistory._PurchasingDocument AS _PurchasingDocument,
I_GRIRProcessHistory._PurchasingDocumentItem AS _PurchasingDocumentItem
FROM I_GRIRProcessHistory
LEFT OUTER JOIN P_GRIRProcHistSuccssrTimestamp AS prev ON CompanyCode = prev.CompanyCode AND PurchasingDocument = prev.PurchasingDocument AND PurchasingDocumentItem = prev.PurchasingDocumentItem AND LastChangeDateTime = prev.ImmediateNextChangeDateTime -- association [0..1]
;
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