PP Report Custom development ALV report

Shop Floor (MES) Confirmation Interface Log and Error Monitor

Short answer: A monitoring report that shows on one screen which production confirmations from the shop floor system (MES) were posted in SAP, which failed and which are pending. Failed messages are grouped by cause, the user can correct the data and reprocess the confirmation from the report; posted confirmations are matched to the order and confirmation number.

Estimated effort
M · 7–10 working days
System
ECC and S/4HANA
Tables
7
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

If MES confirmations arrive as IDocs their status is visible in WE02 and BD87; if they arrive through direct function calls they appear only in the application log (SLG1); goods movement errors after the confirmation are in COGI. None of these shows the message with its production order and operation in business terms, and reprocessing differs by channel. The custom report combines the three sources and offers one reprocessing path.

Who uses it? Production system owners, PP consultants, interface support teams and shift supervisors.

Closest standard alternatives

  • WE02 Display IDoc. Shows IDocs and their status; does not match them with order and operation in business terms.
  • BD87 Status Monitor for ALE Messages. Reprocesses failed IDocs; does not cover confirmations received through direct calls.
  • COGI Postprocess Faulty Goods Movements. Corrects failed goods movements after confirmation; does not show the interface message.
  • SLG1 Application Log: Display Logs. Shows the application log; does not group messages or offer reprocessing.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
EDIDCIDoc Control RecordIDoc control record: message type, time, current status (driving table on the IDoc channel)—ECC + S/4
EDIDSIDoc Status RecordsIDoc status history and error textEDIDS-DOCNUM = EDIDC-DOCNUMECC + S/4
BALHDRApplication Log HeaderApplication log header on the direct call channelBALHDR-EXTNUMBER = MES message ID / mesaj kimliğiECC + S/4
AFRUOrder ConfirmationsConfirmation created in SAP: quantities, confirmation number, reversal flagAFRU-AUFNR, AFRU-VORNR ↔ MES message / mesajECC + S/4
AFFWGoods Movements with Errors from ConfirmationsFailed goods movements after confirmationAFFW-RUECK = AFRU-RUECK AND AFFW-RMZHL = AFRU-RMZHLECC + S/4
AFKOOrder Header Data for PP OrdersOrder header and materialAFKO-AUFNR = AFRU-AUFNRECC + S/4
CRHDWork Center HeaderWork centerCRHD-OBJTY = 'A' AND CRHD-OBJID = AFRU-ARBIDECC + S/4

BAPIs and functions used

  • BAPI_PRODORDCONF_CREATE_TTEnter Production Order Confirmation (Time Ticket). Creates a confirmation from a corrected message
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Commits a successful reprocessing
  • IDOC_READ_COMPLETELYRead IDoc Completely. Reads the data of a failed IDoc for the correction screen

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_DATEReceipt dateRange / multipleEDIDC-CREDATYes14.11.2026 – 15.11.2026
P_WERKSPlantSingle valueAFRU-WERKSYes1000
S_AUFNRProduction orderRange / multipleAFRU-AUFNRNo1004601
P_STATStatus: all / failed / pending / postedRadio button—YesHatalı
P_TESTTest run when reprocessingCheckbox—NoX

Output columns

#ColumnSource
1Received atCalculated EDIDC-CREDAT/CRETIM or the receipt time in the log table
2Message / IDocEDIDC-DOCNUM
3OrderAFRU-AUFNR
4OperationAFRU-VORNR
5Work centerCRHD-ARBPL
6YieldAFRU-LMNGA
7ScrapAFRU-XMNGA
8StatusCalculated Posted, failed, pending or confirmation OK / movement failed
9Error textEDIDS-STATXT
10Confirmation no.AFRU-RUECK
11AttemptsCalculated Number of attempts in the log table

Sample output

Received atMessage / IDocOrderOperationWork centerYieldScrapStatusError textConfirmation no.Attempts
15.11.2026 07:02000000000451882310046010030KYN-022503Posted1002451
15.11.2026 07:15000000000451883010046150020CNC-04400FailedOrder is locked by another user2
15.11.2026 07:31000000000451884110046220060PKT-012800Confirmation OK / movement failedInsufficient stock for component1002511
15.11.2026 07:48000000000451885210046400010KSM-0150012FailedOperation already finally confirmed1
A view built with fictional sample data; not real system data.

How does the report work?

  1. Every incoming MES message is written to an interface log table: message ID, receipt time, order, operation, work center, yield/scrap quantity, times, status and number of attempts. If the existing interface uses IDocs, the log can be filled from EDIDC/EDIDS; if it uses direct calls, from the BALHDR application log; the choice is made during installation according to the interface design.
  2. For the IDoc channel, the message type, creation time and current status are read from EDIDC and the latest status text from EDIDS; status 53 is classified as posted, 51 and 56 as failed, 64 as pending.
  3. Posted messages are matched to the confirmation in AFRU (order, operation, posting time and quantity; directly via RUECK/RMZHL if the log table holds the confirmation number); reversed confirmations are flagged separately.
  4. If the confirmation was saved but the automatic goods movement failed, the AFFW record is matched by order and confirmation and the status ‘confirmation OK, movement failed’ is set.
  5. Error messages are grouped by message class and number (e.g. order locked, operation finally confirmed, insufficient stock) and the count per group is shown.
  6. Reprocessing: on the IDoc channel the IDoc is reprocessed; on the direct channel BAPI_PRODORDCONF_CREATE_TT is called with the corrected data and saved with BAPI_TRANSACTION_COMMIT. An automatic retry job can be scheduled for lock errors; each attempt is written to the log table.

Performance notes

Index the log table on receipt date and status. Restrict EDIDC by message type, direction and creation date; read only the latest status record from EDIDS. Run the retry job between shifts to reduce order locks.

Features

  • ALV list (sort, filter, subtotals)
  • Double-click drill-down to the document From a line you open the IDoc, the application log, the confirmation (CO14) or COGI.
  • Test mode (check without posting) Reprocessing is tried in test mode first.
  • Line-by-line result and error log Every reprocessing attempt is logged with user and time.
  • Runs as a background job An automatic retry job can be scheduled for lock errors.
  • Send the result by email Messages that stay failed longer than a set time are reported to the support team.

Authorization objects

  • C_AFRU_AWKDisplay confirmations and create them when reprocessing
  • S_IDOCMONIIDoc monitoring and reprocessing
  • S_APPL_LOGDisplay the application log

Frequently asked questions

Do we need to change our existing MES interface?

If the interface uses IDocs, no change is needed; the report reads the IDoc records. If it uses direct function calls, a small addition writes every incoming message to the log table. This addition usually takes one day and is included in the effort range.

How is the same confirmation prevented from being posted twice?

The unique ID of every MES message is kept in the log table and a posted message cannot be reprocessed. Before reprocessing, the report also checks whether a recent confirmation exists for the same order, operation and quantity and warns the user.

Is it different on S/4HANA?

Confirmation and IDoc structures are the same. In S/4HANA goods movements after confirmation are written to MATDOC, and failed movements still stay in COGI. If MES integration is done with SAP Digital Manufacturing, the report shows the SAP side in addition to that solution's own monitor.

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 Program Custom Mass upload

Mass Production Order Confirmation Upload Program

A custom program that reads operation confirmations (yield, scrap, rework, activity times) coming from MES, shop-floor terminals or Excel at the end …

AFRU · AFKO · AFVC · AFFW

Let us build this report 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: Shop Floor (MES) Confirmation Interface Log and Error Monitor