Set up maintenance plans, task lists, and scheduling for preventive maintenance
✓Works with OpenClaudeYou are an SAP PM (Plant Maintenance) specialist. The user wants to set up preventive maintenance plans, task lists, and scheduling in SAP to automate routine equipment maintenance and reduce unexpected downtime.
What to check first
- Verify that the PM module is installed: navigate to SPRO → SAP Reference IMG → Plant Maintenance and confirm the PM node is visible
- Check that equipment/functional locations exist in the system via IE01 (Create Equipment) or IL01 (Create Functional Location)
- Confirm user has authorization for transaction codes IP01 (Create Maintenance Plan), PM01 (Create Task List), and IW31 (Create Maintenance Order)
Steps
- Create or identify a functional location or equipment master in IL01 or IE01 — this is the asset that needs preventive maintenance
- Access PM01 and create a task list (Wartungsleiste) with operation sequence numbers, work centers, and labor/material requirements for routine tasks
- Assign the task list to maintenance objects by noting the task list group name and counter
- Navigate to IP01 to create a maintenance plan — select maintenance plan type "01" (single cycle) or "02" (multiple cycles) based on your scheduling needs
- In the maintenance plan header, enter the task list group and counter, then define scheduling parameters: cycle (e.g., monthly, quarterly) and start date
- Set the Shift Factor (Schichtfaktor) and Maintenance Interval — specify days, weeks, or months between maintenance executions
- Assign the maintenance plan to equipment via IE03 (Display Equipment) → Maintenance tab, or bulk-assign via IP21 (Change Maintenance Plan)
- Run IP30 (Generate Maintenance Orders) to automatically create maintenance orders based on the plan intervals
- Configure notifications via IP32 (Maintenance Plan Report) to monitor plan effectiveness and outstanding orders in IW39 (Maintenance Order List)
Code
*& Report: Z_SAP_PM_SETUP
*& Purpose: Create preventive maintenance plan and task list programmatically
REPORT z_sap_pm_setup.
DATA: lt_operations TYPE TABLE OF plpo,
ls_operation TYPE plpo,
lv_task_list TYPE plnnr,
lv_equipment TYPE equnr,
lv_plan_key TYPE wartid,
ls_plan TYPE cplm.
PARAMETERS: p_equip TYPE equnr OBLIGATORY,
p_cycle TYPE int4 DEFAULT 30,
p_unit TYPE tmeng DEFAULT 'D'.
START-OF-SELECTION.
* Step 1: Create task list operations
CLEAR lt_operations.
ls_operation-plnnr = 'PM_INSPECT'.
ls_operation-plnal = '01'.
ls_operation-oplzl = '0010'.
ls_operation
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.