## TL;DR
The amounts are right but the account is wrong, which points at the mapping table that routes FX differences by currency, transaction type, or account group. Find one misposted difference, identify the rule that routed it, and fix that rule rather than journaling every symptom. Then reclass the already-posted differences in bulk and retest each transaction type that generates FX differences: payments, invoices, and revaluation.

```text
ERP posted the FX difference to the wrong account: "exchange gain/loss mapping" error
```

## Use this when
- FX gains or losses appear in an account that should never hold them, such as a revenue or suspense account.
- The error names exchange gain loss mapping, or the pattern repeats for one transaction type.
- Amounts of the differences recompute correctly; only the destination is wrong.

## Not for this skill when
- The FX difference amounts themselves are wrong. That is a rate or calculation problem, separate from mapping.
- One manual journal put a difference in the wrong account as a one-off. Correct the journal; the mapping is fine.

## Steps
1. Pick a recent misposted FX difference and trace it to its source transaction and the rule that chose its account. Verify: the routing rule or mapping row is identified by name
2. List every mapping row for FX differences by transaction type and currency and compare with the intended chart design. Verify: all wrong rows are listed, not just the one you traced
3. Correct the mapping rows to the realised and unrealised gain and loss accounts per policy. Verify: the corrected table matches the documented design
4. Reclass the differences already posted to wrong accounts, grouped by source type, with the mapping fix referenced. Verify: the wrong accounts no longer hold FX differences and gain loss accounts tie to a recomputation
5. Post a test transaction of each type that creates an FX difference and confirm each lands in the right account. Verify: every type routes correctly before the next close

## Variant phrasings
### FX difference posted wrong account mapping error
The misrouted-difference phrasing.
### exchange gain loss account determination wrong
The account determination phrasing used in SAP shops.

Compatibility: FX account determination in SAP, NetSuite, Dynamics 365, Oracle, and Sage multi-currency setups.

## Why it happens
ERPs do not hard-code where FX differences go; they look them up in account determination tables keyed by currency, account group, and transaction type. A new currency, a new bank account group, or a chart change can leave a key combination pointing at a default or legacy account. The calculation engine works perfectly and delivers correct amounts to the wrong home, consistently, until the table is fixed.

## Edge cases / pitfalls
- After any chart of accounts change, FX mapping rows are a standard review item; they reference accounts by number and break silently on renumbering.
- Realised and unrealised differences must route separately. A single wrong row often swaps them, which distorts reporting even when totals look plausible.
- If differences route to suspense, the suspense growth investigation and this mapping fix are the same conversation.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_zczGgy8SNV083sXCTe9Dfw
