# Goods Received Not Invoiced Purchase Orders Report (GR/IR)

> A custom ALV report that compares received and invoiced quantity and amount per purchase order item and lists items that were received but not invoiced, or invoiced but not received. Each line shows how many days the difference has been open and which purchasing group should follow it up.

- Type: Report, Custom development, ALV report
- Module: MM
- Estimated effort: M (3–5 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/goods-received-not-invoiced-purchase-orders-report/


## Why is the standard not enough?

MB5S shows the GR/IR balance per purchase order, but not the purchasing group, the last goods receipt date or how long the difference has been open. In ME2N the "to be delivered" and "to be invoiced" selections do not combine with the final invoice indicator into a usable difference list. Teams merge two lists in Excel. The custom report calculates both directions from the purchase order history (EKBE) on one line and ages the difference.

### Closest standard alternatives

- MB5S: Lists the GR/IR balance per purchase order; no purchasing group, last goods receipt date or ageing.
- ME2N: Shows quantities to be delivered and to be invoiced separately; does not produce a two-way difference list.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| EKKO | Company code, purchasing group, vendor and document currency (driving table) | Read | - | ECC + S/4 |
| EKPO | Material, plant, goods receipt / invoice indicators and final invoice flag | Read | EKPO-EBELN = EKKO-EBELN | ECC + S/4 |
| EKBE | Purchase order history: goods receipt and invoice quantities, amounts and posting dates | Read | EKBE-EBELN = EKPO-EBELN AND EKBE-EBELP = EKPO-EBELP | ECC + S/4 |
| LFA1 | Vendor name | Read | LFA1-LIFNR = EKKO-LIFNR | ECC + S/4 |
| I_PurchaseOrderHistoryAPI01 | In S/4HANA it can replace EKBE with a clean core approach | Read | PurchaseOrder = EKPO-EBELN AND PurchaseOrderItem = EKPO-EBELP | S/4HANA only |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_BUKRS | Company code | Range / multiple | EKKO-BUKRS | Yes |
| S_EKORG | Purchasing organization | Range / multiple | EKKO-EKORG | No |
| S_EKGRP | Purchasing group | Range / multiple | EKKO-EKGRP | No |
| S_LIFNR | Vendor | Range / multiple | EKKO-LIFNR | No |
| S_WERKS | Plant | Range / multiple | EKPO-WERKS | No |
| S_BEDAT | Order date range | Range / multiple | EKKO-BEDAT | No |
| R_GRNI | Received, not invoiced | Radio button | - | No |
| R_IRNG | Invoiced, not received | Radio button | - | No |
| P_KEYDT | Key date for days open | Single value | SY-DATUM | Yes |

## Output columns

| Column | Source |
|---|---|
| Purchase order | EKKO-EBELN |
| Item | EKPO-EBELP |
| Purchasing group | EKKO-EKGRP |
| Vendor | EKKO-LIFNR |
| Vendor name | LFA1-NAME1 |
| Material | EKPO-MATNR |
| Short text | EKPO-TXZ01 |
| Plant | EKPO-WERKS |
| GR qty | Calculated: Σ EKBE-MENGE (VGABE = 1, SHKZG = H negative) |
| Invoiced qty | Calculated: Σ EKBE-MENGE (VGABE = 2, SHKZG = H negative) |
| Difference qty | Calculated: GR qty − invoiced qty |
| Unit | EKPO-MEINS |
| Difference amount | Calculated: Σ EKBE-WRBTR (VGABE = 1) − Σ EKBE-WRBTR (VGABE = 2) |
| Currency | EKKO-WAERS |
| Last GR date | EKBE-BUDAT |
| Days open | Calculated: Key date − last GR date |

## How does the report work?

1. EKKO and EKPO are read with the selection-screen criteria; deleted items (EKPO-LOEKZ) and items that expect no goods receipt or no invoice (EKPO-WEPOS or EKPO-REPOS blank) are skipped.
2. The EKBE records of each item are read: VGABE = 1 goods receipts, VGABE = 2 invoices. Records with SHKZG = H (reversals, returns) are summed with a negative sign.
3. Difference quantity = goods receipt quantity − invoiced quantity; difference amount = goods receipt amount (EKBE-WRBTR) − invoice amount, in document currency.
4. Depending on the radio button, only positive differences (not invoiced), only negative differences (not received) or all differences remain. Items with the final invoice flag (EKPO-EREKZ) and a zero difference are skipped.
5. The last goods receipt date is the highest EKBE-BUDAT of the VGABE = 1 records; days open = key date − last goods receipt date. The vendor name is added from LFA1; the ALV shows subtotals per purchasing group and vendor.

## Authorization objects

- M_BEST_EKO: Purchase order display authorization by purchasing organization
- M_BEST_EKG: Purchase order display authorization by purchasing group
- M_BEST_WRK: Purchase order display authorization by plant

## Frequently asked questions

### In which currency is the difference shown?

In document currency (EKBE-WRBTR and EKKO-WAERS). If company code currency is needed, a second amount column based on EKBE-DMBTR is added.

### How are returns and reversals handled?

EKBE records with debit/credit indicator SHKZG = H are summed with a negative sign, so a 102 reversal or an invoice cancellation reduces the difference correctly.

### Does this report work on S/4HANA?

Yes. EKKO, EKPO and EKBE keep the same structure in S/4HANA. For a clean core approach, the order history can be read from the I_PurchaseOrderHistoryAPI01 CDS view.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=mm-goods-received-not-invoiced
