# Weaving Loom Monitoring (MES) Integration Interface: Confirmations, Downtime and Efficiency

> A custom interface that transfers order start, pick counter and downtime events from the loom monitoring system to SAP production orders automatically. Picks are converted to metres and posted as partial confirmations, stops are recorded with their reason code and long mechanical breakdowns open a maintenance notification; an efficiency rate is calculated for every loom.

- Type: Program, Custom development, Interface
- Module: PP
- Estimated effort: L (12–18 working days)
- Industry: Textile and Apparel
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/weaving-loom-monitoring-mes-confirmation-and-downtime-interface/


## Why is the standard not enough?

CO11N and CO19 take confirmations manually or as time events; they do not convert the pick count from the loom counter into metres, do not classify stops by reason and do not open breakdown notifications. Confirmations typed in at shift end arrive late and downtime is lost. The interface transfers the data from its source, event by event and without duplicates.

### Closest standard alternatives

- CO11N: Takes operation confirmations manually; no loom counter, metre conversion or downtime classification.
- CO19: Takes start and end time events; does not convert picks into metres or open breakdown notifications.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| CRHD | Loom = work center mapping and plant | Read | - | ECC + S/4 |
| AFKO | Order header: release and planned quantity check | Read | AFKO-AUFNR = event order | ECC + S/4 |
| AFVC | Operation and work center match, confirmation number | Read | AFVC-AUFPL = AFKO-AUFPL AND AFVC-ARBID = CRHD-OBJID | ECC + S/4 |
| AFRU | Partial and final confirmations: metres, time, reason for variance | Write | AFRU-AUFNR = AFKO-AUFNR | ECC + S/4 |
| QMEL | Malfunction notification for long mechanical stops | Write | - | ECC + S/4 |
| BALHDR | Interface run and error log | Write | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_PRODORDCONF_CREATE_TT: Posts the summed counter and downtime data as operation confirmations
- BAPI_ALM_NOTIF_CREATE: Opens a maintenance notification on the loom equipment for long breakdowns
- BAPI_TRANSACTION_COMMIT: Commits the work after each order group

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | CRHD-WERKS | Yes |
| P_AGGR | Aggregation: hour / shift | Radio button | - | No |
| P_MINST | Minimum breakdown duration for a notification (min) | Single value | - | No |
| P_NOTIF | Open maintenance notifications for breakdowns | Checkbox | - | No |
| P_TEST | Test mode (check without posting) | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Event ID | Unique number assigned by the monitoring system | No |
| Loom (work center) | CRHD-ARBPL | Yes |
| Plant | CRHD-WERKS | Yes |
| Production order | AFKO-AUFNR | Yes |
| Operation | AFVC-VORNR | No |
| Event type | Start, count, stop, resume or order end | No |
| Date | AFRU-ISDD | Yes |
| Start time | AFRU-ISDZ | Yes |
| End time | AFRU-IEDZ | No |
| Pick count | Increase of the loom counter in the interval | No |
| Metres produced | AFRU-LMNGA | No |
| Stop reason | AFRU-GRUND | No |

## Result list columns

| Column | Source |
|---|---|
| Event ID | Calculated: ID of the incoming event |
| Loom | CRHD-ARBPL |
| Production order | AFRU-AUFNR |
| Operation | AFRU-VORNR |
| Metres confirmed | AFRU-LMNGA |
| Downtime (min) | Calculated: Stop end − stop start |
| Efficiency % | Calculated: Actual picks / (loom speed × minutes) × 100 |
| Confirmation number | AFRU-RUECK |
| Notification | QMEL-QMNUM |
| Status | Calculated: Posted, skipped (duplicate) or error |

## How does the program work?

1. The loom monitoring system sends events per loom (order start, hourly production counter, stop start/end, order end) by RFC, REST service or file. Every event carries a unique event ID; if the same ID arrives again it is skipped.
2. The loom code is mapped to the work center in CRHD (ARBPL, WERKS). The production order and operation in the event are checked in AFKO/AFVC: the order must be released and the operation must be planned on that work center.
3. Counter events are summed per hour or shift. The pick count is converted to metres with the quality's weft density (picks/cm) and posted as a partial confirmation with BAPI_PRODORDCONF_CREATE_TT: the quantity goes to AFRU-LMNGA, the run time to the machine time activity (ISM01), and start and end to ISDD/ISDZ and IEDD/IEDZ.
4. Stop events are classified by reason code (warp break, weft break, beam change, mechanical breakdown, no operator). Duration and reason are carried in the confirmation as the reason for variance (AFRU-GRUND). For mechanical breakdowns longer than the configured minutes, BAPI_ALM_NOTIF_CREATE opens a malfunction notification (QMEL) on the loom equipment.
5. Efficiency = actual picks / (loom speed × total minutes), calculated per loom and shift. Results and errors are written to the application log (BALHDR) and shown on the monitoring screen.
6. On the order end event the final confirmation flag (AFRU-AUERU) is set; if output is short of or above the planned quantity, the planner is informed.

## Authorization objects

- C_AFRU_AWK: Authorization to post confirmations by plant and order type
- I_QMEL: Authorization to create maintenance notifications by notification type

## Frequently asked questions

### Which loom monitoring systems does it work with?

It works with any system that can send events by REST service, RFC or file. During setup the event format and reason codes are mapped to that system; it does not depend on the loom brand.

### Is a confirmation created for every pick?

No. Counter events are summed per hour or shift and one partial confirmation is posted per interval. This keeps the number of confirmations per order reasonable and the production reports readable.

### Does it work on S/4HANA?

Yes. The confirmation and notification BAPIs are used the same way on S/4HANA; the AFRU and QMEL structures have not changed. Events can also be received through SAP Integration Suite.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=pp-loom-mes-integration
