| Status |
| ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Owner | YILMAZTURKSARUKAN-ext, GokhanAyse | ||||||||||||
| Stakeholders | |||||||||||||
| Jira Request ID |
| ||||||||||||
| Jira Development ID |
|
High- Level Specification
| 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 |
Functional Overview
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 created with Cost Center as the settlement receiver for all the maintenance orders. However, for in line withstandard SAP functionality, based on the Order Type configuration and assigned Settlement Profile. For Turnaround scenarios, the settlement should not go to a Cost Center but instead to a the WBS Element associated with the Turnaround event.
The enhancement will intervene 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.
Scope and Objectives
Enhancement of Settlement Rule creation logic in PM Orders (via BAdI or Enhancement Spot).
Automatic determination of WBS element for Turnaround-related orders.
Validation and override of default settlement receiverPreserve 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 or Cost Center) based on Turnaround contextelement for Turnaround scenarios), while all other PM orders follow the standard settlement rule logic, maintaining compliance with project cost accounting principles.
Process Flow Diagram
| draw.io Board 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 |
->If it is filled, the system will check which WBS element is assigned to that event.
->If it is not filled, the system should instead check the Cost Center assignment.
| costs will settle correctly. |
Assumptions
Y3 notification type Notification Type is available and configured in the system.
- Maintenance Orders will be released exclusively via the Fiori applications.
Relevant users have Fiori app access (Create Maintenance Notification, Find Maintenance Notification).
WBS element is always valid and released.
Dependencies
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.
Dependencies
PS (Project System) configuration for WBS elements.Fiori app configuration for notifications Notifications and ordersOrders.
Workflow for order release.
Security, Integrity and Controls
To ensure secure processing of this enhancement, the following points apply:
- The enhancement will be triggered during maintenance notification and order creation via Fiori apps (Create Maintenance Notification and Find Maintenance Notification).
Authorization to create or convert Y3 notifications will depend on existing SAP Plant Maintenance roles along with project authorization via WBS.
The system must verify user authorization to assign or modify a WBS element linked to a project.
No custom authorization objects are foreseen.
No custom tables are required for this enhancement. If later introduced, they must be assigned to an authorization group.
Since the authorization checks for creating and converting notifications/orders are already handled in the calling standard Fiori apps, this section applies: “Follow calling program authorization check.”
Configuration Requirements
The following configuration changes are required to support the enhancement:
Notification Type Y3
New notification type created for project-related maintenance.
Order Type Configuration
Settlement profile assigned to the relevant order type.
Ensure order type allows account assignment to WBS.
Settlement Profile
- A Settlement Profile will be created: YEAM03
Settlement receiver type: WBS element.
Default Object Type: WBS
Validation/Enhancement Spot
Settlement rule generation is handled through standard SAP functionality based on the assigned settlement profile.
Error message configuration for missing or invalid WBS entries.
Language Requirements
Special Requirements
Y3 Notification must have WBS Element assigned.
- Y3 Notification Type is configured.
- To prevent creation of multiple Y3 Notifications for the same Maintenance Event, an enhancement will be implemented under “ERP-349 - UI Extensions in Create Maintenance Notification App.” This enhancement will ensure control and validation during Notification creation.
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.
Security, Integrity and Controls
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.
Configuration Requirements
Not Applicable
Language Requirements
Not Applicable
Special Requirements
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
The enhancement must ensure that the WBS element used in notifications and orders is valid, released, and belongs to an active project.
- The Planning WBS is not automatically derived in the maintenance order.
- The WBS element in the Account Assignment is automatically assigned; however, if automatic population of the Planning WBS is required, an additional enhancement will be needed. No localization, legal, or country-specific compliance requirements apply
.
Design Rationale
Functional Requirements
Notification Type Y3 Creation
When users create a maintenance notification of type Y3 (Project-related), the system must enforce the WBS Element as a mandatory field in the notification.
The user should not be able to save or release a Y3 notification without entering a valid, released WBS Element.
Order Creation from Notification
When converting a Y3 notification into a maintenance order via the Find Maintenance Notification Fiori app:
The WBS Element must be automatically transferred from the notification to the order’s Account Assignment section (field: ILOA-PROID).
The system must automatically generate a settlement rule in the maintenance order using the WBS element as the settlement receiver.
The generated settlement rule must use standard settlement parameters
Error Handling
If the WBS Element in the notification is missing, invalid, or not released, the system should prevent order creation and display an error message (e.g., “WBS Element is mandatory for Notification Type Y3.”).
Standard Compliance
The enhancement should utilize standard SAP settlement functionality and standard configuration (settlement profile, order type setup).
No manual user action should be required for settlement rule creation.
Proposed Technology to Use
Check Order:
Validate if the order is PM Order (Table-Field): AUFK-AUTYP.
- Check if the Maintenance Event/Revision (Field: REVNR) field is filled in the order (Table: AFIH).
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.
Proposed Technology to Use
| 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.
Data Source Considerations
| 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. |
Data Validation Considerations
| Table | Field Name | Comments/Calculation/Field Manipulation |
|---|
Custom Tables
Master Data
Configuration Table
| 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. |
Custom Tables
Not Applicable
Master Data
Not Applicable
Configuration Table
Not Applicable
Selection Screen Enhancement
Select:
Processing Logic
Notification Creation (Type Y3):
User creates notification via Fiori app.
System checks if notification type = Y3.
If yes → WBS field must be filled.
If WBS is blank → error message displayed.
Notification saved only if WBS valid and released.
Order Creation (from Notification):
User converts Y3 notification to order.
System automatically copies WBS element to Order-Account Assignment section (ILOA-PROID).
Settlement rule generation is handled through standard SAP functionality based on the assigned settlement profile.
System creates settlement rule automatically.
Error message displayed if settlement rule creation fails.
Order Processing:
Order processed normally.
Settlement executed automatically based on the generated rule.
Volumetrics
Performance Considerations
Error Handling
- Missing WBS (Y3 Notification): Error message “WBS Element is mandatory for notification type Y3.”
- Invalid or Unreleased WBS: Error message “WBS Element is invalid or not released.”
Testing
How to Test
Not Applicable
Processing Logic
Trigger Point:
Enhancement is triggered when the system attempts to create a settlement rule for a maintenance order.
- The exit IWO10027 is called.
- Validate Order Type:
- Check CAUFVD_IMP-AUTYP = ''30'' (Maintenance Order)
If not, exit enhancement.
- Check CAUFVD_IMP-AUTYP = ''30'' (Maintenance Order)
Check Maintenance Event:
- Check CAUFVD_IMP-REVNR
If REVNR = '' '', exit enhancement.
- Check CAUFVD_IMP-REVNR
Check Related Notification:
IfREVNR 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 forWBS element.
- ZXWOCU24
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.
Volumetrics
Not Applicable
Performance Considerations
Not Applicable
Error Handling
No Error Handling Needed.
Testing
How to Test
Unit testing should be performed during settlement rule creation for maintenance orders to validate the enhancement logic implemented inUser 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.
Test Conditions and Expected Results
| ID | Condition | Expected Result |
|---|---|---|
| 1 | Create notification type Y3 without WBS | System throws error; cannot save. |
| 2 | Create notification type Y3 with valid released WBS | Notification saved successfully. |
| 3 | Convert Y3 notification to order via Find Maintenance Notification. | WBS copied to order; settlement rule auto-created. | 4 | Check settlement rule in order. |
| 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 withstandard 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. |
Test Considerations/Dependencies
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.
Other Information
Not Applicable.
Test Considerations/Dependencies
Other InformationDevelopment Details
Package
| Package Name | Parent Package |
|---|---|
Enhancement Implementation
| Enhancement Type | Standard Definition Name | Custom Implementation Name | Design Rationale Reference |
|---|---|---|---|
Other Development Objects
| Object Type | Object Name | Purpose/High Level Logic | Design Rationale Reference |
|---|---|---|---|
Appendix
Custom Authorization Group Naming Convention
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 |
See also
| Attachments | ||||||
|---|---|---|---|---|---|---|
|
Change log
| Change History | ||
|---|---|---|
|