Mass Time Confirmation Upload for Maintenance Orders Program
Short answer: A custom program that reads technicians' working hours from mobile forms, timesheets or Excel and posts them in bulk as confirmations on maintenance order operations. It stops duplicate entries and entries far above plan, and checks everything in test mode first.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
IW41 confirms one operation on screen and IW42 is the overall completion confirmation; neither reads files. In companies without timesheets (CATS), technicians' paper or mobile forms are entered one by one at the end of the day; duplicate entries and excess hours are only noticed in the cost report. Entering hundreds of lines by hand every day delays the labor cost on the order.
Who uses it? Maintenance planners, team leads, maintenance office staff and PM consultants.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| AFRUOrder Confirmations | Posted time confirmations; also read for the duplicate check | Write | ECC + S/4 |
| AFIHMaintenance Order Header | Maintenance order and planning plant check | Read | ECC + S/4 |
| AFVCOperation within an Order | Operation number and work center | Read | ECC + S/4 |
| AFVVQuantities, Dates and Values of Order Operations | Planned and previously confirmed work | Read | ECC + S/4 |
| CRHDWork Center Header | Check of the work center code in the file | Read | ECC + S/4 |
BAPIs and functions used
- BAPI_ALM_CONF_CREATECreate Maintenance Order Confirmation. Creates a time confirmation on the maintenance order operation
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful rows permanently
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back the changes of a failed row
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Time file (XLSX or CSV) | Single value | — | Yes | C:\temp\teknisyen_saatleri.xlsx |
| P_TEST | Test mode (check without posting) | Checkbox | — | No | X |
| P_CHKDUP | Duplicate confirmation check | Checkbox | — | No | X |
| P_MAXPCT | Planned work excess threshold (%) | Single value | — | No | 150 |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Maintenance order | AFRU-AUFNR | Yes |
| 2 | Operation | AFRU-VORNR | Yes |
| 3 | Personnel number | AFRU-PERNR | No |
| 4 | Work center | CRHD-ARBPL | No |
| 5 | Actual start date | AFRU-ISDD | Yes |
| 6 | Actual end date | AFRU-IEDD | No |
| 7 | Actual work | AFRU-ISMNW | Yes |
| 8 | Work unit | AFRU-ISMNE | No |
| 9 | Final confirmation (X) | AFRU-AUERU | No |
| 10 | Variance reason | AFRU-GRUND | No |
| 11 | Confirmation text | AFRU-LTXA1 | No |
Sample upload file
| 1 | Maintenance order * | Operation * | Personnel number | Work center | Actual start date * | Actual end date | Actual work * | Work unit | Final confirmation (X) | Variance reason | Confirmation text |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 4000123 | 0010 | 90045 | MEK-01 | 11/16/2026 | 11/16/2026 | 3.50 | H | Hydraulic hose replaced | ||
| 3 | 4000123 | 0020 | 90112 | MEK-01 | 11/16/2026 | 11/16/2026 | 2 | H | X | Pressure test done | |
| 4 | 4000140 | 0010 | 90087 | ELK-01 | 11/16/2026 | 11/17/2026 | 14 | H | 0003 | Waiting for spare motor |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Maintenance order | AFRU-AUFNR |
| 3 | Operation | AFRU-VORNR |
| 4 | Confirmation no. | Calculated AFRU-RUECK / AFRU-RMZHL returned by the BAPI |
| 5 | Status | Calculated From the BAPI return messages and checks: posted, skipped or error |
| 6 | Message | Calculated Check result or first message from the BAPI return table |
Sample result list
| Row | Maintenance order | Operation | Confirmation no. | Status | Message |
|---|---|---|---|---|---|
| 2 | 4000123 | 0010 | 0000078211/1 | Posted | Confirmation saved |
| 3 | 4000123 | 0020 | 0000078212/1 | Posted | Final confirmation saved; operation completed |
| 4 | 4000140 | 0010 | Error | Actual work exceeds 150% of planned; row held for approval |
How does the program work?
- The file (XLSX or CSV) is read from the user’s PC or, in a background job, from the application server; the first row is skipped as the header.
- Every row is checked: the order exists in AFIH and its maintenance planning plant is within the user’s authorization; the order is released and not technically completed; the operation number exists in AFVC; the work center exists in CRHD when given in the file.
- Duplicate check: if AFRU already has a non-cancelled confirmation (STOKZ blank) with the same order, operation, personnel number and actual start date, the row is skipped.
- Excess check: if previous confirmations (AFVV-ISMNW) plus the work in the file exceed the threshold percentage of planned work (AFVV-ARBEI), the row is kept as an error and offered for approval.
- The row is mapped to the time ticket structure of BAPI_ALM_CONF_CREATE: order, operation, personnel number, work center, actual start and end, actual work and its unit, final confirmation, variance reason and confirmation text. In test mode the BAPI is called as a test run.
- In a real run BAPI_TRANSACTION_COMMIT is called after a successful row and BAPI_TRANSACTION_ROLLBACK after an error. Confirmation numbers and messages are listed; failed rows can be downloaded as a separate file.
Performance notes
Daily files are usually a few hundred rows and run online. Run large files as a background job; processing rows of the same order one after another avoids lock conflicts.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Failed rows can be corrected and uploaded again with the same template.
- Export to Excel An empty upload template can be downloaded as Excel.
- Runs as a background job
Authorization objects
- I_IWERKAuthorization to process orders by maintenance planning plant
- I_AUARTAuthorization by maintenance order type
Frequently asked questions
Is the personnel number mandatory?
No. If the company tracks confirmations per person, the personnel number is filled; otherwise the work center is enough. When the personnel number is blank, the duplicate check uses order, operation and date.
Does a final confirmation also complete the order?
A final confirmation only completes the operation. Technical completion of the order is done separately in IW32 or IW42 in the standard process; optionally an extra option can list orders whose operations are all finally confirmed.
Can it be used on S/4HANA?
Yes. BAPI_ALM_CONF_CREATE is supported on S/4HANA as well.
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
Maintenance Cost and Downtime by Equipment Report
A custom ALV report that splits the actual cost of maintenance orders per equipment in a period into labor, material, external services and other, and …
Overdue Maintenance Orders and Backlog by Work Center Report
A custom ALV report that lists open maintenance orders past their basic finish date with days late and remaining work hours, and calculates how many …
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.