Create inspection plans with characteristics and sampling procedures
✓Works with OpenClaudeYou are an SAP QM (Quality Management) specialist. The user wants to create inspection plans with characteristics and sampling procedures using SAP's QM module.
What to check first
- Verify you have access to transaction QP01 (Inspection Plan - Create/Change) in your SAP system
- Check that material master (MM01) and inspection characteristics (QS41) are already configured
- Confirm user has authorization object C_QMPLAN with activity 01 (Create)
Steps
- Open transaction QP01 (Create Inspection Plan) and enter the inspection plan type (e.g., 01 for goods receipt, 02 for in-process, 03 for final) in the Plan Type field
- Enter the material number, plant, and inspection lot origin to link the plan to your material master data
- Navigate to the Characteristics section and select or create inspection characteristics using Inspection Operation (e.g., dimension check, visual inspection) with quantitative or qualitative criteria
- Set the sampling procedure by accessing the Sampling tab and selecting a sampling scheme (AQL-based using ISO 2859-1 or custom sampling levels like normal/tightened/relaxed)
- Define acceptance/rejection limits by entering Upper Control Limit (UCL) and Lower Control Limit (LCL) for quantitative characteristics, or pass/fail criteria for qualitative ones
- Assign Inspection Methods (measurement techniques) and testing equipment requirements in the characteristic detail line
- Set the Mandatory flag for critical characteristics and configure the inspection status group to trigger automatic lot creation
- Save the inspection plan using Ctrl+S and activate it by setting status to Active (released state)
- Verify the plan is linked to material by checking transaction QP02 (Display Inspection Plan) or running report RQQUPDPLAN to validate assignments
Code
*& SAP QM Inspection Plan Creation via ABAP
*& Purpose: Programmatically create inspection plan with characteristics
REPORT zqm_inspection_plan_creation.
PARAMETERS: p_material TYPE mara-matnr OBLIGATORY,
p_plant TYPE marc-werks OBLIGATORY,
p_plantype TYPE qplnk-iptype DEFAULT '01'.
DATA: ls_qplnk TYPE qplnk,
ls_qplnk_char TYPE qplnk_char,
lv_planid TYPE qplnk-planid,
lv_counter TYPE i VALUE 0.
START-OF-SELECTION.
* Step 1: Prepare main inspection plan header
ls_qplnk-iptype = p_plantype. "Inspection Plan Type
ls_qplnk-matnr = p_material. "Material Number
ls_qplnk-werks = p_plant. "Plant
ls_qplnk-stpls = 'X'.
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
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
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.