This will help you:
SE24 -> CL_TRANSACTION_TRL class -> PROCESS method -> lines 563-591.
I understand that 1st "IF" statement is executed because you have different currencies.
2nd "IF" statement is executed if NOT
* a) flow without amount cat
* b) amount cat without position component rule
* c) bustranscat for curr check excluded
* d) position amt is initial
* e) during migration IOB
a) tr. SM30 -> V_ATFTA - get update type for flow which has different currency then position currency. tr. SM30 -> TRLAV_DFT_PMC Check if Position Change Category (or AMOUNT CAT - another title for this field) is assigned to your update type.
b) If your update type is assigned to Position change category then check what Position Change Rule (POS_COMP_RULE field) is assigned to Position Change Category (AMOUNT_CAT field) tr. SE11 -> TRLTS_PMCAT
c) tr. SM30 -> TRGTS_BT_CONTROL. Check if your Position Change Category is assigned to TRL context and has transaction control "3 No position currency check"
d) i wan't able to check this paragraph, but i think it concernc amount of money of the flow.
c) it concernc migration. But i don't think you perform migration.
3rd - is the error which is performed if the 2nd "IF" statement if not okey.
So check steps above. If you have any question - just ask.