If you are unable to write an exam locally due to a stay abroad, then there is the possibility of organising an invigilation via the local examination office at the host university and writing it there at the same time.