PM Program Custom development Background program

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

  • IW28 Change Notifications (List). Lists notifications and converts them to orders one by one; there is no rule-based grouping.
  • IW31 Create Maintenance Order. Several notifications can be added to the object list by hand; there is no mass processing.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
QMELNotification HeaderNotification header: type, short text, priority; the order link is written by the BAPIRead / writeECC + S/4
QMIHNotification Maintenance DataEquipment, planning plant, planner group, locationReadECC + S/4
ILOAPM Object Location and Account AssignmentFunctional location of the notification (grouping key)ReadECC + S/4
AUFKOrder Master DataNew maintenance order headerWriteECC + S/4
AFIHMaintenance Order HeaderMaintenance order data: equipment, planning plant, priorityWriteECC + S/4
AFVCOperation within an OrderOperations created per notificationWriteECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_IWERKPlanning plantRange / multipleQMIH-IWERKYes1000
S_QMARTNotification typeRange / multipleQMEL-QMARTYesM1, M2
S_INGRPPlanner groupRange / multipleQMIH-INGRPNoM01
S_PRIOKPriorityRange / multipleQMEL-PRIOKNo2, 3, 4
S_QMDATNotification dateRange / multipleQMEL-QMDATNo10.11.2026 – 17.11.2026
P_AUARTOrder type to createSingle valueAUFK-AUARTYesPM01
R_EQUIGroup by equipmentRadio button—NoX
R_FLOCGroup by functional locationRadio button—No—
P_RELRelease the ordersCheckbox—No—
P_TESTTest mode (grouping preview only)Checkbox—NoX

Result list columns

#ColumnSource
1GroupCalculated Equipment or functional location + planner group
2EquipmentQMIH-EQUNR
3Functional locationILOA-TPLNR
4NotificationsCalculated Number of QMEL records in the group
5Notification numbersCalculated QMEL-QMNUM values in the group
6Highest priorityQMEL-PRIOK
7OrderAUFK-AUFNR
8OperationsCalculated Number of AFVC lines created
9StatusCalculated Created, released, test passed or error
10MessageCalculated BAPI return message

Sample result list

GroupEquipmentFunctional locationNotificationsNotification numbersHighest priorityOrderOperationsStatusMessage
10004512 / M0110004512TR01-URT-H1-P101310021455, 10021460, 10021471240013023ReleasedOrder 4001302 saved
10004530 / M0110004530TR01-URT-H3110021466340013031CreatedOrder 4001303 saved
10004601 / M0310004601TR02-DEP-K1210021480, 1002148220ErrorNotification 10021482 is locked by another user
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

PM Package Custom

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 …

5 components · v1.0

Related reports

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.

Related report: Mass Maintenance Order Creation from Open Notifications Program