Inventory Transaction Prerequisites — The Complete Pre-Flight Checklist
🎯 What this page is
- Layer A — System foundation: set up once per system / company code (account determination, periods, number ranges…). If wrong, nothing posts.
- Layer B — Per-material readiness: done once per material (the four gates) — does this material hold stock here?
- Layer C — Per-transaction runtime: checked each time you post (movement type, stock on hand, open period…).
🧰 The master pre-flight checklist
Scan this before posting in a fresh plant/company code. Each row: what you need, where to check/set it, and the error you get if it's missing. Deep-dive sections follow.
| You need… | Why | Check / set (T-code) | Error if missing |
|---|---|---|---|
| 🏛️ Layer A — System foundation (once per system / company code) | |||
| Company code, plant, storage location, purchasing org — created & assigned | The org skeleton a movement lives in | See Setup Guide / Org Structure | "Plant not defined", org-level errors |
| Valuation level = plant | S/4HANA values stock per plant; account determination keys off it | OX14 | Wrong/again valuation & account errors |
| Chart of accounts assigned + G/L accounts exist (inventory, GR/IR, consumption, price-diff) | Postings need real G/L accounts to hit | FS00, OB62 | "G/L account not created in CC" |
| Automatic account determination maintained (BSX, WRX, GBB, PRD…) | SAP must know which G/L each movement posts to | OBYC → details | M8 147 |
| Valuation grouping code active + assigned to the valuation area | It's part of the OBYC key — blank = no match | OMWM (activate) · OMWD (assign) | M8 147 (blank val.group) |
| Consumption G/L is a primary cost element + has a CO assignment | P&L postings to CO need a cost object | FS00 (G/L type) · OKB9 (default) | KI 235 |
| MM posting period initialized + current period open | Stock postings are blocked outside the open period | OMSY (init) · MMRV (check) · MMPV (roll) → details | M7 053 |
| FI posting period open for the date | The accounting document also needs an open FI period | OB52 | "Posting period … not open" |
| Number ranges: material doc + accounting doc for the year | Each document needs a number to be issued | OMBT (material doc) · FBN1 (accounting doc) → details | "Number range … not maintained" |
| Material Ledger active for the valuation area | Mandatory in S/4HANA — values every material | OMX1 | C+ errors |
| Price/quantity tolerances maintained (for GR/invoice variance) | Variances beyond tolerance block or warn | See Setup Guide tolerance step · Troubleshooting | M8 215 (PE) |
| 📦 Layer B — Per-material readiness (once per material — the four gates) | |||
| Material exists with the right views (Accounting always; Purchasing/MRP as needed) | A movement reads valuation + control data from these views | MM01/MM03 → guide | "View … not maintained" |
| Gate 2: material type quantity + value managed in this plant | Else this type can't hold stock here | OMS2 → details | M7 097 |
| Valuation class set & consistent with the material type | It's the last part of the OBYC key | OMSK (allowed classes) | M8 147 |
| Price control + a valid price (S = standard; V = moving avg) | Value postings need a price; standard price 0 breaks | Accounting 1 view (MM02) | price/valuation errors |
| Gate 4: Material Ledger record exists for this material | S/4HANA links every valuated material to ML | ML_REPAIR_ML_MASTERDATA → details | C+470 |
| Gate 3: material extended to the exact plant + storage location | Stock is counted per storage location | MMSC/MM01 → details | "… does not exist" |
| Batch master (only if the material is batch-managed) | Batch-managed stock posts against a batch | MSC1N | "Enter a batch" |
| ▶️ Layer C — Per-transaction runtime (each time you post) | |||
| Gate 1: correct movement type for the action (309 vs 311…) + same base UoM for 309 | The code defines exactly what stock change happens | MIGO → details · MIGO guide | destination locked / wrong posting |
| Source has unrestricted stock in that storage location (issues/transfers) | You can't issue what isn't there | MMBE/MB52 to check | M7 021 (deficit) |
| Reference document valid & open | 261 needs a released order; GR needs an open PO; reservation must be valid | CO02 / ME23N / MB23 | "not permitted for goods movement" |
| Posting date falls in an open MM + FI period | Same as the period rows above, at posting time | pick a valid date | M7 053 |
🏛️ Layer A — the foundation pieces that cause posting errors
Org structure and G/L accounts are covered in the Setup Guide. Here are the three that most often bite at posting time, explained from scratch.
Automatic account determination — OBYC (the #1 posting-error source)
What: Every goods movement creates an accounting document — but you never type the G/L accounts. SAP looks them up automatically in OBYC using a key: chart of accounts + transaction key + valuation grouping code + account modifier + valuation class. If any combination has no G/L, the posting dies.
The transaction keys you must maintain (for normal MM):
| Key | What it posts | Easy example |
|---|---|---|
| BSX | Inventory / stock account | Iron goes into stock → debit inventory G/L 300000 |
| WRX | GR/IR clearing | GR credits, invoice debits this "goods received, not invoiced" account |
| GBB | Offsetting entry for movements (split by a modifier) | VBR = consumption to cost center/order; BSA = initial stock; INV = inventory differences; VAX/VAY = goods issue for sales |
| PRD | Price differences | Standard-price material received at a different value → the gap posts here |
| also | UMB (revaluation gain/loss), FR1–FR4 (freight), KBS (account-assigned, from the PO) | maintain as your scenarios need them |
How (when you hit M8 147): the error names the exact key + valuation class. OBYC → double-click that transaction key → enter your chart of accounts → fill the G/L for the valuation class shown → Save. Re-post.
Error if missing: M8 147 — "Account determination for entry [chart] [key] [val.group] [modifier] [val.class] not possible."
Posting periods must be open — OMSY · MMRV · MMPV · OB52
What: SAP only lets you post into the current open period (and, if allowed, the one previous). MM and FI track this separately — both must be open for your posting date.
- OMSY — initialize the MM period for a company code. Done once, before the first ever posting. Without it you can't post at all.
- MMRV — check which MM period is currently open (and tick "allow posting to previous period" if you need it).
- MMPV — roll forward: close the current month and open the next. You must go month by month in sequence (can't jump).
- OB52 — open/close the FI posting periods (per account type). A closed FI period blocks the accounting document even when MM is open.
Easy example: it's June but MM is still on April → you get M7 053. Run MMPV for April→May, then May→June, and check OB52 has June open.
Error if missing/closed: M7 053 — "Posting only possible in periods YYYY/MM and YYYY/MM in company code."
Number ranges — OMBT (material doc) · FBN1 (accounting doc)
What: Each goods movement issues a material document, and (when value changes) an accounting document. Both pull their number from a range that must exist for the fiscal year.
- OMBT — material-document number ranges (by transaction/year).
- FBN1 — accounting-document number ranges, per company code; either year-specific or year
9999(= any year). A common "works in 2025, fails in 2026" bug is a missing range for the new year.
Error if missing: "For object … number range … not maintained for the year" — the document can't be created.
📦 Layer B — the four per-material gates (what we hit live)
1 Use the right movement type
What: The movement type (top-right in MIGO, next to Action + Reference) tells SAP exactly what stock change you mean.
311 = move the same material between storage locations — SAP locks the destination to the source. 309 = move to a different material; only then does the destination Material field open.Rule for 309: both materials need the same base unit of measure (e.g. both TO); the material type need not match (ROH→HALB allowed).
On 311 you simply can't enter a different destination material.
2 Make the material type quantity + value managed (OMS2)
What: Each material type (ROH, HALB, FERT…) has Quantity updating and Value updating switches per valuation area (= plant). Off = that type can't hold stock there.
PK01, ROH was on (iron posts) but HALB was off → billets refused.How: OMS2 → material type HALB → Quantity/value updating → valuation area PK01 → tick Qty + Value → Save (Customizing request).
Error if missing: M7 097 "No stock posting possible … not managed on a quantity basis."
3 Extend the material to the plant + storage location (MM01 / MMSC)
What: A material is layered (client → plant → storage location → valuation). Stock is counted at storage-location level, so it must "exist" there.
RAWM = no bucket to post into, even if it exists in WIPS.How: MMSC (quick) → material + plant + new SLoc → Save. Or MM01 → storage views → see create vs extend.
Error if missing: "Material … plant … SLoc … does not exist."
4 Connect the material to the Material Ledger (OMX1 / repair)
What: In S/4HANA the Material Ledger is mandatory — every valuated material needs an ML record. Turning value updating on (Gate 2) for a material that never had one leaves it disconnected.
How: confirm ML active (OMX1, PK01) → SE38 → ML_REPAIR_ML_MASTERDATA (material + valuation area, test then real). Whole new valuation area never started → FCML4H_STARTUP.
Error if missing: C+470 "Missing connection of material … to the material ledger."
✅ The order to do them (so you don't bounce between errors)
- Foundation first (Layer A) — confirm OBYC, valuation grouping (OMWD/OMWM), periods (OMSY/MMPV/OB52), number ranges (OMBT/FBN1), ML active (OMX1). Mostly one-time.
- Gate 2 — OMS2: switch on Qty + Value updating for the material type in the plant.
- Gate 4 — ML repair: because you just enabled value updating, run
ML_REPAIR_ML_MASTERDATA. - Gate 3 — MMSC: extend the material to the exact storage location.
- Confirm the source has unrestricted stock; pick a posting date in the open period.
- Gate 1 — MIGO: pick the correct movement type and post.
🚨 Error → cause → fix (quick lookup)
| Error | What it really means | Fix |
|---|---|---|
| M8 147 | No G/L mapped for this account-determination key | OBYC → maintain the named key + valuation class (check OMWD grouping) |
| M7 053 | Posting date outside the open MM/FI period | MMRV to check, MMPV to roll, OB52 for FI |
| M7 097 | Material type not quantity-managed in this plant | OMS2 → tick Qty + Value updating (Gate 2) |
| C+470 | Valuated material has no Material Ledger record | ML_REPAIR_ML_MASTERDATA (Gate 4) |
| "… does not exist" | Material not extended to that storage location | MMSC / MM01 (Gate 3) |
| M7 021 | Deficit — not enough unrestricted stock to issue/transfer | Check stock (MMBE); receive or pick a SLoc that has it |
| KI 235 | P&L (cost element) posted without a CO object | Give a cost center/order, or set a default in OKB9 |
| "Number range … not maintained" | No document number range for the fiscal year | FBN1 (accounting) / OMBT (material) |
| Can't change destination material (309) | On movement 311, or different base UoM | Switch to 309; ensure both share the base UoM (Gate 1) |
💡 A note on the example we used
309 to learn these gates — but that's not how iron really becomes a billet. In real life iron is consumed into a production order (movement 261) and the billet comes back as a goods receipt (movement 101). 309 is for like-for-like reclassification (e.g. iron Grade-A → iron Grade-B) — so the cleanest practice is RM-IRON-01 → RM-IRON-02 (both ROH, both TO), which is already past every gate. The HALB gate-fixing is still worth it — you need it for the production goods receipt (101).
📚 Verified against
- SAP KBA 1852100 & ERPSCM Wiki — M8 147 account determination (OBYC keys BSX/WRX/GBB/PRD)
- SAP Community / SAP KBA 2622589 — M7 053 posting periods (OMSY / MMRV / MMPV / OB52)
- SAP ERPSCM Wiki — valuation level (OX14), valuation grouping code (OMWM / OMWD)
- SAP-TCodes / SAP Community — number ranges FBN1 (accounting) & OMBT (material doc)