{"audience":"Production planners, warehouse leads, cost accountants and the teams that run month-end closing.","authorization_objects":[{"note":"Display failed goods movements by plant","object":"C_AFFW_TWK"},{"note":"Goods movement authorization by movement type","object":"M_MSEG_BWA"}],"components":[],"countries":[],"effort_days_max":4,"effort_days_min":3,"effort_size":"S","faq":[{"a":"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.","q":"Does the report correct the movements itself?"},{"a":"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.","q":"Why do COGI records matter at month end?"},{"a":"Yes. AFFW is still the data source of COGI in S/4HANA; reading MARD is served from material documents through a compatibility view.","q":"Does it work on S/4HANA?"}],"features":[{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""},{"code":"layout","label":"User-specific layout variants","note":""},{"code":"drilldown","label":"Double-click drill-down to the document","note":"Double-clicking a line opens COGI with the order and material selected."},{"code":"excel","label":"Export to Excel","note":""},{"code":"background","label":"Runs as a background job","note":""},{"code":"email","label":"Send the result by email","note":"Errors older than 30 days can be sent to warehouse and planning before month end."}],"functions":[],"gap":"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.","id":"pp-cogi-failed-goods-movements-aging","industries":[],"input_columns":[],"kind":"report","language":"en","lastmod":"2026-11-17","logic":"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.\n2. Age = key date − AFFW-ERSDA. Lines are assigned to the 0–1, 2–7, 8–30 and 30+ day buckets.\n3. 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.\n4. 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.\n5. 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.","module":"PP","object_type":"alv_report","output_columns":[{"calculated":false,"formula":"","label":"Order","source_field":"AUFNR","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Description","source_field":"MAKTX","source_table":"MAKT"},{"calculated":false,"formula":"","label":"Plant","source_field":"WERKS","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Storage location","source_field":"LGORT","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Movement type","source_field":"BWART","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Quantity","source_field":"ERFMG","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Unit","source_field":"ERFME","source_table":"AFFW"},{"calculated":false,"formula":"","label":"Created on","source_field":"ERSDA","source_table":"AFFW"},{"calculated":true,"formula":"Key date − AFFW-ERSDA","label":"Age (days)","source_field":null,"source_table":null},{"calculated":true,"formula":"0–1, 2–7, 8–30 or 30+ days","label":"Age bucket","source_field":null,"source_table":null},{"calculated":true,"formula":"T100-TEXT with AFFW-MSGV1 inserted","label":"Error message","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Unrestricted stock","source_field":"LABST","source_table":"MARD"},{"calculated":true,"formula":"For a stock deficit error, MARD-LABST ≥ AFFW-ERFMG after older lines are deducted","label":"Fixable now","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"AFFW-WERKS","required":true},{"example":"0001","kind":"select_option","label":"Storage location","name":"S_LGORT","ref_field":"AFFW-LGORT","required":false},{"example":"RM-2040","kind":"select_option","label":"Material","name":"S_MATNR","ref_field":"AFFW-MATNR","required":false},{"example":"1000431","kind":"select_option","label":"Order","name":"S_AUFNR","ref_field":"AFFW-AUFNR","required":false},{"example":"261","kind":"select_option","label":"Movement type","name":"S_BWART","ref_field":"AFFW-BWART","required":false},{"example":"01.10.2026 – 17.11.2026","kind":"select_option","label":"Created on","name":"S_ERSDA","ref_field":"AFFW-ERSDA","required":false},{"example":"021","kind":"select_option","label":"Message number","name":"S_MSGNO","ref_field":"AFFW-MSGNO","required":false},{"example":"17.11.2026","kind":"parameter","label":"Key date (default: today)","name":"P_KEYDT","ref_field":"SY-DATUM","required":true},{"example":"","kind":"checkbox","label":"Fixable now only","name":"P_FIXAB","ref_field":"","required":false}],"part_of":["inv-inventory-control-pack","pp-production-control-pack"],"performance":"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.","process":"INV","quote_url":"https://nekuhub.com/en/request-a-quote/?report=pp-cogi-failed-goods-movements-aging","related":["pp-confirmation-upload","pp-consumption-without-goods-receipt"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Lists and corrects failed movements; no aging, no totals by reason and no check against current stock.","tcode":"COGI"},{"note":"Shows posted goods movements; it does not include the unposted movements waiting in COGI.","tcode":"MB51"}],"summary":"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.","tables":[{"access":"read","join_on":"","role":"Failed goods movements: material, quantity, movement type, error message (driving table)","table":"AFFW","variant":"both"},{"access":"read","join_on":"T100-ARBGB = AFFW-MSGID AND T100-MSGNR = AFFW-MSGNO AND T100-SPRSL = SY-LANGU","role":"Error message text","table":"T100","variant":"both"},{"access":"read","join_on":"MARD-MATNR = AFFW-MATNR AND MARD-WERKS = AFFW-WERKS AND MARD-LGORT = AFFW-LGORT","role":"Current unrestricted stock in the storage location","table":"MARD","variant":"both"},{"access":"read","join_on":"MAKT-MATNR = AFFW-MATNR AND MAKT-SPRAS = SY-LANGU","role":"Material description","table":"MAKT","variant":"both"},{"access":"read","join_on":"AFKO-AUFNR = AFFW-AUFNR","role":"MRP controller and production supervisor of the order","table":"AFKO","variant":"both"}],"title":"COGI Failed Goods Movements Aging Report","url":"https://nekuhub.com/en/reports/cogi-failed-goods-movements-aging-report/","vendor_id":"nekudos"}