# Production Order Target vs Actual Cost Variance Report

> A custom ALV report that compares the actual cost of production orders in a plant with the target cost from delivered quantity × standard price, and ranks the variance by amount and percentage. It gives an early warning before the variance calculation and settlement.

- Type: Report, Custom development, ALV report
- Module: CO
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/production-order-cost-variance-report/


## Why is the standard not enough?

KKBC_ORD analyzes costs per order and orders are opened one by one. KOB1 lists actual line items but gives no target cost or variance. The period-end variance calculation results are per order and do not offer a list that ranks all orders of a plant by variance size with material description and yield.

### Closest standard alternatives

- KKBC_ORD: Analyzes costs per order; gives no ranking across the plant.
- KOB1: Lists the order's actual line items; gives no target cost or variance.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| AFPO | Production order item: material, plant, planned and delivered quantity (driving table) | Read | - | ECC + S/4 |
| AFKO | Production order header and MRP controller | Read | AFKO-AUFNR = AFPO-AUFNR | ECC + S/4 |
| AUFK | Order object number and controlling area | Read | AUFK-AUFNR = AFPO-AUFNR | ECC + S/4 |
| COSP | Primary actual costs and goods receipt credits | Read | COSP-OBJNR = AUFK-OBJNR | ECC + S/4 |
| COSS | Secondary actual costs (activities, overhead) | Read | COSS-OBJNR = AUFK-OBJNR | ECC + S/4 |
| MBEW | Standard price and price unit | Read | MBEW-MATNR = AFPO-MATNR AND MBEW-BWKEY = AFPO-PWERK | ECC + S/4 |
| MAKT | Material description | Read | MAKT-MATNR = AFPO-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
| JEST | System status (REL, DLV, TECO) | Read | JEST-OBJNR = AUFK-OBJNR | ECC + S/4 |
| TKA01 | Controlling area currency | Read | TKA01-KOKRS = AUFK-KOKRS | ECC + S/4 |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | AFPO-PWERK | Yes |
| S_AUFNR | Production order | Range / multiple | AFPO-AUFNR | No |
| S_MATNR | Material | Range / multiple | AFPO-MATNR | No |
| S_DISPO | MRP controller | Range / multiple | AFKO-DISPO | No |
| P_GJAHR | Fiscal year | Single value | COSS-GJAHR | Yes |
| P_PERIO | Up to period | Single value | - | Yes |
| P_ONLYDL | Only delivered / technically complete orders | Checkbox | - | No |
| P_TOL | Variance tolerance (%) | Single value | - | No |

## Output columns

| Column | Source |
|---|---|
| Order | AFPO-AUFNR |
| Plant | AFPO-PWERK |
| Material | AFPO-MATNR |
| Material description | MAKT-MAKTX |
| Planned quantity | AFPO-PSMNG |
| Delivered quantity | AFPO-WEMNG |
| Unit | AFPO-MEINS |
| Target cost | Calculated: AFPO-WEMNG × MBEW-STPRS / MBEW-PEINH |
| Actual cost | Calculated: COSP + COSS value type 04 debits (settlement excluded) |
| Goods receipt credit | Calculated: COSP + COSS value type 04 credits (BEKNZ = H) |
| Variance | Calculated: Actual cost − target cost |
| Variance (%) | Calculated: Variance / target cost × 100 |
| System status | Calculated: Short text of the active system statuses in JEST |
| Currency | TKA01-WAERS |

## How does the report work?

1. Production order items matching the plant (PWERK) and material selection are read from AFPO, the MRP controller from AFKO and the object number from AUFK; the system status comes from JEST. With P_ONLYDL only delivered (DLV) or technically complete (TECO) orders are listed.
2. Actual cost: value type 04 debits in COSP and COSS from the start of the fiscal year up to P_PERIO; goods receipt credits are summed separately by the debit/credit indicator (BEKNZ) and settlement lines are excluded. The report therefore gives the same result before and after settlement.
3. Target cost (simplified) = delivered quantity (AFPO-WEMNG) × MBEW-STPRS / MBEW-PEINH.
4. Variance = actual cost − target cost; variance % = variance / target cost × 100. For yield, the delivered quantity is compared with the planned quantity (PSMNG).
5. Orders above P_TOL are put first and sorted by the absolute variance.

## Authorization objects

- C_AFKO_AWK: Production order authorization by plant and order type

## Frequently asked questions

### Why can the result differ from the period-end variance calculation?

The report simplifies the target cost as delivered quantity × standard price. The period-end variance calculation uses the target cost version, work in process and variance categories. The report is for early warning; for exact variance categories, the variance calculation results can be added to the report.

### Are scrap and yield losses visible?

The ratio of delivered to planned quantity can be shown as yield. Confirmed scrap quantities can be read from the operation confirmations and added as a separate column.

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

Yes. AFKO, AFPO and JEST are used the same way; COSP, COSS and MBEW are read as compatibility views and actuals come from ACDOCA.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=co-production-order-variance
