Pesaran's CCEP estimator in eviews
The technique described in the question is almost correct. Consider a panel data set consisting of three cross-sections ($a$, $b$, and $c$) and three time-periods ($1$, $2$, and $3$). Let y denote the column vector with the observations of the dependent variable, x the column vector with observations of the first explanatory variable, and z the column vector with observations of the second explanatory variable. They take these forms respectively:

$\textbf{y} = 
\begin{bmatrix} y_{a1} \\ y_{a2} \\ y_{a3} \\  y_{b1} \\ y_{b2} \\ y_{b3} \\ y_{c1} \\ y_{c2} \\ y_{c3} \end{bmatrix}$
; $\textbf{x} = \begin{bmatrix} x_{a1} \\ x_{a2} \\ x_{a3} \\  x_{b1} \\ x_{b2} \\ x_{b3} \\ x_{c1} \\ x_{c2} \\ x_{c3} \end{bmatrix}$;  $\textbf{z} = \begin{bmatrix} z_{a1} \\ z_{a2} \\ z_{a3} \\  z_{b1} \\ z_{b2} \\ z_{b3} \\ z_{c1} \\ z_{c2} \\ z_{c3} \end{bmatrix}$.

Let $\bar{y}_{i} = \frac{1}{3}(y_{ai} + y_{bi}+y_{ci})$, with $i = 1, 2, 3$, and equivalently for $x$ and $z$: $\bar{x}_{i} = \frac{1}{3}(x_{ai} + x_{bi}+x_{ci})$ and  $\bar{z}_{i} = \frac{1}{3}(z_{ai} + z_{bi}+z_{ci})$, both for  $i = 1, 2, 3$.

This is the correct way to get the CCEP estimator allowing for one common factor, as in the model described in the question:
\begin{equation*}
\begin{split}
\begin{bmatrix} y_{a1} \\ y_{a2} \\ y_{a3} \\  y_{b1} \\ y_{b2} \\ y_{b3} \\ y_{c1} \\ y_{c2} \\ y_{c3} \end{bmatrix} = \beta_{1} \begin{bmatrix} x_{a1} \\ x_{a2} \\ x_{a3} \\  x_{b1} \\ x_{b2} \\ x_{b3} \\ x_{c1} \\ x_{c2} \\ x_{c3} \end{bmatrix}+\beta_{2}\begin{bmatrix} z_{a1} \\ z_{a2} \\ z_{a3} \\  z_{b1} \\ z_{b2} \\ z_{b3} \\ z_{c1} \\ z_{c2} \\ z_{c3} \end{bmatrix}+
\gamma_{a} \begin{bmatrix} \bar{y}_{1} \\ \bar{y}_{2} \\ \bar{y}_{3} \\  0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
+\gamma_{b} \begin{bmatrix}  0 \\ 0 \\ 0 \\ \bar{y}_{1} \\ \bar{y}_{2} \\ \bar{y}_{3} \\  0 \\ 0 \\ 0 \end{bmatrix} + 
\gamma_{c}  \begin{bmatrix}  0 \\ 0 \\ 0 \\  0 \\ 0 \\ 0 \\ \bar{y}_{1} \\ \bar{y}_{2} \\ \bar{y}_{3}  \end{bmatrix} \\
- \beta_{1}\gamma_{a} \begin{bmatrix} \bar{x}_{1} \\ \bar{x}_{2} \\ \bar{x}_{3} \\  0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
- \beta_{1}\gamma_{b}  \begin{bmatrix}  0 \\ 0 \\ 0 \\ \bar{x}_{1} \\ \bar{x}_{2} \\ \bar{x}_{3} \\  0 \\ 0 \\ 0 \end{bmatrix}
-\beta_{1} \gamma_{c} \begin{bmatrix}  0 \\ 0 \\ 0 \\  0 \\ 0 \\ 0 \\ \bar{x}_{1} \\ \bar{x}_{2} \\ \bar{x}_{3}  \end{bmatrix}
-\beta_{2} \gamma_{a}  \begin{bmatrix} \bar{z}_{1} \\ \bar{z}_{2} \\ \bar{z}_{3} \\  0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
-\beta_{2} \gamma_{b} \begin{bmatrix}  0 \\ 0 \\ 0 \\ \bar{z}_{1} \\ \bar{z}_{2} \\ \bar{z}_{3} \\  0 \\ 0 \\ 0 \end{bmatrix}
-\beta_{2} \gamma_{c} \begin{bmatrix}  0 \\ 0 \\ 0 \\  0 \\ 0 \\ 0 \\ \bar{z}_{1} \\ \bar{z}_{2} \\ \bar{z}_{3}  \end{bmatrix} \\
+ \phi_{a} + \phi_{b} + \phi_{c} + \mu_{it}
\end{split}
\end{equation*}
Here, $\phi_{a},\ \phi_{b},$ and  $\phi_{c}$ are cross-sectional fixed effects and $\mu_{it}$ a well-behaved error-term that does not require any restrictions. 

An interesting remark is that if the six $\beta$s that appear together with the $\gamma$s are not restricted to be equal to each other and equal to the first two $\beta$s,   more than one common factor is allowed.