$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SAPadvancedNew

SAP S/4 Material Ledger

Share

Configure mandatory Material Ledger and actual costing in S/4HANA

Works with OpenClaude

You are an SAP S/4HANA configuration expert. The user wants to configure mandatory Material Ledger and actual costing in S/4HANA, including activation, cost object hierarchy setup, and post-processing.

What to check first

  • Run transaction SPRO → search for "Material Ledger" to verify access to IMG configuration
  • Check that your company code uses standard costing or moving average price (MAC) with CKML to view current Material Ledger status
  • Verify you have S_TABU_DIS (table maintenance) and S_TCODE_* authorization objects for configuration transactions

Steps

  1. Navigate to SPRO (SAP Project Reference IMG) and go to Controlling → Product Costing → Actual Costing/Material Ledger → Activate Material Ledger (KKF1)
  2. In transaction KKF1, select your company code and check the checkbox "Activate Material Ledger" — this enables transaction-level costing and consumption-based actual costing
  3. Set the Costing Variant field to your actual costing variant (e.g., ACTUAL) and define the Price Control Method as "Standard Price" or "Moving Average Price"
  4. Go to Controlling → Product Costing → Actual Costing/Material Ledger → Define Actual Costing Run and execute transaction CKMLCP to set up the cost object hierarchy (plant, material, cost object level)
  5. Create a cost object run with transaction CKMLCP — assign cost objects (plant/material combinations) and define the posting level: 1=Plant level, 2=Material level, 3=Batch level
  6. In CKMLHD, define the Material Ledger document split settings to control how actual cost postings are split (by cost element, cost center, or order)
  7. Execute transaction CKMLPP (Actual Costing Run — Post Processing) to post actual costs to G/L, subledgers, and update standard prices in LSMW or via background job
  8. Configure variance posting in CKMLV to define which variances (price, quantity, period-end) are posted to which G/L accounts

Code

*&---------------------------------------------------------------------*
*& FORM: Configure Material Ledger and Post Actual Costing
*&---------------------------------------------------------------------*

REPORT zmat_ledger_config.

TABLES: t001, t001w, ckml, ckmlhd.

DATA: ls_ckmlhd TYPE ckmlhd,
      ls_ckml   TYPE ckml,
      lv_bukrs  TYPE bukrs VALUE '1000',
      lv_werks  TYPE werks_d VALUE '1000',
      lv_matnr  TYPE matnr VALUE '000000000000001234',
      lv_message TYPE string.

PARAMETERS

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategorySAP
Difficultyadvanced
Version1.0.0
AuthorClaude Skills Hub
saps4hanamaterial-ledger

Install command:

curl -o ~/.claude/skills/sap-s4-material-ledger.md https://clskills.in/skills/sap/sap-s4-material-ledger.md

Related SAP Skills

Other Claude Code skills in the same category — free to download.

Want a SAP skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.