SAP MM–FI integration guide
Automatic account determination converts a logistics event into the correct financial posting. It explains why a goods receipt debits inventory, why GR/IR is credited, where a consumption issue posts and how price differences reach a separate G/L account without a user manually selecting every account.
What is automatic account determination in SAP MM?
SAP MM automatic account determination is the configuration that selects G/L accounts for accounting-relevant inventory management and invoice verification transactions. When a user posts a goods movement or supplier invoice, the business transaction, organisational context and material valuation data combine to determine the required debit and credit accounts.
This design keeps warehouse users from choosing inventory or offsetting accounts manually for routine movements. It also makes postings repeatable: the same approved combination should produce the same financial result. The common on-premise configuration transaction is OBYC, while SAP S/4HANA Cloud uses configuration activities and apps appropriate to that edition.
Account determination does not replace explicit account assignment. A purchase for a cost center, asset, order or project still needs the relevant cost object. Automatic logic determines standard inventory, GR/IR, consumption, price-difference and related accounts around that business context.
How SAP MM determines the G/L account
A useful troubleshooting model follows six questions in order:
- Which application event occurred? Goods receipt, goods issue, transfer, invoice receipt and price difference do not use the same posting logic.
- Which value string and transaction keys apply? SAP derives predefined transaction/event keys from the movement or invoice process.
- Which chart of accounts is relevant? The company code points to the chart in which the G/L account must exist.
- Which valuation grouping code applies? Valuation areas can be grouped so plants with the same account design share settings.
- Which valuation class applies? The material’s accounting data categorises it for account determination, such as raw materials versus trading goods.
- Is an account modifier needed? For keys such as GBB, a general modification distinguishes consumption, scrap, inventory differences and other offsets.
The result is not chosen by one field alone. A correct valuation class with a missing account for the relevant chart and transaction key still fails. Likewise, assigning a G/L to BSX does not solve an error that actually belongs to GBB with an account modifier.
Core influencing factors
| Factor | What it represents | Typical diagnostic source |
|---|---|---|
| Chart of accounts | The financial account catalogue used by the company code | Company-code configuration |
| Transaction/event key | The posting purpose derived from the logistics transaction | Movement or invoice value string |
| Valuation grouping code | A grouping of valuation areas with common account settings | Valuation-area configuration |
| Valuation class | The material category used for G/L differentiation | Accounting view of material master |
| General modification | A more specific reason under a key such as GBB | Movement-type/account grouping logic |
Important SAP MM transaction keys
BSX: inventory posting
BSX is used for stock postings. In a valuated goods receipt for a stock material, it identifies the inventory account associated with the material’s valuation class. Different valuation classes allow raw materials, finished goods and trading goods to reach different inventory accounts within the approved design.
WRX: GR/IR clearing
WRX identifies the goods receipt/invoice receipt clearing account. At goods receipt, it commonly offsets the inventory debit. At invoice receipt, the GR/IR position is cleared against the supplier liability, subject to quantity, price and process differences. The SAP MM GR/IR reconciliation guide explains how open balances arise and should be investigated.
GBB: offsetting entry for inventory posting
GBB supports several offsets to inventory. The general modification narrows the business reason—for example, a goods issue to a cost center, scrap, or an inventory difference. Because GBB covers multiple scenarios, diagnosis must include the movement type and modification rather than stopping at the transaction key.
PRD: price differences
PRD is used when the process creates a price difference that cannot remain in the material’s inventory value under the applicable price-control and stock conditions. A standard-price material purchased at a different price is a common learning example, but the exact posting result depends on the full transaction and valuation context.
Other keys
Freight, exchange-rate differences, consignment payables and other events use additional transaction keys. Learn them through an actual posting case instead of memorising a long list. The key question is always: which business event created this accounting line, and which data combination selected the account?
Posting examples
Valuated goods receipt for a stock material
A plant receives a stock material against a PO. The material is valuated and has a valid valuation class. A simplified posting is:
- Debit inventory account determined through BSX and the material valuation context.
- Credit GR/IR clearing determined through WRX.
The material document proves the quantity movement, while the accounting document proves the value movement. Use the SAP MM goods receipt guide to connect both records.
Invoice receipt after goods receipt
When the accepted supplier invoice is posted, a simplified result debits GR/IR and credits the supplier reconciliation account. Price or exchange-rate differences may add other lines. The supplier account is controlled through FI master data and reconciliation-account logic; it is not simply another OBYC inventory assignment.
Goods issue to a cost center
A consumption movement credits the inventory account and debits a consumption expense account. BSX identifies the stock side; GBB with the relevant general modification and valuation class identifies the offset. The cost center supplies the management-accounting responsibility for that expense.
Consignment withdrawal
Supplier consignment stock is non-valuated at receipt because the supplier retains ownership. A withdrawal or transfer to own stock creates the liability and relevant accounting consequence. Read the SAP MM consignment process guide for the full ownership and settlement flow.
How to troubleshoot automatic account determination
Do not guess a G/L from the error message and insert it into every blank configuration field. Reconstruct the failed posting.
- Record the company code, plant, material, movement type or invoice transaction, quantity and posting date.
- Confirm whether the item is valuated stock or account-assigned consumption.
- Inspect the material’s valuation class and price-control data for the relevant plant or valuation area.
- Identify the transaction key and, where relevant, the general modification produced by the process.
- Confirm the chart of accounts and valuation grouping code.
- Use the account-determination simulation where available to see the combinations the system is evaluating.
- Validate that the proposed G/L exists, is permitted for automatic posting and has compatible field-status requirements.
- Retest the original business case and inspect the complete accounting document, not only whether the error disappeared.
Frequent errors and root causes
| Symptom | Possible root cause | Correct diagnostic direction |
|---|---|---|
| Account cannot be determined for BSX | Missing combination for valuation class and valuation grouping | Check material valuation class, chart and BSX assignment. |
| Consumption issue fails under GBB | Account modifier or consumption account is missing | Trace movement type to the relevant GBB modification. |
| Account is found but posting still fails | G/L master or field-status incompatibility | Check automatic-posting flag, account status and required fields. |
| Unexpected price-difference line appears | Standard price, PO/invoice variance or stock coverage | Review price control, document prices and PRD logic. |
| One plant works while another fails | Different valuation grouping or company-code chart context | Compare valuation-area and chart assignments before copying accounts. |
Design and governance principles
- Use valuation classes that reflect meaningful financial reporting categories.
- Restrict which valuation classes are allowed for each material type through account category references.
- Group valuation areas only when they genuinely share the same account design.
- Test goods receipt, invoice receipt, consumption, scrap, transfer and reversal—not only the happy path.
- Document every change with the business event, expected debit and credit, affected organisations and regression cases.
- Coordinate changes between MM and FI owners because a logistics correction can alter financial statements.
Automatic account determination also matters in cross-plant replenishment. The SAP MM stock transport order guide explains how the accounting scope changes when plants are within one company code or across company codes.
Practice scenario
Create two materials: a raw material and a trading good, each with an appropriate valuation class. Post a valuated PO receipt for both and explain why BSX selects different inventory accounts while WRX uses the clearing design. Issue the raw material to a cost center and trace the GBB modification. Then introduce a standard-price variance, simulate the expected PRD line, reverse the test postings and confirm that each reversal reaches the original accounts.
Frequently asked questions
What is OBYC in SAP MM?
OBYC is the traditional SAP GUI transaction used in on-premise systems to configure automatic postings for MM inventory management and invoice verification events. SAP S/4HANA Cloud uses corresponding configuration activities rather than relying on the same transaction experience.
What is the difference between valuation class and account category reference?
The valuation class helps select G/L accounts for a material. The account category reference controls which valuation classes are permitted for a material type, helping prevent inconsistent assignments.
Why are BSX and WRX both used at goods receipt?
For a typical valuated PO receipt, BSX represents the inventory posting and WRX represents the offset to GR/IR clearing. The later supplier invoice clears GR/IR and records the liability, subject to any variances.
Can users manually choose the inventory G/L during goods receipt?
Routine inventory postings are designed to use automatic account determination. Allowing ad hoc account selection would undermine consistency and controls. Account-assigned purchasing still requires the correct cost object and expense context.