logo

Are you need IT Support Engineer? Free Consultant

Automatic Account Determination in Actual Costing:…

  • By Sanjay
  • 08/06/2026
  • 26 Views


This blog tries to answer the following questions in Actual Costing in SAP S/4HANA Cloud Public Edition:

Introduction

In my introductory blog on Actual Costing, I walked through a complete end-to-end example to show how price variances from raw material procurement and production are collected, rolled up, and allocated to COGS and ending inventory at period end. The Post Closing step in CKMLCP posts journal entries using transaction keys such as PRYKDM, and BSX.

This blog goes deeper into those transaction keys, i.e. what each one means, how the “Revaluate Material” checkbox changes the posting behavior, and most importantly, how the General Modification feature of PRY and KDM lets you differentiate postings by process type. This is a powerful tool for you if you need granular P&L reporting on where price differences end up.

Transaction Keys Used in Actual Costing Closing Entries

When CKMLCP (Edit Actual Costing Runs) runs the Post Closing step, it posts journal entries using these transaction keys. You assign G/L accounts to them in SSCUI 100297 (Automatic Account Determination). The bold ones are specific to Actual Costing.

Transaction Key

What It Posts

BSX

Inventory account revaluation (stock at actual cost)

PRY

Price differences (the key Actual Costing transaction key)

KDM

Exchange rate differences on inventory

PRL

Activity price differences (from cost center to material)

GBB-AUI

Activity price difference credited to cost center

WPM

Price difference of material WIP build-up

PRM

Price difference of material WIP reduction

WPA

Price difference of activity WIP build-up

PRA

Price difference of activity WIP reduction

LKW

Accruals and deferrals (statistical, when not revaluating inventory)

COC

Revaluation of other consumption (when movement type group not in ML config)

UMB

Revenue/expense from revaluation (e.g., MR22, CKMLCP Post Closing)

In the introductory blog example, you could see PRY, KDM, BSX, and GBB all appearing in the same journal entry 4700000297. This blog explains how each of those postings is determined.

The “Revaluate Material” Checkbox — BSX vs. LKW

When you run the Post Closing step in CKMLCP, one of the key parameters is “Revaluate Material”.

When selected (default behavior):
The system posts a real inventory revaluation. The inventory account (BSX) is debited. The price difference account (PRY) is credited.

  • Debit   BSX – Inventory account          +160.00 EUR  (stock revalued to actual cost)
  • Credit  PRY – Price differences          -160.00 EUR

When unselected:
The system uses a statistical posting instead. The inventory balance stays at standard price.

  • Debit   LKW – Accruals/Deferrals         +160.00 EUR   (statistical; no inventory impact)
  • Credit  PRY – Price differences          -160.00 EUR

The LKW option is used by customers who do not want to touch the inventory balance sheet account but still want price differences visible in P&L for analytical purposes.

General Modifications for PRY and KDM — Differentiate by Process

By default, all price differences land on the single G/L account assigned to PRY. Many customers want more analytical details:

  • How much of our price differences stayed in inventory vs. flowed to downstream products?
  • How much relates to WIP that we couldn't yet settle?
  • Which P&L account should capture differences from direct cost center consumption?

This is exactly what General Modification solves. By enabling it in SSCUI 100297, you can route each posting type to a different G/L account.

The Five General Modifications

General Modification

Label

Meaning

Posted on

PNL

Next Level

Price diff transferred to a higher-level material via multi-level rollup

The input (lower-level) material

PPL

Previous Level

Price difference received from a lower-level material

The output (higher-level) material

PSL

Single Level

Price diff from single-level consumption revaluation (cost centers, sales orders)

The consumed material

PWP

WIP

Price diff in WIP revaluation (open production orders at period end)

The material with open WIP

(empty)

Ending Inventory

Price diff remaining in ending inventory

The same material

Key relationship between PNL and PPL: They are always mirror entries for the same amount: one material “sends” via PNL, the other “receives” via PPL. Across all materials in scope, PNL and PPL net to zero.

The same five sub-modifications apply identically to KDM: KDM-PNL, KDM-PPL, KDM-PSL, KDM-PWP, KDM-empty.

You can refer to below configuration screenshots in SSCUI 100297, which is also used for our example in next section:

  • PRY with general modifications per valuation class:

Figure 1: Pry ConfigurationFigure 1: PRY Configuration

 

  • KDM with general modifications shared by all valuation classes:

Figure 2: Kdm ConfigurationFigure 2: KDM Configuration

Example: SG124_MA06 and FG126_MA06

The following example uses data from SAP internal test system. SG124_MA06 is a semi-finished material (Plant 1010, Period 2/2026) consumed as input to produce three different finished goods:

Input Material

 

Output Material

Qty Consumed

SG124_MA06 (Semi-finished)

FG126_MA06

772 PC

SG124_MA06 (Semi-finished)

FG228_BB6_MA06

10 PC

SG124_MA06 (Semi-finished)

FG0612_MA06-1

10 PC

The following picture from Material Price Analysis (CKM3N) shows above consumption clearly:

Figure 3: Sg124_Ma06 Aggregated ConsumptionFigure 3: SG124_MA06 Aggregated Consumption

 SG124_MA06 — Where Differences Originate

During the period, SG124_MA06 cumulates an inventory of 1485 PC with total price differences of 135.93 EUR (PRY) and exchange rate differences of 60.07 EUR (KDM).

After expanding folder of each produced product in CKM3N (Material Price Analysis) as above, under the Consumption section:

  • The cumulative quantity of 792 PC is broken down into individual finished goods
  • The PriceDiff column shows how the total price difference of 135.93 EUR (PRY) is distributed into finished goods (2.57, 70.70, 2.56 EUR respectively — all via PRY-PNL, G/L 52041500).
  • The ExRateDiff column shows how the total exchange rate difference of 60.07 EUR (KDM) is distributed into finished goods (0.40, 31.23, 0.41 EUR respectively — all via KDM-PNL, G/L 72020000)
  • The WIP row shows 1.73 EUR via PRY-PWP, and ending inventory shows 58.37 EUR via PRY-empty. 

Figure 4: Sg124_Ma06 Consumption ExpandedFigure 4: SG124_MA06 Consumption Expanded

 

Destination

Quantity

PRY Share (EUR)

KDM Share (EUR)

Modification

Production → FG126_MA06

772 PC

70.70

31.23

PNL

Production → FG228_BB6_MA06

10 PC

2.56

0.41

PNL

Production → FG0612_MA06-1

10 PC

2.57

0.40

PNL

WIP (open production order 1012505)

20 PC

1.73

0.81

PWP

Ending inventory

673 PC

58.37

27.22

(empty)

Total cumulative

1485 PC

135.93

60.07

 

How This Looks in CKM3 — FG126_MA06

Figure 5: Fg126_Ma06Figure 5: FG126_MA06

In CKM3N (Material Price Analysis) for FG126_MA06, the 70.70 EUR (PRY-PPL) and 31.23 EUR (KDM-PPL) from SG124_MA06 appear under Receipts → Production → SG124_MA06/1010. The 70.70 EUR on SG124_MA06 (PNL → G/L 52041500) and the 70.70 EUR on FG126_MA06 (PPL → G/L 52042000) are mirror entries for the same amount.

FI Journal Entry — Post Closing for SG124_MA06

The journal entry posted by CKMLCP (document 4700000297, ML Post Closing, 28.02.2026) contains the following key lines. Each uses a different G/L account from SSCUI 100297:

Figure 6: Closing Journal Entries From CkmlcpFigure 6: Closing Journal Entries from CKMLCP

 Journal Entry 4700000297: ML Post Closing — SG124_MA06 — Period 2/2026

Ln

G/L Account

Account Name

Key

Mod.

Debit (EUR)

Credit (EUR)

Remark

021

13300000

Inventory Semi Fin

BSX

 

85.59

 

Inventory revalued to actual

022

52543000

Gain Prc dif (PRY)

PRY

empty

 

216.13

Price diff — ending inventory

023

72510000

Gain exch.rate diff

KDM

empty

 

27.22

Exch.rate diff — ending inventory

024

52033000

Loss Val own prd

UMB

 

157.76

 

Revaluation offset

025

52041500

Loss Inv Val Adj Ext

PRY

PNL

 

70.70

SG124 sends to FG126 — Credit: diff leaves sender

026

72020000

Loss rnd.dif.f.curr

KDM

PNL

 

31.23

SG124 sends to FG126

027

52042000

Loss Prc dif (PRL)

PRY

PPL

70.70

 

FG126 receives — Debit: diff arrives at receiver

028

72040000

Loss curr.val.

KDM

PPL

31.23

 

FG126 receives

029

52041500

Loss Inv Val Adj Ext

PRY

PNL

 

2.56

SG124 sends to FG228

031

52042000

Loss Prc dif (PRL)

PRY

PPL

2.56

 

FG228 receives

033

52041500

Loss Inv Val Adj Ext

PRY

PNL

 

2.57

SG124 sends to FG0612

035

52042000

Loss Prc dif (PRL)

PRY

PPL

2.57

 

FG0612 receives

037

13200000

Inventory WIP

WPM

 

2.54

 

WIP build-up revalued

038

52046000

Loss Price diff fm l

PRY

PWP

 

1.73

WIP price diff — Credit: stays as WIP

039

72050100

Relz FX Loss NCsld

KDM

PWP

 

0.81

WIP exch.rate diff

The posting direction follows a consistent pattern: on the sending material (SG124_MA06), PRY-PNL is a Credit — the price difference

The posting direction follows a consistent pattern: on the sending material (SG124_MA06), PRY-PNL is a Credit — the price difference is “leaving” via multilevel rollup. On the receiving finished goods, PRY-PPL is a Debit — the same amount is “arriving”. WIP (PWP) and ending inventory (empty) are also Credits on SG124, representing differences that stay rather than flow onwards.

How to Configure General Modifications in SSCUI 100297

  1. Open SSCUI 100297 — Automatic Account Determination
  2. Select area Sourcing and Procurement
  3. Specify transaction key PRY (or KDM), company code / chart of accounts
  4. In the Account Assignments section, click Edit Rules
  5. Enable the checkbox General Modification (optionally also Valuation Class for per-material-type differentiation)
  6. Add one row per sub-modification and assign your desired G/L account numbers

As shown in the SSCUI screenshots in the beginning, the example configuration has PRY with both General Modification and Valuation Class (3000 Raw Materials, 7900 Semifinished, 7920 Finished Goods), while KDM has no valuation class differentiation. 

Transaction Key

General Modification

Valuation Class

G/L Account

PRY

(empty)

3000 / 7900 / 7920

52043000

PRY

PNL

3000 / 7900 / 7920

52041500

PRY

PPL

3000 / 7900 / 7920

52042000

PRY

PSL

3000 / 7900 / 7920

52045000

PRY

PWP

3000 / 7900 / 7920

52046000

KDM

(empty)

72010000

KDM

PNL

72020000

KDM

PPL

72040000

KDM

PSL

72050000

KDM

PWP

72050100

Tip: If you don't need per-process differentiation, simply assign one account to PRY and one to KDM without any General Modification; the system uses them as a catch-all for all sub-modification types.

Why Does This Matter for Margin Analysis?

  1. Multi-level cost flow transparency: Of the total 135.93 EUR in SG124_MA06, exactly 75.83 EUR flowed to the three finished goods via account 52041500 (PNL). G/L 52042000 (PPL) on the receiving materials shows the same gross amount — enabling BOM cost tracing in your trial balance.
  2. WIP monitoring: Account 52046000 (PWP) isolates the 1.73 EUR locked in open production order 1012505 at period end. It will only be released when the order settles next period.
  3. PNL/PPL netting: The 70.70 EUR on SG124_MA06 (PNL, 52041500) and on FG126_MA06 (PPL, 52042000) net to zero across both materials — but on separate accounts, enabling gross BOM cost flow reporting.
  4. CO-PA integration: With General Modification, PSL on COGS uses G/L 52045000, enabling PA reports to distinguish “direct consumption variance” from “multilevel rollup variance” at product/customer level.

Summary

Topic

Key Points

Inventory revaluation account

BSX (real) or LKW (statistical): controlled by “Revaluate Material” checkbox

Price / exchange rate difference accounts

PRY for price diffs, KDM for exchange rate difference

Available general modifications

PNL (next level), PPL (from lower), PSL (single-level), PWP (WIP), empty (ending inventory)

PNL + PPL net to zero

Yes — always mirror entries for the same amount across the two materials

Where to configure

SSCUI 100297 → Edit Rules → Enable General Modification

Further differentiate by material type

Yes — additionally enable Valuation Class

General Modification mandatory

No — optional; without it all PRY/KDM use one catch-all account

Related Resources



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *