A microscopic theory of SFS and SF junctions is constructed for temperatures near T(c) in the clean and "dirty" limits. A fundamental feature of SFS and FS junctions is demonstrated: If the spin-orbit scattering is negligibly small (l(so) >> max { xi-0, v(o)/h}), the parameter of the superconducting order in the F region vanishes strictly at a certain distance from the SF boundary. As a result, phase correlation of the superconducting borders of the SFS junction is impossible if the thickness of the ferromagnetic barrier exceeds a definite critical value d(c). (In the pure limit d(c) = pi-theta/4 v0/h, (h/E(F) 1/2 < theta less-than-or-equal-to 1, and in the "dirty" limit d(c) = 5-pi/4(D/h) 1/2, if h >> T(c) and d(c) = v3BAR-pi/2(l/xi-0 1/2 v0/h, if h << T(c.)) If there is strong spinorbit scattering in the F region (l(s0) << v0/h) this feature disappears.