Mass Production Order Confirmation Upload Program
Short answer: A custom program that reads operation confirmations (yield, scrap, rework, activity times) coming from MES, shop-floor terminals or Excel at the end of a shift and posts them to production orders in bulk. It checks everything in test mode first, stops duplicate confirmations and lists the result of every row.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 4
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
CO11N confirms one operation on screen; CO12 is a collective entry screen but does not read files. Entering hundreds of confirmations by hand at the end of a shift takes time and increases the risk of wrong quantities and duplicate records. A full MES interface is not needed in every plant; a file-based upload with a test mode covers most needs.
Who uses it? Shift supervisors, production planners and PP consultants in plants with or without an MES integration.
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 confirmations; also read for the duplicate check | Write | ECC + S/4 |
| AFKOOrder Header Data for PP Orders | Order header and routing number (AUFPL) | Read | ECC + S/4 |
| AFVCOperation within an Order | Operation number, control key and work center | Read | ECC + S/4 |
| AFFWGoods Movements with Errors from Confirmations | Goods movements that fail during backflush (written as standard) | Write | ECC + S/4 |
BAPIs and functions used
- BAPI_PRODORDCONF_CREATE_TTEnter Production Order Confirmation (Time Ticket). Creates the operation confirmation as a time ticket for each row
- 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 | Confirmation file (XLSX or CSV) | Single value | — | Yes | C:\temp\vardiya_teyit.xlsx |
| P_BUDAT | Default posting date (when blank in the file) | Single value | AFRU-BUDAT | No | 16.11.2026 |
| P_TEST | Test mode (check without posting) | Checkbox | — | No | X |
| P_CHKDUP | Duplicate confirmation check | Checkbox | — | No | X |
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 | Production order | AFRU-AUFNR | Yes |
| 2 | Operation | AFRU-VORNR | Yes |
| 3 | Posting date | AFRU-BUDAT | No |
| 4 | Yield | AFRU-LMNGA | Yes |
| 5 | Scrap | AFRU-XMNGA | No |
| 6 | Rework | AFRU-RMNGA | No |
| 7 | Variance reason | AFRU-GRUND | No |
| 8 | Setup time (h) | AFRU-ISM01 | No |
| 9 | Machine time (h) | AFRU-ISM02 | No |
| 10 | Labor time (h) | AFRU-ISM03 | No |
| 11 | Final confirmation (X) | AFRU-AUERU | No |
| 12 | Personnel number | AFRU-PERNR | No |
Sample upload file
| 1 | Production order * | Operation * | Posting date | Yield * | Scrap | Rework | Variance reason | Setup time (h) | Machine time (h) | Labor time (h) | Final confirmation (X) | Personnel number |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 1000431 | 0010 | 11/16/2026 | 400 | 12 | 0 | 0002 | 0.50 | 6.20 | 6.20 | 90045 | |
| 3 | 1000431 | 0020 | 11/16/2026 | 380 | 0 | 0 | 0 | 5.80 | 5.80 | X | 90045 | |
| 4 | 1000444 | 0030 | 11/16/2026 | 50 | 2 | 1 | 0005 | 0.30 | 4 | 4 | 90112 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Production 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: posted, posted (COGI) or error |
| 6 | Message | Calculated First error or success message from the BAPI return table |
Sample result list
| Row | Production order | Operation | Confirmation no. | Status | Message |
|---|---|---|---|---|---|
| 2 | 1000431 | 0010 | 0000045812/1 | Posted | Confirmation saved; 3 components backflushed |
| 3 | 1000431 | 0020 | 0000045813/1 | Posted (COGI) | Confirmation saved; 1 goods movement went to COGI |
| 4 | 1000444 | 0030 | Error | Confirmable quantity exceeded for operation 0030 |
How does the program work?
- The file (XLSX or CSV) is read from the user’s PC or, in a background job, from a folder on the application server; the first row is skipped as the header.
- Every row is checked: the order exists in AFKO, is released (REL) and not technically completed; the operation number exists in AFVC and its control key allows confirmation; the variance reason and personnel number are valid when filled.
- Duplicate check: if AFRU already has a non-cancelled confirmation (STOKZ blank) with the same order, operation, posting date, personnel number and yield, the row is stopped with a warning.
- The row is mapped to the time ticket structure of BAPI_PRODORDCONF_CREATE_TT: yield, scrap, rework, variance reason, setup/machine/labor activities, final confirmation and personnel number. When the posting date is blank, the default date from the selection screen is used.
- In test mode the BAPI is called as a test run; confirmation and backflush are checked without posting.
- In a real run BAPI_TRANSACTION_COMMIT is called after every successful row and BAPI_TRANSACTION_ROLLBACK after an error. The confirmation number (RUECK/RMZHL) and messages are listed. Goods movements that fail during backflush are written to AFFW (COGI) as standard; this is shown on the row as well.
Performance notes
Run files above a few thousand rows as a background job. Committing per row isolates failed rows; processing the 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 MES files can be processed periodically from a folder on the application server.
Authorization objects
- C_AFRU_AWKAuthorization to enter confirmations by plant and order type
Frequently asked questions
Do backflush and automatic goods receipt run as well?
Yes. The BAPI uses the same confirmation logic as CO11N; backflush defined on the operation and automatic goods receipt on the last operation run as standard. Movements that fail go to COGI and are shown in the result list.
Can the file come automatically from MES?
Yes. Files that MES drops into a folder on the application server are processed periodically by a background job; processed files are moved to an archive folder.
Can it be used on S/4HANA?
Yes. BAPI_PRODORDCONF_CREATE_TT is supported on S/4HANA as well; backflush writes material documents to MATDOC.
Related reports
COGI Failed Goods Movements Aging Report
A custom ALV report that groups the backflush and automatic goods receipt errors waiting in COGI by age, error reason and material, and flags which of …
Scrap and Yield Analysis by Work Center Report
A custom ALV report that totals yield, scrap and rework from production confirmations per work center and operation, and compares the actual scrap …
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.