# Mass Time Confirmation Upload for Maintenance Orders Program

> 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.

- Type: Program, Custom development, Mass upload
- Module: PM
- Estimated effort: M (3–5 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/maintenance-order-mass-time-confirmation-upload-program/


## 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.

### Closest standard alternatives

- IW41: Confirms one operation on screen; does not read files.
- IW42: The overall completion confirmation screen; it does not take the daily hours of many technicians in bulk.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| AFRU | Posted time confirmations; also read for the duplicate check | Write | - | ECC + S/4 |
| AFIH | Maintenance order and planning plant check | Read | - | ECC + S/4 |
| AFVC | Operation number and work center | Read | - | ECC + S/4 |
| AFVV | Planned and previously confirmed work | Read | - | ECC + S/4 |
| CRHD | Check of the work center code in the file | Read | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_ALM_CONF_CREATE: Creates a time confirmation on the maintenance order operation
- BAPI_TRANSACTION_COMMIT: Saves successful rows permanently
- BAPI_TRANSACTION_ROLLBACK: Rolls back the changes of a failed row

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_FILE | Time file (XLSX or CSV) | Single value | - | Yes |
| P_TEST | Test mode (check without posting) | Checkbox | - | No |
| P_CHKDUP | Duplicate confirmation check | Checkbox | - | No |
| P_MAXPCT | Planned work excess threshold (%) | Single value | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Maintenance order | AFRU-AUFNR | Yes |
| Operation | AFRU-VORNR | Yes |
| Personnel number | AFRU-PERNR | No |
| Work center | CRHD-ARBPL | No |
| Actual start date | AFRU-ISDD | Yes |
| Actual end date | AFRU-IEDD | No |
| Actual work | AFRU-ISMNW | Yes |
| Work unit | AFRU-ISMNE | No |
| Final confirmation (X) | AFRU-AUERU | No |
| Variance reason | AFRU-GRUND | No |
| Confirmation text | AFRU-LTXA1 | No |

## Result list columns

| Column | Source |
|---|---|
| Row | Calculated: Row number in the file |
| Maintenance order | AFRU-AUFNR |
| Operation | AFRU-VORNR |
| Confirmation no. | Calculated: AFRU-RUECK / AFRU-RMZHL returned by the BAPI |
| Status | Calculated: From the BAPI return messages and checks: posted, skipped or error |
| Message | Calculated: Check result or first message from the BAPI return table |

## How does the program work?

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

## Authorization objects

- I_IWERK: Authorization to process orders by maintenance planning plant
- I_AUART: Authorization 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.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=pm-time-confirmation-upload
