Hi Shiva,
if GL account is maintained as ending balance account then please define correct GL accounts in T-code OBA1 transaction KDB under column Expense Account and E/R gains acct.
If GL account is maintained as an open item account then check OBA1 transaction KDF for "Exchange rate difference realized" Loss and Gain account setting. & "Valuation" for Loss 1, Gain 1 and Bal Sheet adj 1 GL definition.
I hope this will fix your issue. Let me know.
Thanks
Naseem