If you are working as an employee ("Beschäftigungsverhältnis") at an institution of higher education or research in Germany and wish to take up a research position in another EU Member State, you must bear in mind that, on your return, as an employee at an institution of higher education or research in Germany, the research position in the other EU country will not usually be recognized in relation to occupational rights.
If you are working as a civil servant ("Beamtenverhältnis") and return to Germany after holding a research position in another EU Member State, periods of time spent abroad can only be recognized under certain circumstances. Details should be discussed with your employer in advance. Special regulations (cf. Delegation Regulations ["Entsendungsrichtlinien"] - 2000, p. 1094) apply to positions with European institutions (e.g. EMBL).
Legal advice on matters of higher education and occupational legislation (matters relating to professorial proxy, occupational legislation, advice on first-time professorial appointments, as well as taxation, insurance and public-service related legislation) can be obtained at a charge from the German Association of University Professors and Lecturers.