You are entitled to recognition if there are no significant differences in the competences you have demonstrated. Otherwise, the home university - not the student - must prove this ‘significant difference’. However, recognition sometimes causes difficulties in practice.
Sometimes there are already corresponding agreements between the German and foreign universities for the mutual recognition of academic achievements (e.g. in the case of international degree programmes or university cooperation). In this case, recognition usually takes place without any problems. This is also the case if a so-called ‘Learning Agreement’ is concluded in advance of a stay abroad, which specifies the coursework to be completed abroad.
If your degree programme concludes with a university examination (e.g. Bachelor's, Master's), the university at which you continue your studies is responsible for recognising the credits earned abroad. For degree programmes leading to a state examination (e.g. teaching degree, law, medicine, pharmacy), you should contact the state examination offices or the examination board appointed by a state authority.