PP Report Custom development ALV report

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

  • COGI Postprocess Faulty Goods Movements. Lists and corrects failed movements; no aging, no totals by reason and no check against current stock.
  • MB51 Material Document List. Shows posted goods movements; it does not include the unposted movements waiting in COGI.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
AFFWGoods Movements with Errors from ConfirmationsFailed goods movements: material, quantity, movement type, error message (driving table)—ECC + S/4
T100MessagesError message textT100-ARBGB = AFFW-MSGID AND T100-MSGNR = AFFW-MSGNO AND T100-SPRSL = SY-LANGUECC + S/4
MARDStorage Location Data for MaterialCurrent unrestricted stock in the storage locationMARD-MATNR = AFFW-MATNR AND MARD-WERKS = AFFW-WERKS AND MARD-LGORT = AFFW-LGORTECC + S/4
MAKTMaterial DescriptionsMaterial descriptionMAKT-MATNR = AFFW-MATNR AND MAKT-SPRAS = SY-LANGUECC + S/4
AFKOOrder Header Data for PP OrdersMRP controller and production supervisor of the orderAFKO-AUFNR = AFFW-AUFNRECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_WERKSPlantRange / multipleAFFW-WERKSYes1000
S_LGORTStorage locationRange / multipleAFFW-LGORTNo0001
S_MATNRMaterialRange / multipleAFFW-MATNRNoRM-2040
S_AUFNROrderRange / multipleAFFW-AUFNRNo1000431
S_BWARTMovement typeRange / multipleAFFW-BWARTNo261
S_ERSDACreated onRange / multipleAFFW-ERSDANo01.10.2026 – 17.11.2026
S_MSGNOMessage numberRange / multipleAFFW-MSGNONo021
P_KEYDTKey date (default: today)Single valueSY-DATUMYes17.11.2026
P_FIXABFixable now onlyCheckbox—No—

Output columns

#ColumnSource
1OrderAFFW-AUFNR
2MaterialAFFW-MATNR
3DescriptionMAKT-MAKTX
4PlantAFFW-WERKS
5Storage locationAFFW-LGORT
6Movement typeAFFW-BWART
7QuantityAFFW-ERFMG
8UnitAFFW-ERFME
9Created onAFFW-ERSDA
10Age (days)Calculated Key date − AFFW-ERSDA
11Age bucketCalculated 0–1, 2–7, 8–30 or 30+ days
12Error messageCalculated T100-TEXT with AFFW-MSGV1 inserted
13Unrestricted stockMARD-LABST
14Fixable nowCalculated For a stock deficit error, MARD-LABST ≥ AFFW-ERFMG after older lines are deducted

Sample output

OrderMaterialDescriptionPlantStorage locationMovement typeQuantityUnitCreated onAge (days)Age bucketError messageUnrestricted stockFixable now
1000431RM-2040Steel sheet 2 mm10000001261120KG11/03/2026148–30 daysUnrestricted-use stock deficit (120 KG)380Yes
1000438RM-3105Solvent-based paint1000000226135L11/15/202622–7 daysBatch number not entered90No (batch required)
1000412RM-1001Carton box 40x3010000001261600PC10/08/20264030+ daysMaterial blocked for physical inventory0No
1000450RM-3220Gasket set 12 pcs2000000126150PC11/16/202610–1 daysUnrestricted-use stock deficit (30 PC)20No
A view built with fictional sample data; not real system data.

How does the report work?

  1. 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.
  2. Age = key date − AFFW-ERSDA. Lines are assigned to the 0–1, 2–7, 8–30 and 30+ day buckets.
  3. 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.
  4. 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.
  5. 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

MM Package Custom

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 …

5 components · v1.0

PP Package Custom

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 …

5 components · v1.0

Related reports

PP Program Custom Mass upload

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 …

AFRU · AFKO · AFVC · AFFW

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.

Related report: COGI Failed Goods Movements Aging Report