COGI Failed Goods Movements Aging Report
Short answer: A custom ALV report that groups the backflush and automatic goods receipt errors waiting in COGI by age, error reason and material, and flags which of them can be fixed right now with current stock. Before month end, teams see in one list which records to clear first.
- Estimated effort
- S · 3–4 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
COGI lists failed goods movements as a correction inbox; it does not show how many days an error has been waiting, the age bucket, how many lines wait for the same reason or whether current unrestricted stock is now enough to post them. Accumulated COGI records distort stock and WIP values; teams export the list to Excel and age it by hand to decide what to clear first.
Who uses it? Production planners, warehouse leads, cost accountants and the teams that run month-end closing.
Closest standard alternatives
Tables used
The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.
| Table | Role | Join | System |
|---|---|---|---|
| AFFWGoods Movements with Errors from Confirmations | Failed goods movements: material, quantity, movement type, error message (driving table) | — | ECC + S/4 |
| T100Messages | Error message text | T100-ARBGB = AFFW-MSGID AND T100-MSGNR = AFFW-MSGNO AND T100-SPRSL = SY-LANGU | ECC + S/4 |
| MARDStorage Location Data for Material | Current unrestricted stock in the storage location | MARD-MATNR = AFFW-MATNR AND MARD-WERKS = AFFW-WERKS AND MARD-LGORT = AFFW-LGORT | ECC + S/4 |
| MAKTMaterial Descriptions | Material description | MAKT-MATNR = AFFW-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
| AFKOOrder Header Data for PP Orders | MRP controller and production supervisor of the order | AFKO-AUFNR = AFFW-AUFNR | ECC + S/4 |
S/4HANA notes
- MARD → MATDOC: In S/4HANA stock quantities are no longer stored physically; reading MARD returns values calculated on the fly from MATDOC through a compatibility view. Reads still work, but test performance on very large selections.
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | AFFW-WERKS | Yes | 1000 |
| S_LGORT | Storage location | Range / multiple | AFFW-LGORT | No | 0001 |
| S_MATNR | Material | Range / multiple | AFFW-MATNR | No | RM-2040 |
| S_AUFNR | Order | Range / multiple | AFFW-AUFNR | No | 1000431 |
| S_BWART | Movement type | Range / multiple | AFFW-BWART | No | 261 |
| S_ERSDA | Created on | Range / multiple | AFFW-ERSDA | No | 01.10.2026 – 17.11.2026 |
| S_MSGNO | Message number | Range / multiple | AFFW-MSGNO | No | 021 |
| P_KEYDT | Key date (default: today) | Single value | SY-DATUM | Yes | 17.11.2026 |
| P_FIXAB | Fixable now only | Checkbox | — | No | — |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Order | AFFW-AUFNR |
| 2 | Material | AFFW-MATNR |
| 3 | Description | MAKT-MAKTX |
| 4 | Plant | AFFW-WERKS |
| 5 | Storage location | AFFW-LGORT |
| 6 | Movement type | AFFW-BWART |
| 7 | Quantity | AFFW-ERFMG |
| 8 | Unit | AFFW-ERFME |
| 9 | Created on | AFFW-ERSDA |
| 10 | Age (days) | Calculated Key date − AFFW-ERSDA |
| 11 | Age bucket | Calculated 0–1, 2–7, 8–30 or 30+ days |
| 12 | Error message | Calculated T100-TEXT with AFFW-MSGV1 inserted |
| 13 | Unrestricted stock | MARD-LABST |
| 14 | Fixable now | Calculated For a stock deficit error, MARD-LABST ≥ AFFW-ERFMG after older lines are deducted |
Sample output
| Order | Material | Description | Plant | Storage location | Movement type | Quantity | Unit | Created on | Age (days) | Age bucket | Error message | Unrestricted stock | Fixable now |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1000431 | RM-2040 | Steel sheet 2 mm | 1000 | 0001 | 261 | 120 | KG | 11/03/2026 | 14 | 8–30 days | Unrestricted-use stock deficit (120 KG) | 380 | Yes |
| 1000438 | RM-3105 | Solvent-based paint | 1000 | 0002 | 261 | 35 | L | 11/15/2026 | 2 | 2–7 days | Batch number not entered | 90 | No (batch required) |
| 1000412 | RM-1001 | Carton box 40x30 | 1000 | 0001 | 261 | 600 | PC | 10/08/2026 | 40 | 30+ days | Material blocked for physical inventory | 0 | No |
| 1000450 | RM-3220 | Gasket set 12 pcs | 2000 | 0001 | 261 | 50 | PC | 11/16/2026 | 1 | 0–1 days | Unrestricted-use stock deficit (30 PC) | 20 | No |
How does the report work?
- All failed goods movements in the selection are read from AFFW (the data source of COGI): order, material, plant, storage location, movement type, quantity and error message.
- Age = key date − AFFW-ERSDA. Lines are assigned to the 0–1, 2–7, 8–30 and 30+ day buckets.
- The error text is read from T100 in the logon language with MSGID + MSGNO, and the MSGV1 variable is inserted, so errors with the same reason are grouped together.
- Current unrestricted stock (LABST) at the plant and storage location of the movement is read from MARD. When the error is a stock deficit, lines of the same material and storage location are consumed from stock starting with the oldest; lines covered by stock are flagged as fixable now.
- MRP controller and production supervisor of the order are added from AFKO. ALV shows the number of lines and the quantity total per error message and material.
Performance notes
AFFW is usually a small table and the report runs in seconds. Read MARD and T100 once with unique keys. In the days before month end, run the report in the background every morning and email it to warehouse and planning.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document Double-clicking a line opens COGI with the order and material selected.
- Export to Excel
- Runs as a background job
- Send the result by email Errors older than 30 days can be sent to warehouse and planning before month end.
Authorization objects
- C_AFFW_TWKDisplay failed goods movements by plant
- M_MSEG_BWAGoods movement authorization by movement type
Frequently asked questions
Does the report correct the movements itself?
No, the report only reads and prioritizes. Correction is done in COGI; optionally a button can be added that passes the fixable lines to COGI in one step.
Why do COGI records matter at month end?
Unposted consumption shows stock quantity and value too high and the actual cost of the order too low. If these records are not cleared before WIP and variance calculation at month end, cost results are wrong.
Does it work on S/4HANA?
Yes. AFFW is still the data source of COGI in S/4HANA; reading MARD is served from material documents through a compatibility view.
Packages that include this solution
Inventory Control and GR/IR Pack
A five-report pack that tracks stock value and stock accuracy with one plant and storage location selection: stock aging, materials below safety …
Production Order Control Pack
A pack that combines four reports and one background program for the daily production meeting with one plant and MRP controller selection: overdue …
Related reports
Mass Production Order Confirmation Upload Program
A custom program that reads operation confirmations (yield, scrap, rework, activity times) coming from MES, shop-floor terminals or Excel at the end …
Production Orders with Consumption but No Goods Receipt Report
A custom ALV report that lists production orders with posted component consumption but no or very little goods receipt, with consumed value, receipt …
Let us build this report for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.