| Status | |
|---|---|
| Owner | |
| Stakeholders | |
| Jira Request ID | |
| Jira Development ID |
| Parameter | Value |
|---|---|
| Application System | SAP S/4HANA ROW, SAP S/4HANA China, SAP S/4HANA CUI |
| Business Process Reference | 07.05.02.01. Perform Asset Maintenance Planning |
The purpose of this enhancement is to introduce a validation and logic control during the creation of Settlement Rules in Plant Maintenance Orders.
Settlement rules are created automatically in line with standard SAP functionality, based on the Order Type configuration and assigned Settlement Profile. For Turnaround scenarios, the settlement should go to the WBS Element associated with the Turnaround event.
The enhancement will trigger at the moment of Settlement Rule creation (not necessarily during Order Release), check whether the Maintenance Order is part of a Turnaround (via Revision/Maintenance Event field), and assign the correct receiver type accordingly.
Enhancement of Settlement Rule creation logic in PM Orders.
Automatic determination of WBS element for Turnaround-related orders.
Preserve standard settlement functionality for all non-Turnaround orders (no impact or modification in this case).
To ensure correct and automated determination of the appropriate settlement receiver (WBS element for Turnaround scenarios), while all other PM orders follow the standard settlement rule logic, maintaining compliance with project cost accounting principles.
Process Flow Diagram
Step | Description | Comment |
|---|---|---|
| 1 | User creates a Maintenance Order or opens an existing active order. | |
| 2 | User opens the Cost tab → manually triggers Settlement Rule Creation or triggers Settlement Rule via releasing the order. | |
| 3 | System calls Enhancement (User Exit). | |
| 4 | Settlement Rule created accordingly. |
|
| 5 | Order costs will settle correctly. |
Y3 Notification Type is available and configured in the system.
Relevant users have Fiori app access (Change Maintenance Order).
Each Turnaround Order has at least one Maintenance Event/Revision assigned.
Notifications with the same Maintenance Event/Revision contain the correct WBS element to be used for settlement.
Standard SAP PM settlement logic is assumed to be functioning correctly for non-turnaround orders.
Users creating Maintenance Orders have appropriate authorization for reading Notifications and WBS Elements.
Fiori app configuration for Notifications and Orders.
Y3 Notification must have WBS Element assigned.
BADI implementation must be activated in the system for Settlement Rule enhancement.
Integration with PS module (for WBS Element retrieval) must be in place.
Other custom developments interacting with Tables AFIH, VIQMEL, or Settlement Rules must not conflict with this logic.
The enhancement will follow the SAP standard security and authorization framework to ensure data integrity and controlled access during the creation of Settlement Rules in Maintenance Orders.
Not Applicable
Not Applicable
Ensure performance is not impacted when processing large numbers of Orders or Notifications.
If future integrations consume WBS or settlement data, ensure compliance with their data structure and format.
Check Order:
Validate if the order is PM Order (Table-Field): AUFK-AUTYP.
Retrieve Maintenance Event:
If Maintenance Event/Revision (Field: REVNR) exists, go to the Notification (Table: VIQMEL) and populate Y3 Notification Type (Field: QMART) with the Maintenance Event/Revision (Field: REVNR) value from the order.
Identify WBS Element:
For the maintenance notification matching this Maintenance Event/Revision (Field: REVNR), retrieve the associated WBS element (Field: PROID).
Settlement Rule Creation:
For all orders with this Maintenance Event/Revision, create settlement rule to the retrieved WBS element.
If no Maintenance Event/Revision (Field: REVNR) is found, continue with the standard settlement rule logic.
| Component | Details |
|---|---|
| Enhancement Type | User Exit Implementation |
| User Exit | IWO10027 – Generate user-defined settlement rule |
When the system starts creating a settlement rule for an order, the exit IWO10027 is called.
| Table | Field Name | Comments/Calculation/Field Manipulation |
|---|---|---|
| AFIH | AUFNR, REVNR | Maintenance Event assigned to the order. |
| VIQMEL | QMART, REVNR, PROID | Used to identify if there is a notification of type ‘Y3’ linked to the same Maintenance Event. If yes, PROID (WBS Element) is used as the settlement receiver. |
| Table | Field Name | Comments/Calculation/Field Manipulation |
|---|---|---|
| AFIH | REVNR | Validate that the Maintenance Event field is not empty before proceeding to check in VIQMEL. |
| VIQMEL | QMART | Validate that QMART = ‘Y3’ |
| VIQMEL | PROID | Validate that PROID (WBS Element) is filled for the identified notification; if missing, continue with the standard settlement rule logic. |
Not Applicable
Not Applicable
Not Applicable
Not Applicable
Processing Logic
Trigger Point:
Enhancement is triggered when the system attempts to create a settlement rule for a maintenance order.
Check Maintenance Event:
If REVNR = '' '', exit enhancement.
Check Related Notification:
If REVNR is filled, check table VIQMEL for any notification where:
QMART = 'Y3'
REVNR = <CAUFVD_IMP-REVNR>
Determine Settlement Receiver:
If such a notification exists:
Read PROID (WBS element) from the notification.
Create settlement rule for WBS element.
pmdfu_tab-konty = 'PR'.
pmdfu_tab-fdind = 'VIQMEL-PROID'.
pmdfu_tab-perbz = 'GES'.
pmdfu_tab-prozs = 100.
APPEND pmdfu_tab
If no matching notification found:
Continue with standard SAP settlement rule logic.
For the Change Parameter: APROF (Parameter Name)
Use Existing Profile (YEAM02):
The existing settlement rule profile YEAM02 can be retained. In this case, no profile change is required.
Within the settlement rule profile configuration, ensure that WBS Element is defined as an ''optional'' receiver under the Valid Receivers section.
Validation Checks:
Ensure WBS element or Cost Center is valid and open for posting.
Not Applicable
Not Applicable
No Error Handling Needed.
Unit testing should be performed during settlement rule creation for maintenance orders to validate the enhancement logic implemented in User Exit IWO10027 (Generate user-defined settlement rule). The tester should create or use existing maintenance orders under different scenarios to confirm that settlement rules are correctly assigned to WBS elements or Cost Centers according to the defined logic.
| ID | Condition | Expected Result |
|---|---|---|
| 1 | Order with Maintenance Event/Revision and there is a valid Y3 notification with the same Maintenance Event/Revision. | System creates settlement rule for WBS Element (VIQMEL-PROID) |
| 2 | Order with Maintenance Event but Y3 notification missing WBS element. | System continues with standard settlement rule logic. |
| 3 | Order without Maintenance Event/Revision. | System continues with standard settlement rule logic. |
| 4 | Order with Maintenance Event/Revision but there is no Y3 notification with the same Maintenance Event/Revision. | System continues with standard settlement rule logic. |
This enhancement depends on the implementation of User Exit IWO10027 – Generate user-defined settlement rule.
Data validation relies on correct entries in tables AFIH (REVNR), VIQMEL (QMART, REVNR, PROID).
Ensure master data such as Cost Centers and WBS Elements are valid and open for posting in the test environment.
To prevent creation of multiple Y3 notifications for the same Maintenance Event, a separate enhancement under “ERP-98 – UI Extensions in Create Maintenance Notification App” will provide additional control and validation.
Testing should be executed in both standalone order creation and integrated Turnaround scenarios to confirm system behavior consistency.
Ensure proper authorizations exist for testers to create and edit orders, notifications, and settlement rules.
Not Applicable.
| Package Name | Parent Package |
|---|---|
| Enhancement Type | Standard Definition Name | Custom Implementation Name | Design Rationale Reference |
|---|---|---|---|
| Object Type | Object Name | Purpose/High Level Logic | Design Rationale Reference |
|---|---|---|---|
This table is based on the Syensqo development standards document. It provides the naming conventions for authorization groups to associated with custom reports and tables to comply with security requirements.
ABAP | ZFI | ZMM | ZPS | ZCO | ZSD | ZBC | ZFI | ZCA |
|---|---|---|---|---|---|---|---|---|
| TABLES | ZFIT | ZMMT | ZPST | ZCOT | ZSDT | ZBCT | ZFIT | ZCAT |
Insert links and references to other documents which are relevant when trying to understand this decision and its implications. Other decisions are often impacted, so it's good to list them here with links. Attachments are also possible but dangerous as they are static documents and not updated by their authors.
