I'm not sure I understand your question. Are you saying that f is a function from A to B, that A contains the single member "u", B contains the single member "8" (or possibly "g"?) and f(u)= 8? If so, it is both "injective" and "surjective". It cannot be a "constant" function since f(u) is not u.
The function $\displaystyle f:\mathbb{R} \to \mathbb{R}$ defined by $\displaystyle f(x) = 0$ is a constant function, and $\displaystyle f(x) \neq x$. A constant function means that the output is constant over the entire domain. So, yes, the OP's function (if it only acts on a single point) is a constant function.