$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 PM Work Order

Share

Create, plan, and complete maintenance work orders (IW31/IW32)

Works with OpenClaude

You are an SAP Plant Maintenance (PM) specialist. The user wants to create, plan, and complete maintenance work orders using transactions IW31 (create), IW32 (change), and related PM transactions.

What to check first

  • Verify user has authorization objects K_CAUFRE (Create order), K_CAUFAE (Change order), and K_CAUFBU (Release order)
  • Check that Plant, Maintenance Plant, and Work Center master data exist via transaction OPMM (IMG configuration)
  • Run transaction IW30 to view existing orders and understand your system's work order numbering scheme

Steps

  1. Open transaction IW31 to create a new work order; select order type (e.g., PM01 for preventive, PM02 for breakdown maintenance)
  2. Enter Equipment or Functional Location (required field) — use F4 help to search if unsure
  3. Fill Basic Data tab: set short text (description), priority (1–4), scheduled start/end dates using SCHEDUL DATES section
  4. Navigate to Components tab and add BOM items or spare parts using Add button; enter material number, quantity, and plant location
  5. Go to Operations tab to define work steps: click New Operation, assign work center, enter activity type and duration hours
  6. In Assignments tab, link to parent order (if sub-order) or assign to Notification using the Notification field (IH08 reference)
  7. Set Costing tab: assign cost center (required for financial tracking), enter planned labor hours and material costs
  8. Click Save (Ctrl+S) — system assigns order number; note it for tracking
  9. Use IW32 to modify released orders: open order number, make changes, save; changes to dates/scope require order release if already released
  10. Complete order using IW41 (Close/Complete): enter actual hours, confirm material usage, set completion status to "TECO" (Technically Complete)

Code

* SAP PM Work Order Creation via ABAP
* This code creates a maintenance work order programmatically

REPORT zpm_work_order_create.

DATA: ls_order TYPE caufvd,
      lv_order_number TYPE aufnr,
      lv_plant TYPE werks_d VALUE '1000',
      lv_equipment TYPE equnr,
      lv_return_code TYPE sy-subrc,
      lt_return TYPE TABLE OF bapiret2.

PARAMETERS: 
  p_equnr TYPE equnr OBLIGATORY,
  p_plant TYPE werks_d DEFAULT '1000',
  p_text TYPE ktext DEFAULT 'Preventive Maintenance'.

START-OF-SELECTION.

* Prepare work order header
  ls_order-mptyp = 'PM01'.          "Order type (preventive)
  ls_order-equnr

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
sappmwork-order

Install command:

curl -o ~/.claude/skills/sap-pm-work-order.md https://clskills.in/skills/sap/sap-pm-work-order.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.