  We consider a potential $W:R^m\rightarrow R$ with two different global minima
$a_-, a_+$ and, under a symmetry assumption, we use a variational approach to
show that the Hamiltonian system \begin{equation} \ddot{u}=W_u(u), \hskip 2cm
(1) \end{equation} has a family of $T$-periodic solutions $u^T$ which, along a
sequence $T_j\rightarrow+\infty$, converges locally to a heteroclinic solution
that connects $a_-$ to $a_+$. We then focus on the elliptic system
\begin{equation} \Delta u=W_u(u),\;\; u:R^2\rightarrow R^m, \hskip 2cm (2)
\end{equation} that we interpret as an infinite dimensional analogous of (1),
where $x$ plays the role of time and $W$ is replaced by the action functional
\[J_R(u)=\int_R\Bigl(\frac{1}{2}\vert u_y\vert^2+W(u)\Bigr)dy.\] We assume that
$J_R$ has two different global minimizers $\bar{u}_-, \bar{u}_+:R\rightarrow
R^m$ in the set of maps that connect $a_-$ to $a_+$. We work in a symmetric
context and prove, via a minimization procedure, that (2) has a family of
solutions $u^L:R^2\rightarrow R^m$, which is $L$-periodic in $x$, converges to
$a_\pm$ as $y\rightarrow\pm\infty$ and, along a sequence
$L_j\rightarrow+\infty$, converges locally to a heteroclinic solution that
connects $\bar{u}_-$ to $\bar{u}_+$.
