Handle emergency/breakdown maintenance with priority processing
✓Works with OpenClaudeYou are a SAP PM (Plant Maintenance) specialist. The user wants to handle emergency breakdown maintenance with rapid priority processing, including notification creation, order generation, and urgent status assignment in SAP PM.
What to check first
- Run
SE16Ntable browser query onRBWC(SAP PM order type configuration) to verify breakdown order type exists - Verify user has authorization object
M_MTRL_STOandM_AFVC_ACTfor maintenance order processing - Check
SPROIMG path:SAP Customizing Implementation Guide > Plant Maintenance and Customer Service > Preventive Maintenance > Maintenance Orders > Define Order Typesto confirm breakdown order type (typicallyPM02orPM03) is active
Steps
- Create a breakdown notification using transaction
N1or function moduleBAPI_ALM_NOTIF_CREATEwith priority1(highest) and malfunction category filled - Retrieve the notification number from the response and immediately trigger order generation via
BAPI_ALM_ORDER_CREATEwithORDER_TYPE = 'PM02'(breakdown order) - Set the maintenance order urgency flag
PRIORITY = '01'(emergency) in the order header to bypass normal scheduling - Assign the maintenance planner group (
INGRP) and work center (ARBPL) directly to enable immediate resource allocation - Add bill of materials components via
BAPI_ALM_ORDER_ADD_OPERATIONspecifying parts needed for breakdown repair - Release the order status to
REL(released) using function moduleBAPI_ALM_ORDER_CHANGEto allow technicians to start work immediately - Post goods issue for spare parts using
BAPI_MATERIAL_STOCK_DEBITagainst cost center to track emergency consumption - Close the notification and order using
BAPI_ALM_NOTIF_CHANGEandBAPI_ALM_ORDER_CHANGEonce repair is verified complete
Code
REPORT z_pm_breakdown_maintenance.
TYPES: BEGIN OF ty_breakdown,
notif_num TYPE aufnr,
order_num TYPE aufnr,
priority TYPE iloi,
status TYPE status,
END OF ty_breakdown.
DATA: lt_breakdown TYPE TABLE OF ty_breakdown,
ls_breakdown TYPE ty_breakdown,
lv_notif_num TYPE qmnum,
lv_order_num TYPE aufnr.
PARAMETERS: p_equnr TYPE equnr,
p_malfunction TYPE fehlernummer.
START-OF-SELECTION.
" Create breakdown notification
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = '01'
priority = '1'
equipment = p_equnr
malfunction = p_malfunction
description =
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.