P_GRIRProcessSituation

DDL: P_GRIRPROCESSSITUATION Type: view_entity CONSUMPTION Package: FINS_FIS_FICO

Situation in GR/IR Process History

P_GRIRProcessSituation is a Consumption CDS View that provides data about "Situation in GR/IR Process History" in SAP S/4HANA. It reads from 2 data sources (P_GRIRProcHistPredecessor, P_GRIRProcessHistoryLastChange) and exposes 72 fields with key fields CompanyCode, PurchasingDocument, PurchasingDocumentItem, LastChangeDateTime. Part of development package FINS_FIS_FICO.

Data Sources (2)

SourceAliasJoin Type
P_GRIRProcHistPredecessor history inner
P_GRIRProcessHistoryLastChange last from

Annotations (10)

NameValueLevelField
AbapCatalog.entityBuffer.definitionAllowed false view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Situation in GR/IR Process History view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.representativeKey LastChangeDateTime view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_GRIRProcHistPredecessor CompanyCode Receiver Company Code
KEY PurchasingDocument P_GRIRProcHistPredecessor PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem P_GRIRProcHistPredecessor PurchasingDocumentItem Purchasing Doc. Item
KEY LastChangeDateTime P_GRIRProcHistPredecessor LastChangeDateTime Timestamp
LastChangedByUser P_GRIRProcHistPredecessor LastChangedByUser User Name
GRIRClearingProcessStatus P_GRIRProcHistPredecessor GRIRClearingProcessStatus Status
PrevGRIRClearingProcessStatus P_GRIRProcHistPredecessor PrevGRIRClearingProcessStatus Status
GRIRClearingProcessPriority P_GRIRProcHistPredecessor GRIRClearingProcessPriority Priority
PrevGRIRClrgProcPriority P_GRIRProcHistPredecessor PrevGRIRClrgProcPriority Priority
ResponsiblePerson P_GRIRProcHistPredecessor ResponsiblePerson Processor
PrevResponsiblePerson P_GRIRProcHistPredecessor PrevResponsiblePerson Processor
ResponsibleDepartment P_GRIRProcHistPredecessor ResponsibleDepartment Processing Department
PrevResponsibleDepartment P_GRIRProcHistPredecessor PrevResponsibleDepartment Processing Department
GRIRClearingProcessRootCause P_GRIRProcHistPredecessor GRIRClearingProcessRootCause Root Cause
LastChangeDays
HasNote P_GRIRProcHistPredecessor HasNote TRUE
SystemMessageIdentification P_GRIRProcHistPredecessor SystemMessageIdentification Message ID
SystemMessageType P_GRIRProcHistPredecessor SystemMessageType Message type
SystemMessageNumber P_GRIRProcHistPredecessor SystemMessageNumber Message Number
AccountAssignmentCategory P_GRIRProcHistPredecessor AccountAssignmentCategory Acct Assgmt Cat
BalAmtInCompanyCodeCrcy P_GRIRProcHistPredecessor BalAmtInCompanyCodeCrcy Balance Amount
BalanceQuantity P_GRIRProcHistPredecessor BalanceQuantity Balance Quantity
IsFinallyInvoiced P_GRIRProcHistPredecessor IsFinallyInvoiced Final Invoice
LatestOpenItemPostingDate P_GRIRProcHistPredecessor LatestOpenItemPostingDate Latest Posting Date
MaterialGroup P_GRIRProcHistPredecessor MaterialGroup Product Group
NumberOfGoodsReceipts P_GRIRProcHistPredecessor NumberOfGoodsReceipts Number of Goods Receipts
NumberOfInvoiceReceipts P_GRIRProcHistPredecessor NumberOfInvoiceReceipts Number of Invoice Receipts
OldestOpenItemPostingDate P_GRIRProcHistPredecessor OldestOpenItemPostingDate Oldest Posting Date
Plant P_GRIRProcHistPredecessor Plant Valuation Area
PurchasingGroup P_GRIRProcHistPredecessor PurchasingGroup Purchasing Group
PurchasingOrganization P_GRIRProcHistPredecessor PurchasingOrganization Purchasing Organization
Supplier P_GRIRProcHistPredecessor Supplier Supplier
DueDays P_GRIRProcHistPredecessor DueDays Processing Time
CompanyCodeCurrency P_GRIRProcHistPredecessor CompanyCodeCurrency Local Currency
PurgDocOrderQuantityUnit P_GRIRProcHistPredecessor PurgDocOrderQuantityUnit Purchasing Document Order Qty Unit
PrpsdResponsibleDepartment P_GRIRProcHistPredecessor PrpsdResponsibleDepartment Proposed Processing Department
ProposedResponsiblePerson P_GRIRProcHistPredecessor ProposedResponsiblePerson Proposed Processor
GRIRClrgProcessPrpsdStatus P_GRIRProcHistPredecessor GRIRClrgProcessPrpsdStatus Proposed Status
GRIRClrgProcPrpsdPriority P_GRIRProcHistPredecessor GRIRClrgProcPrpsdPriority Proposed Priority
GRIRClrgProcessPrpsdRootCause P_GRIRProcHistPredecessor GRIRClrgProcessPrpsdRootCause Proposed Root Cause
PrpsdRespDeptMaxClProbability P_GRIRProcHistPredecessor PrpsdRespDeptMaxClProbability Processing Department Proposal Confidence
PrpsdRespPersonMaxClassProblty P_GRIRProcHistPredecessor PrpsdRespPersonMaxClassProblty Processor Proposal Confidence
GRIRProposedStatusMaxClProblty P_GRIRProcHistPredecessor GRIRProposedStatusMaxClProblty Status Proposal Confidence
GRIRProposedPrioMaxClProblty P_GRIRProcHistPredecessor GRIRProposedPrioMaxClProblty Priority Proposal Confidence
GRIRPrpsdRootCauseMaxClProblty P_GRIRProcHistPredecessor GRIRPrpsdRootCauseMaxClProblty Root Cause Proposal Confidence
GoodsReceiptGoodsAmtInCCCrcy P_GRIRProcHistPredecessor GoodsReceiptGoodsAmtInCCCrcy Goods Receipt Amount (Goods)
InvoiceRcptGoodsAmtInCCCrcy P_GRIRProcHistPredecessor InvoiceRcptGoodsAmtInCCCrcy Invoice Receipt Amount (Goods)
GdsRcptDelivCostAmtInCCCrcy P_GRIRProcHistPredecessor GdsRcptDelivCostAmtInCCCrcy Goods Receipt Amount (Delivery Costs)
InvcRcptDelivCostAmtInCCCrcy P_GRIRProcHistPredecessor InvcRcptDelivCostAmtInCCCrcy Invoice Receipt Amount (Delivery Costs)
GoodsReceiptGoodsQuantity P_GRIRProcHistPredecessor GoodsReceiptGoodsQuantity Goods Receipt Quantity (Goods)
InvoiceReceiptGoodsQuantity P_GRIRProcHistPredecessor InvoiceReceiptGoodsQuantity Invoice Receipt Quantity (Goods)
GoodsReceiptDeliveryCostQty P_GRIRProcHistPredecessor GoodsReceiptDeliveryCostQty Goods Receipt Quantity (Delivery Costs)
InvoiceRcptDeliveryCostQty P_GRIRProcHistPredecessor InvoiceRcptDeliveryCostQty Invoice Receipt Quantity (Deliv. Costs)
GoodsBalanceAmountInCCCrcy P_GRIRProcHistPredecessor GoodsBalanceAmountInCCCrcy
GoodsBalanceQuantity P_GRIRProcHistPredecessor GoodsBalanceQuantity
DeliveryCostBalAmtInCCCrcy P_GRIRProcHistPredecessor DeliveryCostBalAmtInCCCrcy
DeliveryCostBalanceQuantity P_GRIRProcHistPredecessor DeliveryCostBalanceQuantity
GoodsReceiptAmountInCoCodeCrcy P_GRIRProcHistPredecessor GoodsReceiptAmountInCoCodeCrcy
GoodsReceiptQty P_GRIRProcHistPredecessor GoodsReceiptQty Quantity
InvoiceRcptAmtInCoCodeCrcy P_GRIRProcHistPredecessor InvoiceRcptAmtInCoCodeCrcy
InvoiceReceiptQty P_GRIRProcHistPredecessor InvoiceReceiptQty
IsGoodsRcptGoodsAmtSurplus P_GRIRProcHistPredecessor IsGoodsRcptGoodsAmtSurplus
IsInvoiceGoodsAmountSurplus P_GRIRProcHistPredecessor IsInvoiceGoodsAmountSurplus
IsGdsRcptDelivCostAmtSurplus P_GRIRProcHistPredecessor IsGdsRcptDelivCostAmtSurplus
IsInvoiceDelivCostAmtSurplus P_GRIRProcHistPredecessor IsInvoiceDelivCostAmtSurplus
IsGoodsRcptGoodsQtySurplus P_GRIRProcHistPredecessor IsGoodsRcptGoodsQtySurplus
IsInvoiceGoodsQtySurplus P_GRIRProcHistPredecessor IsInvoiceGoodsQtySurplus
IsGdsRcptDelivCostQtySurplus P_GRIRProcHistPredecessor IsGdsRcptDelivCostQtySurplus
IsInvoiceDelivCostQtySurplus P_GRIRProcHistPredecessor IsInvoiceDelivCostQtySurplus
_CompanyCode P_GRIRProcHistPredecessor _CompanyCode
_PurchasingDocument P_GRIRProcHistPredecessor _PurchasingDocument
_PurchasingDocumentItem P_GRIRProcHistPredecessor _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_GRIRProcessSituation.
-- 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_GRIRProcessSituation AS
SELECT
  history.CompanyCode AS CompanyCode,
  history.PurchasingDocument AS PurchasingDocument,
  history.PurchasingDocumentItem AS PurchasingDocumentItem,
  history.LastChangeDateTime AS LastChangeDateTime,
  history.LastChangedByUser AS LastChangedByUser,
  history.GRIRClearingProcessStatus AS GRIRClearingProcessStatus,
  history.PrevGRIRClearingProcessStatus AS PrevGRIRClearingProcessStatus,
  history.GRIRClearingProcessPriority AS GRIRClearingProcessPriority,
  history.PrevGRIRClrgProcPriority AS PrevGRIRClrgProcPriority,
  history.ResponsiblePerson AS ResponsiblePerson,
  history.PrevResponsiblePerson AS PrevResponsiblePerson,
  history.ResponsibleDepartment AS ResponsibleDepartment,
  history.PrevResponsibleDepartment AS PrevResponsibleDepartment,
  history.GRIRClearingProcessRootCause AS GRIRClearingProcessRootCause,
  dats_days_between( tstmp_to_dats(history.LastChangeDateTime, '', $session.client, 'NULL'), cast ( $session.system_date as abap.dats ) ) AS LastChangeDays,
  history.HasNote AS HasNote,
  history.SystemMessageIdentification AS SystemMessageIdentification,
  history.SystemMessageType AS SystemMessageType,
  history.SystemMessageNumber AS SystemMessageNumber,
  history.AccountAssignmentCategory AS AccountAssignmentCategory,
  history.BalAmtInCompanyCodeCrcy AS BalAmtInCompanyCodeCrcy,
  history.BalanceQuantity AS BalanceQuantity,
  history.IsFinallyInvoiced AS IsFinallyInvoiced,
  history.LatestOpenItemPostingDate AS LatestOpenItemPostingDate,
  history.MaterialGroup AS MaterialGroup,
  history.NumberOfGoodsReceipts AS NumberOfGoodsReceipts,
  history.NumberOfInvoiceReceipts AS NumberOfInvoiceReceipts,
  history.OldestOpenItemPostingDate AS OldestOpenItemPostingDate,
  history.Plant AS Plant,
  history.PurchasingGroup AS PurchasingGroup,
  history.PurchasingOrganization AS PurchasingOrganization,
  history.Supplier AS Supplier,
  history.DueDays AS DueDays,
  history.CompanyCodeCurrency AS CompanyCodeCurrency,
  history.PurgDocOrderQuantityUnit AS PurgDocOrderQuantityUnit,
  history.PrpsdResponsibleDepartment AS PrpsdResponsibleDepartment,
  history.ProposedResponsiblePerson AS ProposedResponsiblePerson,
  history.GRIRClrgProcessPrpsdStatus AS GRIRClrgProcessPrpsdStatus,
  history.GRIRClrgProcPrpsdPriority AS GRIRClrgProcPrpsdPriority,
  history.GRIRClrgProcessPrpsdRootCause AS GRIRClrgProcessPrpsdRootCause,
  history.PrpsdRespDeptMaxClProbability AS PrpsdRespDeptMaxClProbability,
  history.PrpsdRespPersonMaxClassProblty AS PrpsdRespPersonMaxClassProblty,
  history.GRIRProposedStatusMaxClProblty AS GRIRProposedStatusMaxClProblty,
  history.GRIRProposedPrioMaxClProblty AS GRIRProposedPrioMaxClProblty,
  history.GRIRPrpsdRootCauseMaxClProblty AS GRIRPrpsdRootCauseMaxClProblty,
  history.GoodsReceiptGoodsAmtInCCCrcy AS GoodsReceiptGoodsAmtInCCCrcy,
  history.InvoiceRcptGoodsAmtInCCCrcy AS InvoiceRcptGoodsAmtInCCCrcy,
  history.GdsRcptDelivCostAmtInCCCrcy AS GdsRcptDelivCostAmtInCCCrcy,
  history.InvcRcptDelivCostAmtInCCCrcy AS InvcRcptDelivCostAmtInCCCrcy,
  history.GoodsReceiptGoodsQuantity AS GoodsReceiptGoodsQuantity,
  history.InvoiceReceiptGoodsQuantity AS InvoiceReceiptGoodsQuantity,
  history.GoodsReceiptDeliveryCostQty AS GoodsReceiptDeliveryCostQty,
  history.InvoiceRcptDeliveryCostQty AS InvoiceRcptDeliveryCostQty,
  history.GoodsBalanceAmountInCCCrcy AS GoodsBalanceAmountInCCCrcy,
  history.GoodsBalanceQuantity AS GoodsBalanceQuantity,
  history.DeliveryCostBalAmtInCCCrcy AS DeliveryCostBalAmtInCCCrcy,
  history.DeliveryCostBalanceQuantity AS DeliveryCostBalanceQuantity,
  history.GoodsReceiptAmountInCoCodeCrcy AS GoodsReceiptAmountInCoCodeCrcy,
  history.GoodsReceiptQty AS GoodsReceiptQty,
  history.InvoiceRcptAmtInCoCodeCrcy AS InvoiceRcptAmtInCoCodeCrcy,
  history.InvoiceReceiptQty AS InvoiceReceiptQty,
  history.IsGoodsRcptGoodsAmtSurplus AS IsGoodsRcptGoodsAmtSurplus,
  history.IsInvoiceGoodsAmountSurplus AS IsInvoiceGoodsAmountSurplus,
  history.IsGdsRcptDelivCostAmtSurplus AS IsGdsRcptDelivCostAmtSurplus,
  history.IsInvoiceDelivCostAmtSurplus AS IsInvoiceDelivCostAmtSurplus,
  history.IsGoodsRcptGoodsQtySurplus AS IsGoodsRcptGoodsQtySurplus,
  history.IsInvoiceGoodsQtySurplus AS IsInvoiceGoodsQtySurplus,
  history.IsGdsRcptDelivCostQtySurplus AS IsGdsRcptDelivCostQtySurplus,
  history.IsInvoiceDelivCostQtySurplus AS IsInvoiceDelivCostQtySurplus,
  history._CompanyCode AS _CompanyCode,
  history._PurchasingDocument AS _PurchasingDocument,
  history._PurchasingDocumentItem AS _PurchasingDocumentItem
FROM P_GRIRProcessHistoryLastChange AS last
INNER JOIN P_GRIRProcHistPredecessor AS history ON /* join condition not captured in parsed metadata */
;