{"audience":"Quality control and quality assurance teams, warehouse supervisors and production planning, especially in chemicals, food and pharma.","authorization_objects":[{"note":"Stock display authorization by plant","object":"M_MSEG_WMB"},{"note":"Inspection lot authorization by inspection type","object":"Q_INSPTYPE"}],"components":[],"countries":[],"effort_days_max":4,"effort_days_min":2,"effort_size":"S","faq":[{"a":"It depends on the batch level setting of the system. At plant level the dates are kept in MCHA; at material or client level in MCH1. The report reads this setting at installation and uses the right table.","q":"Why are batch dates sometimes in MCHA and sometimes in MCH1?"},{"a":"The standard version only lists; creating lots is the job of QA07. \"Re-test overdue, no lot\" lines usually mean the QA07 job is not scheduled or recurring inspection is not active for the material.","q":"Can the report create the recurring inspection lot itself?"},{"a":"On S/4HANA MCHB can still be read as a compatibility view and stock is calculated from material documents; the batch date fields do not change. The report logic stays the same.","q":"What changes 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 the batch opens MSC3N; clicking the inspection lot opens QA03."},{"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":"Batches due within the next 30 days can be sent weekly to the quality team."}],"functions":[],"gap":"QA07 creates recurring inspection lots in the background for batches whose next inspection date has arrived, but it does not give a list of batches that will fall due in the coming weeks. MB5M shows the shelf-life expiry date but does not show the re-test date, quality stock and the open inspection lot on the same line. Tracking both dates together with stock needs a custom report.","id":"qm-batch-retest-shelf-life-due","industries":[],"input_columns":[],"kind":"report","language":"en","lastmod":"2026-11-17","logic":"1. Batch stocks in the selected plants and storage locations are read from MCHB; optionally only batches with unrestricted, quality or blocked stock above zero are taken.\n2. Batch dates are read according to the batch level: from MCHA at plant level, from MCH1 at material or client level. The next inspection date is QNDAT, the shelf-life expiry date VFDAT and the production date HSDAT.\n3. Days remaining = date − key date, calculated separately for both dates.\n4. For the same material, batch and plant an inspection lot with origin 09 (recurring inspection) and no usage decision (QALS-STAT35 blank) is searched and its number is shown.\n5. Status: shelf life expired, re-test date passed and no lot (QA07 did not run or no lot was created), due within the days in the parameter, or OK. The material description is added from MAKT.","module":"QM","object_type":"alv_report","output_columns":[{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Material description","source_field":"MAKTX","source_table":"MAKT"},{"calculated":false,"formula":"","label":"Storage location","source_field":"LGORT","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Batch","source_field":"CHARG","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Unrestricted stock","source_field":"CLABS","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Quality stock","source_field":"CINSM","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Blocked stock","source_field":"CSPEM","source_table":"MCHB"},{"calculated":false,"formula":"","label":"Next inspection date","source_field":"QNDAT","source_table":"MCHA"},{"calculated":true,"formula":"QNDAT − key date (a negative value means overdue)","label":"Days to re-test","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Shelf-life expiry","source_field":"VFDAT","source_table":"MCHA"},{"calculated":true,"formula":"VFDAT − key date","label":"Days to expiry","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Open inspection lot","source_field":"PRUEFLOS","source_table":"QALS"},{"calculated":true,"formula":"Expired, re-test overdue (no lot), re-test overdue (lot open), due soon or OK","label":"Status","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"MCHB-WERKS","required":true},{"example":"0001","kind":"select_option","label":"Storage location","name":"S_LGORT","ref_field":"MCHB-LGORT","required":false},{"example":"RM-3100","kind":"select_option","label":"Material","name":"S_MATNR","ref_field":"MCHB-MATNR","required":false},{"example":"B260815","kind":"select_option","label":"Batch","name":"S_CHARG","ref_field":"MCHB-CHARG","required":false},{"example":"17.11.2026","kind":"parameter","label":"Key date","name":"P_KEYDT","ref_field":"","required":true},{"example":"30","kind":"parameter","label":"Days ahead for warning","name":"P_DAYS","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Only batches with stock","name":"P_STOCK","ref_field":"","required":false}],"part_of":[],"performance":"Read MCHB with the plant and material filters and drop zero-stock batches in the database. Read QALS in bulk with HERKUNFT = 09 and the material list.","process":"INV","quote_url":"https://nekuhub.com/en/request-a-quote/?report=qm-batch-retest-shelf-life-due","related":["mm-stock-aging","qm-inspection-lots-pending-ud-aging"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Creates recurring inspection lots for batches that are due; gives no forward-looking list.","tcode":"QA07"},{"note":"Shows the shelf-life expiry date; does not show the re-test date or the open inspection lot.","tcode":"MB5M"}],"summary":"A custom ALV report that lists batches in stock with their next inspection (re-test) date and shelf-life expiry date, the days remaining and any open recurring inspection lot. Quality and warehouse teams see expired or soon-to-expire stock before it is used.","tables":[{"access":"read","join_on":"","role":"Batch stock: unrestricted, quality and blocked (driving table)","table":"MCHB","variant":"both"},{"access":"read","join_on":"MCHA-MATNR = MCHB-MATNR AND MCHA-WERKS = MCHB-WERKS AND MCHA-CHARG = MCHB-CHARG","role":"Batch dates at plant level","table":"MCHA","variant":"both"},{"access":"read","join_on":"MCH1-MATNR = MCHB-MATNR AND MCH1-CHARG = MCHB-CHARG","role":"Batch dates at material or client level","table":"MCH1","variant":"both"},{"access":"read","join_on":"QALS-MATNR = MCHB-MATNR AND QALS-CHARG = MCHB-CHARG AND QALS-WERK = MCHB-WERKS (HERKUNFT = 09)","role":"Open recurring inspection lot","table":"QALS","variant":"both"},{"access":"read","join_on":"MAKT-MATNR = MCHB-MATNR AND MAKT-SPRAS = SY-LANGU","role":"Material description","table":"MAKT","variant":"both"}],"title":"Batches Due for Re-Test or Shelf-Life Expiry Report","url":"https://nekuhub.com/en/reports/batches-due-for-retest-or-shelf-life-expiry-report/","vendor_id":"nekudos"}