What an ABAP developer builds in Plant Maintenance: checks and defaults in customer exits and BAdIs of the maintenance order and notification, programs and interfaces that create orders, notifications and technical objects with BAPIs, IDoc and OData API integrations, reports on PM tables and released CDS views, and the classic RICEFW objects (shop papers, mobile integration, mass scheduling, work lists). The general techniques are taught in CORE ABAP › 10 Enhancements, 07 Interfaces and 11 Forms; this page shows where they are used in PM. Business background: pages 01 – 04; S/4HANA and clean core: page 06.
Part 1 – Where to enhance PM: choosing the technique

Requirement | Technique | Where |
|---|---|---|
Check the order before it is saved / released / technically completed | Exits IWO10009 / IWO10002 / IWO10004 or BAdI WORKORDER_UPDATE (AT_SAVE) | Part 2, 3 |
Generate a custom settlement rule | Exit IWO10027 | Part 2 |
Own fields on the order header | Append on AUFK / AFIH + exit IWO10018 (user fields); S/4HANA: Custom Fields | Part 2, 8 |
Check or default notification data | Exits QQMA0014 (check before save), QQMA0025 (defaults); BAdIs NOTIF_EVENT_SAVE, NOTIF_EVENT_POST | Part 2, 3 |
Own fields on the notification header | Exit QQMA0001 (customer subscreen) | Part 2 |
Check equipment before update | Exit IEQM0003 | Part 2 |
Field control on the maintenance order (S/4HANA) | BAdI EAM_ORDER_FIELD_CONTROL | Part 3 |
Create orders / notifications / technical objects from a program or interface | BAPIs or OData APIs | Part 4, 6 |
Send orders to an external system | IDoc IORDER01, APIs, events | Part 5, 6 |
Clean core (S/4HANA Cloud, ABAP Cloud) | Released APIs, CDS views and BAdIs, Custom Fields, side-by-side on BTP | Part 8 |
- Finding exits: SMOD with search help on the enhancement name (
IWO1*,QQMA*,IEQM*,IPRM*), or search the package of the transaction; the function exits of the order follow the pattern EXIT_SAPLCOIH_0nn (e.g. EXIT_SAPLCOIH_012 for IWO10012). Implement in a CMOD project. - Finding BAdIs: breakpoint on
CL_EXITHANDLER=>GET_INSTANCE(classic BAdIs) or the statementGET BADIwhile running IW31 / IW21, or SE18 / SPRO → Plant Maintenance → system enhancements. - Maintenance and production orders share program SAPLCOIH and parts of the order BAdIs: always check the order category (AUTYP 30 = maintenance) or order type inside your code.
Part 2 – Customer exits for orders, notifications and technical objects
Enhancement (SMOD) | Area | Purpose |
|---|---|---|
IWO10002 | Maintenance order | Customer check at order release – raise an error to block the release |
IWO10004 | Maintenance order | Customer check at technical completion (TECO) |
IWO10009 | Maintenance order | Customer check at save (e.g. mandatory fields, component rules) |
IWO10012 | Maintenance order | Priority handling on the order header (EXIT_SAPLCOIH_012) |
IWO10018 | Maintenance order | Update of user fields on the order header (no access to operation data) |
IWO10027 | Maintenance order | Generate a user-specific settlement rule (page 04 Part 3) |
QQMA0001 | PM / QM notification | Customer subscreen on the notification header for own fields |
QQMA0014 | PM / QM notification | Checks before saving the notification – error stops the save |
QQMA0025 | PM / QM notification | Default values when a notification is created |
IEQM0003 | Equipment | Additional checks before the equipment is updated |
- QQMA exits are shared by PM, QM and service notifications – filter on the notification type (QMART) or notification category in your include.
- Exits run in the SAP GUI transactions and inside BAPIs that call the same logic, but notification exits (QQMA…) are not called from the Web Dynpro / Fiori notification apps – for Fiori-relevant logic use a BAdI or the released S/4HANA options (Part 8).
- QQMA0014 is not triggered for notifications created by maintenance plan scheduling – test every channel through which your objects are created (dialog, plan, BAPI, API, mobile).
- SMOD / CMOD steps and the difference between user exits, customer exits and BAdIs: CORE ABAP › 10 Enhancements.
Part 3 – BAdIs in PM
BAdI | Area | Use |
|---|---|---|
WORKORDER_UPDATE | Orders (PM and PP) | Methods AT_SAVE (checks – the only method that may send an error message, with exception ERROR_WITH_MESSAGE), AT_RELEASE, BEFORE_UPDATE (own database updates in the update task), IN_UPDATE |
WORKORDER_CONFIRM | Order confirmations | Checks and logic when confirmations are saved (AT_SAVE …) |
IWO1_ORDER_BADI | Maintenance / service / refurbishment order | Order BAdI, e.g. separate completion of maintenance call dates |
IWO1_TL_INTEGRATION | Maintenance order | Influence the transfer of task list operations into the order |
NOTIF_EVENT_SAVE | Notification | Change notification data when it is saved (method CHANGE_DATA_AT_SAVE) |
NOTIF_EVENT_POST | Notification | Logic when the notification is posted (method CHECK_DATA_AT_POST) – e.g. trigger a message to middleware |
EAM_ORDER_FIELD_CONTROL | Maintenance order (S/4HANA) | Control field attributes (ready for input, mandatory, hidden) of order fields |
EAM_LTXT_TML_MAINT_NOTIF | Maintenance request (S/4HANA) | Choose long-text templates for maintenance requests |
- Message rules in WORKORDER_UPDATE: only AT_SAVE may issue an error (
MESSAGE … RAISING error_with_message). An error in BEFORE_UPDATE runs inside the update and ends in the short dump SYSTEM_ON_COMMIT_INTERRUPTED. - Do not call BAPI_ALM_ORDER_MAINTAIN or COMMIT WORK inside these BAdIs – the object is locked and in the middle of its own save (typical errors: "notification is locked", "not found").
- Implement classic BAdIs in SE19; check the "for SAP internal use" flag in SE18 first.
3.1 Example: check the maintenance activity type at save
|
The same rule as a customer exit would go into IWO10009; the BAdI is preferred – no CMOD project, several implementations possible, and it is also reached when the order is saved through the BAPI.
Part 4 – BAPIs: orders, notifications and technical objects
BAPI / FM | Purpose |
|---|---|
BAPI_ALM_ORDER_MAINTAIN | Create and change maintenance / service orders: header, operations, components, partners, texts, settlement rule, object list, user status – controlled by a methods table |
BAPI_ALM_ORDER_GET_DETAIL | Read one order with operations, components, partners |
BAPI_ALM_CONF_CREATE | Time confirmations for order operations (like IW41) |
BAPI_ALM_NOTIF_CREATE + BAPI_ALM_NOTIF_SAVE | Create a notification (temporary number), then save it to get the final number |
BAPI_ALM_NOTIF_DATA_MODIFY / BAPI_ALM_NOTIF_GET_DETAIL | Change / read a notification |
BAPI_EQUI_CREATE / BAPI_EQUI_CHANGE | Create / change equipment (DATA_GENERAL BAPI_ITOB, DATA_SPECIFIC BAPI_ITOB_EQ_ONLY) |
BAPI_EQUI_INSTALL / BAPI_EQUI_DISMANTLE | Install equipment at a functional location or superior equipment / dismantle it |
BAPI_FUNCLOC_CREATE / BAPI_FUNCLOC_CHANGE | Create / change functional locations (BAPI_ITOB + BAPI_ITOB_FL_ONLY, X-structures for changes) |
MEASUREM_DOCUM_RFC_SINGLE_001 | Create a measurement document (RFC, used by SCADA / mobile interfaces) |
BAPI_TRANSACTION_COMMIT / _ROLLBACK | End the LUW – the PM BAPIs do not commit |
- Classification data of technical objects is not filled by the equipment / functional location BAPIs – use the classification BAPIs (BAPI_OBJCL_…) afterwards.
4.1 BAPI_ALM_ORDER_MAINTAIN: the methods table

- IT_METHODS (BAPI_ALM_ORDER_METHOD) lists what to do: OBJECTTYPE (HEADER, OPERATION, COMPONENT, PARTNER, TEXT, SRULE …), METHOD (CREATE, CHANGE, DELETE, RELEASE …), OBJECTKEY and REFNUMBER = index of the data row in the matching table (IT_HEADER, IT_OPERATION …).
- A new order gets a temporary number
%00000000001; operation keys are order number + activity (%000000000010010). - The table must end with a SAVE row (or DIALOG) – otherwise the error "BAPI call must have a SAVE or DIALOG method". A new order needs at least one operation.
- For changes use METHOD CHANGE with the real order number and the update structures (IT_HEADER_UP, IT_OPERATION_UP:
Xfor each changed field). - ET_NUMBERS (BAPI_ALM_NUMBERS) maps the temporary number AUFNR_IN to the final AUFNR_NEW.
|
Values are internal: unit H must be the internal unit code, functional locations are passed in their edited form as in IL03. Custom header fields go through EXTENSION_IN like other BAPIs (CORE ABAP › 07).
4.2 Creating a notification
|
- Items, causes, activities and tasks are passed in the tables NOTITEM, NOTIFCAUS, NOTIFACTV, NOTIFTASK; long texts in LONGTEXTS.
Part 5 – IDocs and ALE in PM
Object | IDoc / message type | Notes |
|---|---|---|
Maintenance / service order (outbound) | Basic type IORDER01 | Created with transaction IORD; used e.g. for MES / SAP ME and external schedulers. There is no standard inbound order IDoc – inbound uses BAPI_ALM_ORDER_MAINTAIN or the API |
Equipment | EQUIPMENT_CREATE / basic type EQUIPMENT_CREATE01 | BAPI-generated ALE interface; inbound FM IDOC_INPUT_EQUIPMENT_CREATE; distribution model BD64 |
Other BAPIs | Generated ALE message types (BDBG) | Any BAPI can get an ALE interface when an IDoc channel is required |
- Change pointers for technical objects are not built automatically by default – for delta distribution check BD50 / BD52 or trigger the IDoc from a BAdI / exit.
- For new integrations prefer the OData APIs (Part 6) through SAP Integration Suite; IDocs remain common in existing ECC landscapes. ALE basics: CORE ABAP › 07 Interfaces.
Part 6 – OData APIs and communication scenarios

API (SAP Business Accelerator Hub) | Object | Notes |
|---|---|---|
API_MAINTENANCEORDER | Maintenance order with operations, components, long texts | OData V2 (SAP_COM_0397); public cloud: deprecated since 2023-08-01 – successor Maintenance Order OData V4 (CE_API_MAINTENANCEORDER_0002); status changes such as release and technical completion as function imports; filter status by process phase – the status text field cannot be used in $filter |
API_MAINTNOTIFICATION | Maintenance notification with items, causes, activities | OData V2; deep insert; select only the fields you need (performance) |
API_EQUIPMENT | Equipment, installation at functional location | OData V2 |
API_FUNCTIONALLOCATION | Functional location | Reads return at most 5,000 records per call – page with $skip |
API_MAINTENANCEPLAN | Maintenance plan and items | Communication scenario SAP_COM_0396 |
API_MEASURINGPOINT / API_MEASUREMENTDOCUMENT | Measuring points / readings | IoT and SCADA integration |
Maintenance task list, maintenance item, order confirmation, catalogs | Further APIs of the same area | Check the hub for the exact service per release |
Communication scenario | Content |
|---|---|
SAP_COM_0395 | Asset Management Master Data Integration (equipment, functional location, measuring points) |
SAP_COM_0396 | Maintenance Planning Integration (task lists, maintenance plans) |
SAP_COM_0397 | Maintenance Processing Integration (notifications, orders) |
SAP_COM_0398 | Plant Maintenance Execution Integration (confirmations, measurement documents) |
- In S/4HANA Cloud a communication arrangement for the scenario (with communication user and system) is required; on-premise the services are activated in /IWFND/MAINT_SERVICE.
- Mobile: SAP Service and Asset Manager uses its own OData services from the SAP Mobile Add-On for S/4HANA – extend those (MDK app + add-on BAdIs), not the standard APIs, for mobile-specific fields.
- OData basics: CORE ABAP › 08 OData; consuming APIs from BTP: Integration Suite › 02.
Part 7 – Reading PM data: tables, status and CDS views
Table | Content |
|---|---|
AUFK / AFKO / AFIH | Order master (type AUART, category AUTYP, OBJNR) / scheduling (GSTRP, GLTRP) / PM header (EQUNR, ILOAN, IWERK, ILART, PRIOK, QMNUM, WARPL, REVNR) |
AFVC / AFVV | Operations / operation quantities and dates (via AFKO-AUFPL) |
ILOA | Location and account assignment (TPLNR functional location, cost center …) |
QMEL / QMIH | Notification header / PM-specific notification data |
JEST / TJ02T | Status per object number (OBJNR) / system status texts |
Master data tables (EQUI, IFLOT, MPLA, PLKO …), the full data model and the system status codes (I0002 REL, I0045 TECO, I0046 CLSD …): page 02 Parts 1 and 10. JEST-INACT = 'X' means the status is no longer active.
7.1 Example: custom work list of released orders
|
To show all statuses as text ("REL MACM PRC") call FM STATUS_TEXT_EDIT per OBJNR. The same query works in ECC and S/4HANA on-premise – the PM tables did not change.
7.2 Released CDS views (ABAP Cloud, analytics, custom Fiori apps)
- The released views per object (I_Equipment, I_FunctionalLocation, I_MaintenanceOrderDEX / RAP BO I_MaintenanceOrderTP, the notification, planning and measuring point views) are listed on page 02 Part 11.2 – build custom CDS view entities and Fiori elements apps on them instead of AUFK / AFIH / JEST.
- Some PM views are released only for data extraction (suffix DEX, e.g. I_MaintenanceOrderDEX) – use them for BW / Datasphere, not as the base of transactional apps.
- Check the release state (C1 for use in ABAP Cloud, C2 for remote APIs) in ADT or the View Browser before building on a view; analytical cubes: page 04 Part 9.
- RAP: S/4HANA 2025 FPS01 adds transactional views for reference equipment (I_ReferenceEquipmentTP …); the main order and notification objects are reached through the APIs. RAP and EML: RAP › 08 · EML.
Part 8 – Key-user and clean-core extensibility
Level | PM examples |
|---|---|
Key user (S/4HANA, all editions) | Custom Fields on maintenance objects (check the business contexts offered in your release), Custom Analytical Queries on PM cubes, Custom Logic in released BAdIs |
Developer – ABAP Cloud (on-stack) | Implement released BAdIs (e.g. EAM_ORDER_FIELD_CONTROL) in ADT, read released CDS views, build own RAP apps (e.g. inspection rounds, work permits) |
Side-by-side on SAP BTP | Mobile and IoT scenarios, APM, custom apps calling API_MAINTENANCEORDER / API_MAINTNOTIFICATION, events through SAP Integration Suite |
Classic (on-premise / private cloud only) | CMOD exits (IWO1…, QQMA…), classic BAdIs, direct table reads, Z reports – allowed, but not upgrade-stable |
- Rule: take the highest level that solves the requirement and record why a classic extension was needed (Clean Core › 01 Clean Core; page 06).
Part 9 – Typical PM developments (RICEFW)
Type | Example | Technique |
|---|---|---|
Report | Custom work list for planners (open orders, missing parts, backlog in hours) | ABAP SQL on AUFK / AFIH / AFKO / RESB or released CDS views; ALV or Fiori elements list |
Report | Maintenance KPI report (breakdowns, MTTR, planned vs unplanned) | Analytical CDS / Custom Analytical Query (page 04) |
Interface | Mobile integration with a non-SAP app | API_MAINTENANCEORDER / API_MAINTNOTIFICATION or BAPIs behind an OData / RFC facade |
Interface | SCADA readings → measurement documents → counter-based plans | MEASUREM_DOCUM_RFC_SINGLE_001 or API_MEASUREMENTDOCUMENT |
Interface | Helpdesk / GIS creates notifications | API_MAINTNOTIFICATION or BAPI_ALM_NOTIF_CREATE + _SAVE |
Conversion | Load functional locations, equipment, task lists, plans | S/4HANA Migration Cockpit objects (page 06); BAPI programs for gaps |
Enhancement | Block release without a permit / mandatory fields / custom settlement rule | WORKORDER_UPDATE, IWO10002, IWO10027 |
Form | Shop papers / job cards (order header, operations, components, safety texts, barcode) | Shop papers per order type; Smart Forms / Adobe forms; print from the order (IW3D) |
Workflow | Approval of high-cost orders or notifications | Flexible workflow (phase model approval, page 06) or classic SAP Business Workflow |
Mass processing | Mass scheduling of maintenance plans, mass TECO / release | IP30H (mass scheduling), IW38 mass changes; wrapper programs scheduled as background jobs |
- Shop papers are configured per order type and printed from the order; custom layouts replace the standard form – form techniques: CORE ABAP › 11 Forms.
- Mass scheduling: IP30H schedules many plans in parallel; deadline monitoring (IP30) is usually a nightly job. Do not write own scheduling logic – it bypasses the plan's call history.
Part 10 – Interview questions
Q1. Which user exits have you used in PM orders?
IWO10009 for checks at save, IWO10002 at release, IWO10004 at TECO, IWO10027 for a custom settlement rule, IWO10018 for user fields on the header, IWO10012 for priority handling on the order header. They are customer exits (SMOD / CMOD), function exits EXIT_SAPLCOIH_0nn.
Q2. How do you check notification data before saving?
Exit QQMA0014 (error stops the save) or BAdI NOTIF_EVENT_SAVE for changes at save. QQMA exits are shared with QM and service notifications and are not called from the Fiori notification apps, so filter by notification type and test every channel.
Q3. Which methods does WORKORDER_UPDATE have and where may you raise an error?
AT_SAVE, AT_RELEASE, BEFORE_UPDATE, IN_UPDATE (and others). Only AT_SAVE may issue an error message, with RAISING error_with_message; errors in BEFORE_UPDATE run in the update and dump with SYSTEM_ON_COMMIT_INTERRUPTED. The BAdI also runs for production orders – check the order category.
Q4. Explain the methods table of BAPI_ALM_ORDER_MAINTAIN.
Each row says OBJECTTYPE (HEADER, OPERATION …), METHOD (CREATE, CHANGE …), OBJECTKEY (order number, or %00000000001 for a new order; operations order + activity) and REFNUMBER, the row index in the data table. A SAVE row is mandatory, a new order needs at least one operation, and the caller commits.
Q5. How do you get the final order number after creating an order with the BAPI?
From ET_NUMBERS: AUFNR_IN is the temporary number, AUFNR_NEW the final one – valid after BAPI_TRANSACTION_COMMIT.
Q6. Why does BAPI_ALM_NOTIF_CREATE alone not save a notification?
It only creates it in memory with a temporary number. BAPI_ALM_NOTIF_SAVE with that number saves it and returns the final number, and BAPI_TRANSACTION_COMMIT writes it to the database.
Q7. Which BAPIs create technical objects, and what do they not cover?
BAPI_EQUI_CREATE and BAPI_FUNCLOC_CREATE (DATA_GENERAL of type BAPI_ITOB, DATA_SPECIFIC of type BAPI_ITOB_EQ_ONLY / BAPI_ITOB_FL_ONLY), BAPI_EQUI_INSTALL for the installation. Classification values are not covered – use the classification BAPIs afterwards.
Q8. Is there an inbound IDoc for maintenance orders?
No standard one. IORDER01 is outbound (transaction IORD). Inbound orders use BAPI_ALM_ORDER_MAINTAIN, API_MAINTENANCEORDER or a BAPI-generated ALE interface.
Q9. Which OData APIs exist for PM?
API_MAINTENANCEORDER (OData V2; public cloud: successor Maintenance Order OData V4), API_MAINTNOTIFICATION, API_EQUIPMENT, API_FUNCTIONALLOCATION, API_MAINTENANCEPLAN, API_MEASURINGPOINT, API_MEASUREMENTDOCUMENT and further ones for task lists, items and confirmations – grouped in communication scenarios SAP_COM_0395 to 0398.
Q10. How do you select released maintenance orders that are not technically completed?
Join AUFK (AUTYP 30) with AFIH / AFKO and check JEST: active status I0002 (REL) exists and no active I0045 (TECO) or I0046 (CLSD). STATUS_TEXT_EDIT gives the status line as text.
Q11. A customer wants a mandatory field on the maintenance order in S/4HANA Cloud. What do you do?
Custom Fields (if a new field) and field control through the released BAdI EAM_ORDER_FIELD_CONTROL or the offered Custom Logic; no CMOD exits or modifications in the public cloud.
Q12. What typical RICEFW objects do you find in a PM project?
Work list and KPI reports, interfaces to mobile, SCADA and GIS, migration of technical objects and plans, release / save checks and settlement rules, shop papers, approval workflows and mass scheduling jobs.
🏠 Start Here · ◀ 04 · Integration & Reporting · 06 · S/4HANA & Architect ▶ · Sections: CORE ABAP | OOPS ABAP | ABAP on HANA | Clean Core | RAP | ABAP Points | SAP Fiori | SAPUI5 | Mobile Development (MDK) | BTP Foundations | BTP Development | CAP | SAP Build | ABAP on BTP | Integration Suite | SAP Business AI | SAP BASIS | Security | SAP SDLC
Functional: FICO ABAP | TRM ABAP | VIM | SAP BIS | SD ABAP | MM ABAP | PP ABAP | QM ABAP | PM ABAP | PS ABAP | EWM | TM ABAP | GTM ABAP | EHS ABAP | HR ABAP | BW | SAP Datasphere | SAP Business Data Cloud | SAP MDG | SAP Analytics Cloud | SAP Ariba | SAP CX | SAP IBP