Error fixSAP ECC and S/4HANAQM / Inspection Lot Creation

SAP QM: Inspection Lot Not Created at Goods Receipt

Error
SAP inspection lot not created at goods receipt MIGO

Also searched as

  • why is no inspection lot created in SAP QM
  • inspection type 01 not active material master
  • inspection lot not created for production order goods receipt 04
  • QA32 no inspection lot found after MIGO

Short answer

An inspection lot is created only when QM is active for the plant, the material has an active inspection type for the goods movement, and the material carries a QM control key. Check the Quality Management view in MM02, confirm inspection type 01 (purchase order) or 04 (production order) is active, then check QM activation in the plant and the goods movement used.

Applies to: SAP ECC 6.0 and SAP S/4HANA with the QM component in use. Inspection types 01 (GR for purchase order), 04 (GR from production order), 05 (other GR) and 08 (stock transfer).

How to find why no inspection lot was created

  1. 1In MIGO note the movement type (for example 101 for goods receipt to purchase order or production order) and the plant, material, and stock type posted.
  2. 2Open MM03 for the material and plant, go to the Quality Management view, and check that QM in Procurement is active and a QM control key is entered.
  3. 3Choose Inspection Setup and confirm the inspection type that matches your movement (01 for PO receipts, 04 for production order receipts) is flagged Active.
  4. 4Check the stock type in MIGO or MB51. If the goods were posted to unrestricted stock, the inspection type may be set to not post to inspection stock; if it is Post to Inspection Stock the receipt goes to quality inspection stock.
  5. 5Run QA32 for the plant and material with a creation date range and any status to see whether a lot exists but was missed, for example created under another origin.
  6. 6In customizing, check that QM is active for the plant (QM application active in plant) and that the QM control key and inspection type are configured.
  7. 7If the vendor is subject to a quality assurance agreement, check the info record and source list for QM control key and release status on the vendor.
  8. 8Repost a test goods receipt in a quality system after you correct the setup. Do not repair an existing receipt by manual movement.

The decision chain SAP follows at goods receipt

When a goods movement is posted, the system looks at the movement type, the plant and the material. If QM is not active for the plant, nothing happens. If the material master has no QM control key and no active inspection type for the origin, nothing happens. Only if both are present does the system create an inspection lot with an origin, such as 01 for goods receipt for a purchase order.

The inspection lot then takes the quantity of the receipt and, by default, the stock posts into quality inspection stock until the usage decision moves it. If an inspection plan exists for the material, the plan is assigned. If not, the lot is created but cannot be evaluated against specifications, and you must either create a plan in QP01 or maintain the specification manually.

Common causes by origin

For purchase order receipts, the usual causes are that inspection type 01 is not flagged active in the QM view, the QM control key is blank, or the receipt was posted via a movement type that has no inspection type linked, such as a posting to blocked stock or subcontracting. For production orders, check inspection type 04. It must be active in the material master and the order type must allow the receipt to create a lot.

A third cause is that the goods receipt was posted through an interface or a BAPI with an unrelated movement type, or with a stock type that bypasses QM. If you use the BAPI for goods movement, check that you pass the right movement type and that the receipt is committed. Compare with a manual MIGO posting for the same material.

-- Review in SE16N
Table QALS (inspection lots: PRUEFLOS, WERK, MATNR, ART, HERKUNFT, ENSTEHDAT)
Table QMAT (inspection setup per material and plant: MATNR, WERKS, ART, AKTIV)
Table MARC (QMATV for QM in procurement, SSQSS for QM control key)
Table MSEG (material document items: MBLNR, MATNR, BWART, INSMK)

Inspection plan and sampling after the lot exists

Once the lot exists, the next question is whether the plan was found. If QA32 shows the lot without a plan assigned, check QP01 or QP02 for the material and plant and make sure the plan has a valid status, usage and validity date. Inspection characteristics from master inspection characteristics (QS21) and sample procedures come with the plan.

A lot without a plan is not an error in itself. Some companies run inspection by exception using only a usage decision. But if your plan expects results recording, it is a setup gap that should be flagged before the lot reaches the shop floor. Use QA32 with a status filter to build a daily list of lots without a plan.

Common pitfalls

  • !Maintaining the QM control key in one plant but running the receipt in another where it is blank.
  • !Activating inspection type 01 but receiving production order output, which needs type 04.
  • !Fixing the setup and expecting the system to retroactively create a lot for a receipt already posted.
  • !Posting goods receipts through an interface with a different movement type than manual MIGO, bypassing the inspection origin.
  • !Treating a lot without an inspection plan as normal and letting results recording be skipped.

How an ERP-grounded AI assistant handles this

An assistant grounded in your SAP data (ERPray, read-only by default) can compare MSEG goods receipts with QALS inspection lots and list receipts that should have created a lot but did not, with the query shown. It can group the gaps by plant, movement type and vendor to point at the setup cause. Corrections to the QM view, inspection setup and plans are still made by quality and basis staff.

Frequently asked questions

Which inspection type applies to a production order receipt?

Inspection type 04 covers goods receipt from a production order. Type 01 covers goods receipt for a purchase order, 05 other goods receipts, and 08 stock transfers. The type must be active in the inspection setup on the Quality Management view of the material for the plant.

Can I create the inspection lot manually after the receipt?

Yes. QA01 creates an inspection lot manually with an origin such as 89 for manual lots. It does not post the stock to quality inspection stock. Use this as a workaround for a missed receipt, but fix the setup so future receipts create the lot automatically.

Why is the stock in unrestricted use with no lot?

The inspection type is not active or the QM control key is missing, so no lot was triggered and the stock posted straight to unrestricted use. Check the Quality Management view and inspection setup in MM03, then check QM activation for the plant in customizing.

Where do I see all inspection lots for a material?

Use QA32 and enter the plant, material and a creation date range, then clear the status filters to see all lots. The data lives in table QALS. Each lot shows origin, quantity, stock posting status, and whether a usage decision has been made.

Related

How-to

SAP QA11 Usage Decision: Make It and Post Stock Correctly

The usage decision (UD) in QA11 closes an inspection lot, assigns a quality score and a UD code such as accepted or rejected, and posts the lot quantity from quality inspection stock to unrestricted use, blocked stock, scrap or return to vendor. The UD is blocked until required inspection characteristics are closed and results are recorded.

Error fix

SAP M7 021: Deficit of SL Stock Quantity

M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.

How-to

SAP SE16N vs SQVI: Table Browser vs Ad Hoc Query

SE16N is a single-table browser: fast filtering, formatted display, and export from one table at a time, with an optional edit function for authorized users. SQVI (Quick Viewer) builds ad hoc queries that join multiple tables without writing ABAP, and can be saved as a reusable report. Use SE16N for a quick look at one table; use SQVI when you need data joined across two or more tables.

How-to

How to Use BAPI_TRANSACTION_COMMIT Correctly

SAP's BAPI programming model separates business logic from the database commit on purpose, so a caller must explicitly call BAPI_TRANSACTION_COMMIT after a successful BAPI - usually with WAIT = 'X' - or the created object never actually persists. Skipping this step, or forgetting WAIT, is the most common reason a BAPI 'runs fine' but nothing gets saved.

Error fix

SAP IDoc Status 51: Application Document Not Posted

Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.

Error fix

SAP Short Dump TIME_OUT: Maximum Runtime Exceeded

A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.

AI for ERP

AI for SAP Quality Management: Notifications, 8D, and CAPA Without the Manual Drafting

AI grounded on SAP QM data that triages notifications, drafts 8D and CAPA reports, and summarizes inspection trends, deployed on-prem for full traceability.

AI for ERP

AI for SAP S/4HANA, Running On-Prem or in Your Private Cloud

Run AI on SAP S/4HANA without sending ERP data to a public API. On-prem and private-cloud architecture, CDS views, OData, and honest deployment trade-offs.

Stuck on SAP ECC and S/4HANA?

Talk to engineers who work inside SAP ECC and S/4HANA every week, and who build private AI that answers these questions from your own ERP data.