Mass Maintenance Order Creation from Open Notifications Program
Short answer: A custom program that groups open maintenance notifications without an order by equipment or functional location and creates one maintenance order per group, linking the first notification to the order header and the others to the object list. It creates one operation per notification, optionally releases the order and lists the result per group.
- Estimated effort
- M · 5–7 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
Through IW22 or IW28 a separate order is created for each notification; in IW31 several notifications can be added to the object list by hand, but there is no mass, rule-based way to do it. Five small notifications created during a day for the same machine turn into five separate orders; planning, cost tracking and technician dispatch get scattered. The custom program groups the notifications by rule and creates one order through a BAPI.
Who uses it? Maintenance planners, work preparation teams and maintenance supervisors who turn many small malfunction reports into work at the end of a shift.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| QMELNotification Header | Notification header: type, short text, priority; the order link is written by the BAPI | Read / write | ECC + S/4 |
| QMIHNotification Maintenance Data | Equipment, planning plant, planner group, location | Read | ECC + S/4 |
| ILOAPM Object Location and Account Assignment | Functional location of the notification (grouping key) | Read | ECC + S/4 |
| AUFKOrder Master Data | New maintenance order header | Write | ECC + S/4 |
| AFIHMaintenance Order Header | Maintenance order data: equipment, planning plant, priority | Write | ECC + S/4 |
| AFVCOperation within an Order | Operations created per notification | Write | ECC + S/4 |
BAPIs and functions used
- BAPI_ALM_ORDER_MAINTAINMaintain Maintenance/Service Order. Creates the maintenance order with header, operations and object list, and releases it when requested
- BAPI_ALM_NOTIF_GET_DETAILRead PM/CS Notification Details. Reads the current status and order link of the notification before processing
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful groups permanently
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back in test mode and for failed groups
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_IWERK | Planning plant | Range / multiple | QMIH-IWERK | Yes | 1000 |
| S_QMART | Notification type | Range / multiple | QMEL-QMART | Yes | M1, M2 |
| S_INGRP | Planner group | Range / multiple | QMIH-INGRP | No | M01 |
| S_PRIOK | Priority | Range / multiple | QMEL-PRIOK | No | 2, 3, 4 |
| S_QMDAT | Notification date | Range / multiple | QMEL-QMDAT | No | 10.11.2026 – 17.11.2026 |
| P_AUART | Order type to create | Single value | AUFK-AUART | Yes | PM01 |
| R_EQUI | Group by equipment | Radio button | — | No | X |
| R_FLOC | Group by functional location | Radio button | — | No | — |
| P_REL | Release the orders | Checkbox | — | No | — |
| P_TEST | Test mode (grouping preview only) | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Group | Calculated Equipment or functional location + planner group |
| 2 | Equipment | QMIH-EQUNR |
| 3 | Functional location | ILOA-TPLNR |
| 4 | Notifications | Calculated Number of QMEL records in the group |
| 5 | Notification numbers | Calculated QMEL-QMNUM values in the group |
| 6 | Highest priority | QMEL-PRIOK |
| 7 | Order | AUFK-AUFNR |
| 8 | Operations | Calculated Number of AFVC lines created |
| 9 | Status | Calculated Created, released, test passed or error |
| 10 | Message | Calculated BAPI return message |
Sample result list
| Group | Equipment | Functional location | Notifications | Notification numbers | Highest priority | Order | Operations | Status | Message |
|---|---|---|---|---|---|---|---|---|---|
| 10004512 / M01 | 10004512 | TR01-URT-H1-P101 | 3 | 10021455, 10021460, 10021471 | 2 | 4001302 | 3 | Released | Order 4001302 saved |
| 10004530 / M01 | 10004530 | TR01-URT-H3 | 1 | 10021466 | 3 | 4001303 | 1 | Created | Order 4001303 saved |
| 10004601 / M03 | 10004601 | TR02-DEP-K1 | 2 | 10021480, 10021482 | 2 | 0 | Error | Notification 10021482 is locked by another user |
How does the program work?
- Open, not completed notifications without an order (QMEL-AUFNR blank) of the selected notification type, planning plant, planner group, priority and notification date are read from QMEL and QMIH.
- The functional location of the notification is found through QMIH-ILOAN with ILOA-TPLNR; the grouping key is equipment (QMIH-EQUNR) or functional location, as selected, with planner group and main work center added to the key.
- For each group BAPI_ALM_ORDER_MAINTAIN is called: HEADER CREATE with order type, planning plant, the object of the first notification and the highest priority; OPERATION CREATE per notification with the notification short text and main work center; OBJECTLIST CREATE links the other notifications to the order.
- With ‘release’ selected, the RELEASE method is added in the same call; in test mode the call is rolled back with BAPI_TRANSACTION_ROLLBACK, in a real run each group is committed.
- Notifications that are locked or have meanwhile been linked to an order by another user are skipped with an error message; the other groups continue.
- The result list shows the group, its notifications, the new order number, number of operations and the BAPI message.
Performance notes
Restrict the notification read by QMEL-QMART and QMDAT. BAPI_ALM_ORDER_MAINTAIN is called once per group; for hundreds of groups, run the program as a background job at the end of the shift.
Features
- Test mode (check without posting) Test mode shows the groups and orders that would be created without saving.
- Line-by-line result and error log
- Runs as a background job
- Send the result by email The list of new orders can be emailed to the planner group.
Authorization objects
- I_QMELChange maintenance notifications by notification type
- I_AUARTCreate maintenance orders by order type
- I_IWERKAuthorization by planning plant
Frequently asked questions
Can a task list be added to the order automatically?
Yes. If a general or equipment task list is assigned, the operations can come from the task list instead of the notification text; adding this option increases the effort range by one day.
Are breakdown notifications (priority 1) grouped too?
This is not recommended. Urgent breakdowns are usually handled immediately with a separate order, so priority 1 is excluded in the default selection; it can be added on the selection screen if needed.
Does the program work on S/4HANA?
Yes. BAPI_ALM_ORDER_MAINTAIN is supported on S/4HANA. For a clean core approach, the same logic can also be built on the released maintenance order APIs.
Packages that include this solution
Maintenance Notification-to-Confirmation Pack
A five-component pack that speeds up maintenance work from notification to confirmation: open notifications without an order, mass maintenance order …
Related reports
Mass Breakdown Notification Creation from Shift Downtime File Program
A custom program that reads the downtime list kept at the end of a shift, or a file from a production monitoring system, and creates a maintenance …
Open Maintenance Notifications Without Order Aging Report
A custom ALV report that lists open notifications not yet converted to a maintenance order by age, priority and how far they are past the required end …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.