# Production Order Missing Parts with Covering Purchase Order Report

> A custom ALV report that shows the missing components of production orders, the shortage quantity and the open purchase order that will cover it, with vendor and delivery date, on the same line. Planners see which order waits for which component, and for how many days, without switching to MD04.

- Type: Report, Custom development, ALV report
- Module: PP
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/production-order-missing-parts-with-open-purchase-order-report/


## Why is the standard not enough?

The CO24 missing parts info system and the COOIS component view list missing components, but they do not put the open purchase order that will cover the shortage, its vendor and its delivery date on the same line. Planners open MD04 for every component and look for the open order one by one. Stock is also not allocated by requirement date across several orders that need the same component, so every order seems able to use the whole stock. The custom report combines these three steps in one run.

### Closest standard alternatives

- CO24: Lists missing components; the covering purchase order, vendor and delivery date are not on the same line.
- MD04: Shows open orders per material, but it has to be opened separately for every component.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| RESB | Order components, requirement date, required and withdrawn quantity (driving table) | Read | - | ECC + S/4 |
| AFKO | Header material, planned start, MRP controller and production supervisor | Read | AFKO-AUFNR = RESB-AUFNR | ECC + S/4 |
| JEST | Order system status; TECO and deleted orders are excluded | Read | JEST-OBJNR = 'OR' + RESB-AUFNR | ECC + S/4 |
| MARD | Unrestricted-use stock of the component | Read | MARD-MATNR = RESB-MATNR AND MARD-WERKS = RESB-WERKS | ECC + S/4 |
| EKPO | Open purchase order items for the same material and plant | Read | EKPO-MATNR = RESB-MATNR AND EKPO-WERKS = RESB-WERKS | ECC + S/4 |
| EKET | Delivery date, scheduled and received quantity | Read | EKET-EBELN = EKPO-EBELN AND EKET-EBELP = EKPO-EBELP | ECC + S/4 |
| EKKO | Vendor of the purchase order | Read | EKKO-EBELN = EKPO-EBELN | ECC + S/4 |
| LFA1 | Vendor name | Read | LFA1-LIFNR = EKKO-LIFNR | ECC + S/4 |
| MAKT | Component description (logon language) | Read | MAKT-MATNR = RESB-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | RESB-WERKS | Yes |
| S_AUFNR | Production order | Range / multiple | RESB-AUFNR | No |
| S_DISPO | MRP controller | Range / multiple | AFKO-DISPO | No |
| S_FEVOR | Production supervisor | Range / multiple | AFKO-FEVOR | No |
| S_MATNR | Component | Range / multiple | RESB-MATNR | No |
| S_BDTER | Requirement date range | Range / multiple | RESB-BDTER | Yes |
| P_LGORT | Count stock only in the component's storage location | Checkbox | - | No |
| P_ONLYSH | Missing components only | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| Production order | RESB-AUFNR |
| Header material | AFKO-PLNBEZ |
| Order start | AFKO-GSTRP |
| Component | RESB-MATNR |
| Component description | MAKT-MAKTX |
| Requirement date | RESB-BDTER |
| Open requirement | Calculated: RESB-BDMNG − RESB-ENMNG |
| Unit | RESB-MEINS |
| Allocated stock | Calculated: From MARD-LABST, the quantity left for this line after earlier requirements |
| Shortage | Calculated: Open requirement − allocated stock |
| Covering purchase order | EKET-EBELN |
| Vendor name | LFA1-NAME1 |
| Delivery date | EKET-EINDT |
| Coverage gap (days) | Calculated: EKET-EINDT − RESB-BDTER (positive: the order waits) |

## How does the report work?

1. Production order reservations (AUFNR filled) are read from RESB with the plant and requirement date range on the selection screen; deleted items (XLOEK), items with final issue (KZEAR) and bulk materials (SCHGT) are skipped.
2. Header material (PLNBEZ), planned start (GSTRP), MRP controller (DISPO) and production supervisor (FEVOR) are added from AFKO; orders with TECO (I0045) or the deletion flag (I0076) active in JEST are skipped.
3. Open requirement = RESB-BDMNG − RESB-ENMNG.
4. Available stock is read from MARD-LABST (plant total or, by selection, the component's storage location). Requirements are sorted by requirement date (BDTER) and consumed from stock in turn, so orders that need the same component share the stock first come, first served. Shortage = open requirement − remaining stock (at least zero).
5. For components with a shortage, open schedule lines of the same material and plant are read from EKPO and EKET (EKET-MENGE − EKET-WEMNG > 0; EKPO-LOEKZ and EKPO-ELIKZ blank) by delivery date. The first line that covers the shortage cumulatively becomes the covering order; the vendor name comes from LFA1 through EKKO-LIFNR.
6. Coverage gap = EKET-EINDT − RESB-BDTER. A positive value shows how many days the order will wait for the component. Lines without a covering order are flagged separately.

## Authorization objects

- C_AFKO_AWK: Display production orders by plant and order type
- M_BEST_WRK: Display purchase orders by plant

## Frequently asked questions

### How is stock shared between several orders?

Reservations for the same component are sorted by requirement date and unrestricted stock is consumed in that order. The order that starts first gets the stock first, so the shortage of later orders is shown correctly.

### Can purchase requisitions also be shown as covering documents?

Yes. Optionally, open purchase requisitions (EBAN) are evaluated as a second priority and the requisition number is shown in a separate column. This extension adds about one day to the effort range.

### Does this report work on S/4HANA?

Yes. RESB, AFKO, EKPO and EKET keep the same structure in S/4HANA; reading MARD is served from material documents through a compatibility view. For a clean core approach, released CDS views for production order components can be used.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=pp-missing-parts-with-covering-po
