P_GRIRSituationTrigger
P_GRIRSituationTrigger is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (P_GRIRAcctRecnclnSituation) and exposes 85 fields with key fields CompanyCode, PurchasingDocument, PurchasingDocumentItem, LastChangeDateTime.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_GRIRAcctRecnclnSituation | current | from |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFIGRIRSITNTRGGR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ObjectModel.representativeKey | LastChangeDateTime | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.buffering.status | #NOT_ALLOWED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view |
Fields (85)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_GRIRAcctRecnclnSituation | CompanyCode | Receiver Company Code |
| KEY | PurchasingDocument | P_GRIRAcctRecnclnSituation | PurchasingDocument | Purchasing Document |
| KEY | PurchasingDocumentItem | P_GRIRAcctRecnclnSituation | PurchasingDocumentItem | Purchasing Doc. Item |
| KEY | LastChangeDateTime | P_GRIRAcctRecnclnSituation | LastChangeDateTime | Timestamp |
| PurchasingDocumentItemUniqueID | ||||
| Plant | P_GRIRAcctRecnclnSituation | Plant | Valuation Area | |
| PurchasingOrganization | P_GRIRAcctRecnclnSituation | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | P_GRIRAcctRecnclnSituation | PurchasingGroup | Purchasing Group | |
| MaterialGroup | P_GRIRAcctRecnclnSituation | MaterialGroup | Product Group | |
| Material | P_GRIRAcctRecnclnSituation | Material | Vehicle Model | |
| RequisitionerName | P_GRIRAcctRecnclnSituation | RequisitionerName | Requisitioner | |
| Supplier | P_GRIRAcctRecnclnSituation | Supplier | Supplier | |
| SupplierName | P_GRIRAcctRecnclnSituation | SupplierName | Supplier Name | |
| NumberOfOpenItems | P_GRIRAcctRecnclnSituation | NumberOfOpenItems | ||
| HasNoGoodsReceiptPosted | P_GRIRAcctRecnclnSituation | HasNoGoodsReceiptPosted | ||
| HasNoInvoiceReceiptPosted | P_GRIRAcctRecnclnSituation | HasNoInvoiceReceiptPosted | ||
| IsGoodsRcptGoodsAmtSurplus | P_GRIRAcctRecnclnSituation | IsGoodsRcptGoodsAmtSurplus | ||
| IsInvoiceGoodsAmountSurplus | P_GRIRAcctRecnclnSituation | IsInvoiceGoodsAmountSurplus | ||
| IsGdsRcptDelivCostAmtSurplus | P_GRIRAcctRecnclnSituation | IsGdsRcptDelivCostAmtSurplus | ||
| IsInvoiceDelivCostAmtSurplus | P_GRIRAcctRecnclnSituation | IsInvoiceDelivCostAmtSurplus | ||
| IsGoodsRcptGoodsQtySurplus | P_GRIRAcctRecnclnSituation | IsGoodsRcptGoodsQtySurplus | ||
| IsInvoiceGoodsQtySurplus | P_GRIRAcctRecnclnSituation | IsInvoiceGoodsQtySurplus | ||
| IsGdsRcptDelivCostQtySurplus | P_GRIRAcctRecnclnSituation | IsGdsRcptDelivCostQtySurplus | ||
| IsInvoiceDelivCostQtySurplus | P_GRIRAcctRecnclnSituation | IsInvoiceDelivCostQtySurplus | ||
| PrpsdResponsibleDepartment | P_GRIRAcctRecnclnSituation | PrpsdResponsibleDepartment | Proposed Processing Department | |
| ProposedResponsiblePerson | P_GRIRAcctRecnclnSituation | ProposedResponsiblePerson | Proposed Processor | |
| GRIRClrgProcessPrpsdStatus | P_GRIRAcctRecnclnSituation | GRIRClrgProcessPrpsdStatus | Proposed Status | |
| GRIRClrgProcPrpsdPriority | P_GRIRAcctRecnclnSituation | GRIRClrgProcPrpsdPriority | Proposed Priority | |
| GRIRClrgProcessPrpsdRootCause | P_GRIRAcctRecnclnSituation | GRIRClrgProcessPrpsdRootCause | Proposed Root Cause | |
| GRIRClearingProcessStatus | history | GRIRClearingProcessStatus | Status | |
| PrevGRIRClearingProcessStatus | history | PrevGRIRClearingProcessStatus | ||
| GRIRClrgProcStatusIsChanged | ||||
| GRIRClearingProcessPriority | history | GRIRClearingProcessPriority | Priority | |
| PrevGRIRClrgProcPriority | history | PrevGRIRClrgProcPriority | ||
| GRIRClrgProcPriorityIsChanged | ||||
| ResponsiblePerson | history | ResponsiblePerson | Processor | |
| PrevResponsiblePerson | history | PrevResponsiblePerson | ||
| ResponsiblePersonIsChanged | ||||
| ResponsibleDepartment | history | ResponsibleDepartment | Processing Department | |
| PrevResponsibleDepartment | history | PrevResponsibleDepartment | ||
| ResponsibleDeptIsChanged | ||||
| LastChangeDays | ||||
| NumberOfDaysSinceLastPosting | ||||
| GoodsReceiptGoodsAmtInCCCrcy | P_GRIRAcctRecnclnSituation | GoodsReceiptGoodsAmtInCCCrcy | Goods Receipt Amount (Goods) | |
| GdsRcptDelivCostAmtInCCCrcy | P_GRIRAcctRecnclnSituation | GdsRcptDelivCostAmtInCCCrcy | Goods Receipt Amount (Delivery Costs) | |
| InvoiceRcptGoodsAmtInCCCrcy | P_GRIRAcctRecnclnSituation | InvoiceRcptGoodsAmtInCCCrcy | Invoice Receipt Amount (Goods) | |
| InvcRcptDelivCostAmtInCCCrcy | P_GRIRAcctRecnclnSituation | InvcRcptDelivCostAmtInCCCrcy | Invoice Receipt Amount (Delivery Costs) | |
| GoodsReceiptGdsQtyInRefQtyUnit | P_GRIRAcctRecnclnSituation | GoodsReceiptGdsQtyInRefQtyUnit | ||
| GRDelivCostQtyInRefQtyUnit | P_GRIRAcctRecnclnSituation | GRDelivCostQtyInRefQtyUnit | ||
| InvoiceRcptGdsQtyInRefQtyUnit | P_GRIRAcctRecnclnSituation | InvoiceRcptGdsQtyInRefQtyUnit | ||
| InvcRcptDelivQtyInRefQtyUnit | P_GRIRAcctRecnclnSituation | InvcRcptDelivQtyInRefQtyUnit | ||
| GoodsBalanceAmountInCCCrcy | P_GRIRAcctRecnclnSituation | GoodsBalanceAmountInCCCrcy | ||
| GdsBalanceQuantityInRefQtyUnit | P_GRIRAcctRecnclnSituation | GdsBalanceQuantityInRefQtyUnit | ||
| DeliveryCostBalAmtInCCCrcy | P_GRIRAcctRecnclnSituation | DeliveryCostBalAmtInCCCrcy | ||
| DelivCostBalQtyInRefQtyUnit | P_GRIRAcctRecnclnSituation | DelivCostBalQtyInRefQtyUnit | ||
| GoodsReceiptAmountInCoCodeCrcy | P_GRIRAcctRecnclnSituation | GoodsReceiptAmountInCoCodeCrcy | ||
| InvoiceRcptAmtInCoCodeCrcy | P_GRIRAcctRecnclnSituation | InvoiceRcptAmtInCoCodeCrcy | ||
| BalAmtInCoCodeCrcyIsChanged | BalAmtInCoCodeCrcyIsChanged | |||
| BalanceQuantityIsChanged | BalanceQuantityIsChanged | |||
| GoodsReceiptQtyIsChanged | GoodsReceiptQtyIsChanged | |||
| InvoiceReceiptQtyIsChanged | InvoiceReceiptQtyIsChanged | |||
| NumberOfGoodsRcptsIsChanged | NumberOfGoodsRcptsIsChanged | |||
| PrevNumberOfInvoiceReceipts | PrevNumberOfInvoiceReceipts | |||
| BalanceAbsoluteAmtInCoCodeCrcy | P_GRIRAcctRecnclnSituation | BalanceAbsoluteAmtInCoCodeCrcy | ||
| BalAmtInCompanyCodeCrcy | P_GRIRAcctRecnclnSituation | BalAmtInCompanyCodeCrcy | Balance Amount | |
| CompanyCodeCurrency | P_GRIRAcctRecnclnSituation | CompanyCodeCurrency | Local Currency | |
| LastChangedByUser | P_GRIRAcctRecnclnSituation | LastChangedByUser | User Name | |
| HasNote | P_GRIRAcctRecnclnSituation | HasNote | TRUE | |
| GRIRClearingProcessRootCause | P_GRIRAcctRecnclnSituation | GRIRClearingProcessRootCause | Root Cause | |
| PrpsdRespDeptMaxClProbability | P_GRIRAcctRecnclnSituation | PrpsdRespDeptMaxClProbability | Processing Department Proposal Confidence | |
| PrpsdRespPersonMaxClassProblty | P_GRIRAcctRecnclnSituation | PrpsdRespPersonMaxClassProblty | Processor Proposal Confidence | |
| GRIRProposedStatusMaxClProblty | P_GRIRAcctRecnclnSituation | GRIRProposedStatusMaxClProblty | Status Proposal Confidence | |
| GRIRProposedPrioMaxClProblty | P_GRIRAcctRecnclnSituation | GRIRProposedPrioMaxClProblty | Priority Proposal Confidence | |
| GRIRPrpsdRootCauseMaxClProblty | P_GRIRAcctRecnclnSituation | GRIRPrpsdRootCauseMaxClProblty | Root Cause Proposal Confidence | |
| PurchasingDocumentItemText | PurchasingDocumentItemText | Short Text | ||
| ValuationArea | ValuationArea | Valuation Area | ||
| ValuationType | ValuationType | Valuation Type | ||
| NumberOfPurchaseOrderItems | NumberOfPurchaseOrderItems | Number of PO Items | ||
| LatestOpenItemPostingDate | P_GRIRAcctRecnclnSituation | LatestOpenItemPostingDate | Latest Posting Date | |
| OldestOpenItemPostingDate | P_GRIRAcctRecnclnSituation | OldestOpenItemPostingDate | Oldest Posting Date | |
| AccountAssignmentCategory | P_GRIRAcctRecnclnSituation | AccountAssignmentCategory | Acct Assgmt Cat | |
| IsFinallyInvoiced | P_GRIRAcctRecnclnSituation | IsFinallyInvoiced | Final Invoice | |
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | Del. Indicator | ||
| _PurchasingDocumentItem | P_GRIRAcctRecnclnSituation | _PurchasingDocumentItem | ||
| _Supplier | _Supplier |
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_GRIRSituationTrigger.
-- 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: PFIGRIRSITNTRGGR
CREATE VIEW P_GRIRSituationTrigger AS
SELECT
current.CompanyCode AS CompanyCode,
current.PurchasingDocument AS PurchasingDocument,
current.PurchasingDocumentItem AS PurchasingDocumentItem,
current.LastChangeDateTime AS LastChangeDateTime,
cast( concat( current.PurchasingDocument, current.PurchasingDocumentItem ) as purchasingdocumentitemuniqueid ) AS PurchasingDocumentItemUniqueID,
current.Plant AS Plant,
current.PurchasingOrganization AS PurchasingOrganization,
current.PurchasingGroup AS PurchasingGroup,
current.MaterialGroup AS MaterialGroup,
current.Material AS Material,
current.RequisitionerName AS RequisitionerName,
current.Supplier AS Supplier,
current.SupplierName AS SupplierName,
current.NumberOfOpenItems AS NumberOfOpenItems,
current.HasNoGoodsReceiptPosted AS HasNoGoodsReceiptPosted,
current.HasNoInvoiceReceiptPosted AS HasNoInvoiceReceiptPosted,
current.IsGoodsRcptGoodsAmtSurplus AS IsGoodsRcptGoodsAmtSurplus,
current.IsInvoiceGoodsAmountSurplus AS IsInvoiceGoodsAmountSurplus,
current.IsGdsRcptDelivCostAmtSurplus AS IsGdsRcptDelivCostAmtSurplus,
current.IsInvoiceDelivCostAmtSurplus AS IsInvoiceDelivCostAmtSurplus,
current.IsGoodsRcptGoodsQtySurplus AS IsGoodsRcptGoodsQtySurplus,
current.IsInvoiceGoodsQtySurplus AS IsInvoiceGoodsQtySurplus,
current.IsGdsRcptDelivCostQtySurplus AS IsGdsRcptDelivCostQtySurplus,
current.IsInvoiceDelivCostQtySurplus AS IsInvoiceDelivCostQtySurplus,
current.PrpsdResponsibleDepartment AS PrpsdResponsibleDepartment,
current.ProposedResponsiblePerson AS ProposedResponsiblePerson,
current.GRIRClrgProcessPrpsdStatus AS GRIRClrgProcessPrpsdStatus,
current.GRIRClrgProcPrpsdPriority AS GRIRClrgProcPrpsdPriority,
current.GRIRClrgProcessPrpsdRootCause AS GRIRClrgProcessPrpsdRootCause,
history.GRIRClearingProcessStatus AS GRIRClearingProcessStatus,
history.PrevGRIRClearingProcessStatus AS PrevGRIRClearingProcessStatus,
cast( history.GRIRClrgProcStatusIsChanged as fis_grir_status_chg ) AS GRIRClrgProcStatusIsChanged,
history.GRIRClearingProcessPriority AS GRIRClearingProcessPriority,
history.PrevGRIRClrgProcPriority AS PrevGRIRClrgProcPriority,
cast( history.GRIRClrgProcPriorityIsChanged as fis_grir_prio_chg ) AS GRIRClrgProcPriorityIsChanged,
history.ResponsiblePerson AS ResponsiblePerson,
history.PrevResponsiblePerson AS PrevResponsiblePerson,
cast( history.ResponsiblePersonIsChanged as fis_grir_resp_chg ) AS ResponsiblePersonIsChanged,
history.ResponsibleDepartment AS ResponsibleDepartment,
history.PrevResponsibleDepartment AS PrevResponsibleDepartment,
cast( history.ResponsibleDeptIsChanged as fis_grir_dep_chg ) AS ResponsibleDeptIsChanged,
cast( history.LastChangeDays as fis_grir_processing_days ) AS LastChangeDays,
cast( dats_days_between( current.LatestOpenItemPostingDate, cast ( $session.system_date as abap.dats ) ) as fis_grir_days_since_last_post ) AS NumberOfDaysSinceLastPosting,
current.GoodsReceiptGoodsAmtInCCCrcy AS GoodsReceiptGoodsAmtInCCCrcy,
current.GdsRcptDelivCostAmtInCCCrcy AS GdsRcptDelivCostAmtInCCCrcy,
current.InvoiceRcptGoodsAmtInCCCrcy AS InvoiceRcptGoodsAmtInCCCrcy,
current.InvcRcptDelivCostAmtInCCCrcy AS InvcRcptDelivCostAmtInCCCrcy,
current.GoodsReceiptGdsQtyInRefQtyUnit AS GoodsReceiptGdsQtyInRefQtyUnit,
current.GRDelivCostQtyInRefQtyUnit AS GRDelivCostQtyInRefQtyUnit,
current.InvoiceRcptGdsQtyInRefQtyUnit AS InvoiceRcptGdsQtyInRefQtyUnit,
current.InvcRcptDelivQtyInRefQtyUnit AS InvcRcptDelivQtyInRefQtyUnit,
current.GoodsBalanceAmountInCCCrcy AS GoodsBalanceAmountInCCCrcy,
current.GdsBalanceQuantityInRefQtyUnit AS GdsBalanceQuantityInRefQtyUnit,
current.DeliveryCostBalAmtInCCCrcy AS DeliveryCostBalAmtInCCCrcy,
current.DelivCostBalQtyInRefQtyUnit AS DelivCostBalQtyInRefQtyUnit,
current.GoodsReceiptAmountInCoCodeCrcy AS GoodsReceiptAmountInCoCodeCrcy,
current.InvoiceRcptAmtInCoCodeCrcy AS InvoiceRcptAmtInCoCodeCrcy,
BalAmtInCoCodeCrcyIsChanged,
BalanceQuantityIsChanged,
GoodsReceiptQtyIsChanged,
InvoiceReceiptQtyIsChanged,
NumberOfGoodsRcptsIsChanged,
PrevNumberOfInvoiceReceipts,
current.BalanceAbsoluteAmtInCoCodeCrcy AS BalanceAbsoluteAmtInCoCodeCrcy,
current.BalAmtInCompanyCodeCrcy AS BalAmtInCompanyCodeCrcy,
current.CompanyCodeCurrency AS CompanyCodeCurrency,
current.LastChangedByUser AS LastChangedByUser,
current.HasNote AS HasNote,
current.GRIRClearingProcessRootCause AS GRIRClearingProcessRootCause,
current.PrpsdRespDeptMaxClProbability AS PrpsdRespDeptMaxClProbability,
current.PrpsdRespPersonMaxClassProblty AS PrpsdRespPersonMaxClassProblty,
current.GRIRProposedStatusMaxClProblty AS GRIRProposedStatusMaxClProblty,
current.GRIRProposedPrioMaxClProblty AS GRIRProposedPrioMaxClProblty,
current.GRIRPrpsdRootCauseMaxClProblty AS GRIRPrpsdRootCauseMaxClProblty,
PurchasingDocumentItemText,
ValuationArea,
ValuationType,
NumberOfPurchaseOrderItems,
current.LatestOpenItemPostingDate AS LatestOpenItemPostingDate,
current.OldestOpenItemPostingDate AS OldestOpenItemPostingDate,
current.AccountAssignmentCategory AS AccountAssignmentCategory,
current.IsFinallyInvoiced AS IsFinallyInvoiced,
PurchasingDocumentDeletionCode,
current._PurchasingDocumentItem AS _PurchasingDocumentItem
FROM P_GRIRAcctRecnclnSituation AS current
;
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