Production Order Variance Calculation KKS1 — Fixing KV031 and KV011, and What Lands in COSB

In the last post on cost center variance calculation (KSS1) I noted that the similarly-named KKS1 is a different animal. This is that post: production order variance calculation. I hit two errors on the way in, so we start with their causes and fixes, then verify — by comparing the database before and after — exactly what gets stored where. Environment: controlling area JNC2, plant JNC2, period 2026/008, KRW, three production orders.

※ Screens, menus, and settings may differ depending on your SAP release and system configuration.

Two errors before it would even run

KV031 ("no target cost version") — version 0 itself existed. What was empty was the variance variant for orders (AWVAO) in OKV6: only the cost-center one (AWVAS) was maintained, which is why KSS1 worked fine while KKS1 refused. Same OKV6 screen, different column.

KV011 is an order status problem. Order 1004916 got its goods receipt and final delivery on August 2 — run KKS1 for period 007 and, as of that period, the order counts as incomplete. Running with period 008 resolves it.

The run and its first artifact: target costs

Two of the three orders showed variances, totalling 6,000 (Variance = actual costs − allocated actual costs; order 1004916 came out 0 because actuals equalled the GR amount).

First thing saved: target costs — new WRTTP 05 lines in COSP and COSS that didn't exist before the run. This is exactly where KKS1 parts ways with KSS1: cost center variance calculation updates only COSB and stores no target costs, while KKS1 persists per-order target costs matching the Target Costs column on screen.

The second artifact: variances in COSB

Two COSB lines with WRTTP 31 / VRGNG KVAR appeared. Plan and actual lines are untouched; no CO document, no FI posting — variance calculation itself creates no documents, same as KSS1.

Tracing where the 6,000 came from: in the preceding KSII step the machine activity's actual price exceeded the standard, that revaluation amount (business transaction RKLN) hit the orders as a debit, and it carried straight through as an input price variance. The RKLN amounts in COSS actuals match the COSB variance amounts order by order. No material-side variance this time.

Does the closing sequence even need KKS1? (this data set says…)

A slightly surprising comparison: all three orders had zero balance (already offset by the revaluation credit), so the settlement amounts are identical with or without KKS1. What actually differs is whether the 6,000 of variance-cause information exists in COSB — i.e., whether settlement can pass variance categories on to CO-PA.

Wrap-up

  • KKS1 differs from KSS1 in two ways: it stores target costs in COSP/COSS, and it feeds settlement (KO88/CO88), which can carry variances by category into FI and CO-PA.
  • What's the same: KKS1 by itself posts nothing to FI. Closing numbers are moved by settlement, not by variance calculation.
  • If the run won't start, check three things first: the order variance variant in OKV6 (AWVAO), the order status (DLV or TECO), and the execution period.
  • Browsing COSB directly: the object key for orders is OR + order number.

Korean original (with screenshots): SAP 생산오더 차이계산 KKS1 — KV031·KV011 해결과 COSB 저장 결과

Where these documents come from
Everything on this blog comes from one small dumpling factory built end-to-end in an S/4HANA sandbox — one plant, one product, one month, every document number real. The whole build is written up in two books.
· Free 16-page sample — the opening chapters, no email required
· How Sarah Joined a K-Dumpling Company and Became an SAP Genius — the business novel, 53 pages, $25
· The Dumpling Factory: Building a Complete SAP S/4HANA Company from Scratch — the build manual, 85 pages, $50

Comments

Popular posts from this blog

Modern ABAP Syntax Notes — Patterns and Pitfalls from Real Development

SAP S/4HANA Table Reference — Tables I Actually Query, by Topic

A 36% margin became 6% at month-end, and every posting was correct