PP Program Custom development Mass upload

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

  • CO11N Single Screen Entry of Confirmations. Confirms one operation on screen; does not read files.
  • CO12 Collective Entry of Confirmations. A collective entry screen; rows are still entered by hand and there is no duplicate check.

Tables used

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

TableRoleAccessSystem
AFRUOrder ConfirmationsPosted confirmations; also read for the duplicate checkWriteECC + S/4
AFKOOrder Header Data for PP OrdersOrder header and routing number (AUFPL)ReadECC + S/4
AFVCOperation within an OrderOperation number, control key and work centerReadECC + S/4
AFFWGoods Movements with Errors from ConfirmationsGoods movements that fail during backflush (written as standard)WriteECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEConfirmation file (XLSX or CSV)Single value—YesC:\temp\vardiya_teyit.xlsx
P_BUDATDefault posting date (when blank in the file)Single valueAFRU-BUDATNo16.11.2026
P_TESTTest mode (check without posting)Checkbox—NoX
P_CHKDUPDuplicate confirmation checkCheckbox—NoX

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
1Production orderAFRU-AUFNRYes
2OperationAFRU-VORNRYes
3Posting dateAFRU-BUDATNo
4YieldAFRU-LMNGAYes
5ScrapAFRU-XMNGANo
6ReworkAFRU-RMNGANo
7Variance reasonAFRU-GRUNDNo
8Setup time (h)AFRU-ISM01No
9Machine time (h)AFRU-ISM02No
10Labor time (h)AFRU-ISM03No
11Final confirmation (X)AFRU-AUERUNo
12Personnel numberAFRU-PERNRNo

Sample upload file

1Production order *Operation *Posting dateYield *ScrapReworkVariance reasonSetup time (h)Machine time (h)Labor time (h)Final confirmation (X)Personnel number
21000431001011/16/202640012000020.506.206.2090045
31000431002011/16/20263800005.805.80X90045
41000444003011/16/2026502100050.304490112
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Production orderAFRU-AUFNR
3OperationAFRU-VORNR
4Confirmation no.Calculated AFRU-RUECK / AFRU-RMZHL returned by the BAPI
5StatusCalculated From the BAPI return messages: posted, posted (COGI) or error
6MessageCalculated First error or success message from the BAPI return table

Sample result list

RowProduction orderOperationConfirmation no.StatusMessage
2100043100100000045812/1PostedConfirmation saved; 3 components backflushed
3100043100200000045813/1Posted (COGI)Confirmation saved; 1 goods movement went to COGI
410004440030ErrorConfirmable quantity exceeded for operation 0030
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 a folder on the application server; the first row is skipped as the header.
  2. 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.
  3. 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.
  4. 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.
  5. In test mode the BAPI is called as a test run; confirmation and backflush are checked without posting.
  6. 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

PP Report Custom ALV report

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 …

AFFW · T100 · MARD · MAKT

PP Report Custom ALV report

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 …

AFRU · AFVC · AFVV · CRHD

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 Production Order Confirmation Upload Program