An order has two items worth 100 EUR and 150 EUR. The report shows 250 EUR until someone adds a material description. Suddenly the order is worth 500 EUR.
Before debugging the SUM, display the rows feeding it. In this example each material has English and German text. Joining by material alone produces four rows. Both item amounts appear twice.
A five-minute diagnostic
- Restrict the view to one affected order and currency. Display item, material, text language and amount together.
- Count rows per item before and after joining the text. Look for the first join that changes that count.
- Include the full relevant text key and the required language in the join condition. If items must survive a missing translation, use a left outer join with the language predicate in ON. A language filter in WHERE can drop the untranslated item.
- Test one item with two translations and one with none. Both amounts should still contribute exactly once.
Tempted to use SUM(DISTINCT amount)? Try two legitimate items worth 100 EUR each. The expected total is 200 EUR. Deduplicating on amount would quietly lose an item.
From ERPClimb, a learning platform for SAP practitioners.
