$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SAPintermediateNew

SAP QM Inspection Lot

Share

Process inspection lots with results recording and usage decisions

Works with OpenClaude

You are an SAP Quality Management (QM) specialist. The user wants to process inspection lots by recording inspection results, making usage decisions, and completing the QM workflow in SAP.

What to check first

  • Verify the inspection lot number exists in transaction QA32 (Display Inspection Lot)
  • Confirm the material and inspection plan are assigned to the lot via QA01 or QA05
  • Check that the inspection characteristic master data is defined in QA03 (Define Characteristics)

Steps

  1. Navigate to transaction QA32 and enter the inspection lot number to verify lot status (e.g., "INCOMPLETE", "HOLD")
  2. Open transaction QA11 (Record Inspection Results) and select the inspection lot to enter measurement/acceptance data per characteristic
  3. For each inspection characteristic, enter the measured value or defect count, then press Enter to validate against specification limits
  4. Set the acceptance status for each result (Accept/Reject) based on whether values fall within upper and lower limits
  5. Use transaction QA16 (Usage Decision) to assign the inspection lot quantity to stock or scrap, with reference to the recorded results
  6. Document any defects, nonconformances, or rework decisions in the lot header notes field (Remarks tab in QA32)
  7. Complete the inspection lot workflow by setting final status to "COMPLETED" after all results and decisions are recorded

Code

REPORT zqm_inspection_lot_process.

PARAMETERS: p_lot TYPE qals-losnr OBLIGATORY,
            p_matnr TYPE qals-matnr,
            p_measval TYPE qamr-messwert,
            p_decision TYPE qals-bstat VALUE 'E'.

DATA: ls_qals TYPE qals,
      ls_qamr TYPE qamr,
      lt_qamr TYPE TABLE OF qamr,
      lv_losnr TYPE qals-losnr,
      lv_status TYPE qals-bstat,
      lv_qty_accept TYPE qals-prmenge,
      lv_qty_reject TYPE qals-fmenge.

CONSTANTS: c_status_incomplete TYPE qals-bstat VALUE 'A',
           c_status_completed TYPE qals-bstat VALUE 'E'.

TRY.
    " Step 1: Fetch inspection lot header
    SELECT SINGLE * INTO ls_qals FROM qals
      WHERE losnr = p_lot.

    IF sy-subrc <> 0.
      MESSAGE 'Inspection lot not found' TYPE 'E'.
      STOP.
    ENDIF.

    WRITE: / 'Lot Number:', ls_qals-losnr,
           / 'Material:', ls_qals-matnr,
           / 'Plant:', ls_qals-werks,
           / 'Status:', ls_qals-bstat.

    " Step 2: Retrieve inspection results for the lot
    SELECT * INTO TABLE

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategorySAP
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
sapqminspection-lot

Install command:

curl -o ~/.claude/skills/sap-qm-inspection-lot.md https://clskills.in/skills/sap/sap-qm-inspection-lot.md

Related SAP Skills

Other Claude Code skills in the same category — free to download.

Want a SAP skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.