Strategic architectural guide to modernizing SAP Plant Maintenance. Replace legacy procedural user exits with the 9-step Phase Model, RAP Business Object (I_MaintenanceOrderTP), and Clean Core BAdIs.
In classic SAP ECC, Plant Maintenance (module PM) relied on transactions IW31, IW32, and IW21. Over decades, organizations built fragile modifications:
IWO10001, IWO10009, and QQMA0014 directly altered database memory tables (AFIH, AFKO, RESB) without transaction safety.CRTD, REL, TECO, CLSD) and custom user statuses (E0001..E0010) caused inconsistent state machines.SAP S/4HANA Asset Management introduces a standardized, auditable 9-step lifecycle model that replaces chaotic status transitions:
| Phase # | Phase Name | Core Objective | Clean Core Mechanism |
|---|---|---|---|
| 1 | Initiation | Capture maintenance request (Notification) | Fiori Request Maintenance (F1511) |
| 2 | Screening | Gatekeeper review & priority assessment | Clean Core BAdI BADI_EAM_PHASE_MODEL_CHANGE |
| 3 | Planning | Estimate hours, spare parts, and permits | RAP BO I_MaintenanceOrderTP |
| 4 | Approval | Financial authorization threshold check | Flexible Workflow SWF_FLEX |
| 5 | Preparation | Verify parts availability & safety lockouts | aATP Product Allocation check |
| 6 | Scheduling | Assign work center slot & dispatch team | Maintenance Scheduling Board |
| 7 | Execution | Technician executes repair & logs time | Mobile SSAM / RAP OData v4 |
| 8 | Post-Execution | Technical completion & measurement readings | Electronic Signature & Audit Trail |
| 9 | Completion | Financial settlement to cost center/WBS | Universal Journal commit to ACDOCA |
In ABAP Cloud, classic BAPIs like BAPI_ALM_ORDER_MAINTAIN are superseded by the released RAP Business Object I_MaintenanceOrderTP. Developers execute order modifications using native Entity Manipulation Language (EML):
MODIFY ENTITIES OF I_MaintenanceOrderTP
ENTITY MaintenanceOrder
CREATE FIELDS ( MaintenanceOrderType MaintenanceOrderDesc MaintenancePlant MainWorkCenter )
WITH VALUE #( (
%cid = 'CID_1'
MaintenanceOrderType = 'YA01'
MaintenanceOrderDesc = 'Turbine Seal Replacement'
MaintenancePlant = '1010'
MainWorkCenter = 'MECH_01'
) )
FAILED DATA(ls_failed)
REPORTED DATA(ls_reported).
COMMIT ENTITIES.
Never directly insert records into table AUFK or AFKO. All order operations, material reservations, and phase transitions must be triggered via RAP EML or released BAdI BADI_EAM_ORDER_OPERATION.
Model your Plant Maintenance landscape, evaluate Phase Model sizing, and generate clean core RAP EML code with Tool #105: