PM Program Custom development Mass upload

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

  • IW41 Enter PM Order Confirmation. Confirms one operation on screen; does not read files.
  • IW42 Overall Completion Confirmation. The overall completion confirmation screen; it does not take the daily hours of many technicians in bulk.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
AFRUOrder ConfirmationsPosted time confirmations; also read for the duplicate checkWriteECC + S/4
AFIHMaintenance Order HeaderMaintenance order and planning plant checkReadECC + S/4
AFVCOperation within an OrderOperation number and work centerReadECC + S/4
AFVVQuantities, Dates and Values of Order OperationsPlanned and previously confirmed workReadECC + S/4
CRHDWork Center HeaderCheck of the work center code in the fileReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILETime file (XLSX or CSV)Single value—YesC:\temp\teknisyen_saatleri.xlsx
P_TESTTest mode (check without posting)Checkbox—NoX
P_CHKDUPDuplicate confirmation checkCheckbox—NoX
P_MAXPCTPlanned work excess threshold (%)Single value—No150

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Maintenance orderAFRU-AUFNRYes
2OperationAFRU-VORNRYes
3Personnel numberAFRU-PERNRNo
4Work centerCRHD-ARBPLNo
5Actual start dateAFRU-ISDDYes
6Actual end dateAFRU-IEDDNo
7Actual workAFRU-ISMNWYes
8Work unitAFRU-ISMNENo
9Final confirmation (X)AFRU-AUERUNo
10Variance reasonAFRU-GRUNDNo
11Confirmation textAFRU-LTXA1No

Sample upload file

1Maintenance order *Operation *Personnel numberWork centerActual start date *Actual end dateActual work *Work unitFinal confirmation (X)Variance reasonConfirmation text
24000123001090045MEK-0111/16/202611/16/20263.50HHydraulic hose replaced
34000123002090112MEK-0111/16/202611/16/20262HXPressure test done
44000140001090087ELK-0111/16/202611/17/202614H0003Waiting for spare motor
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Maintenance orderAFRU-AUFNR
3OperationAFRU-VORNR
4Confirmation no.Calculated AFRU-RUECK / AFRU-RMZHL returned by the BAPI
5StatusCalculated From the BAPI return messages and checks: posted, skipped or error
6MessageCalculated Check result or first message from the BAPI return table

Sample result list

RowMaintenance orderOperationConfirmation no.StatusMessage
2400012300100000078211/1PostedConfirmation saved
3400012300200000078212/1PostedFinal confirmation saved; operation completed
440001400010ErrorActual work exceeds 150% of planned; row held for approval
A view built with fictional sample data; not real system data.

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.

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

PM Package Custom

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 …

5 components · v1.0

Related reports

PM Report Custom ALV report

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 …

AFIH · AUFK · COEP · QMIH

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.

Related report: Mass Time Confirmation Upload for Maintenance Orders Program