  Let $\A$ be a $C^*$-algebra and $\B$ be a von Neumann algebra that both act
on a Hilbert space $\Ha$. Let $\M$ and $\N$ be inner product modules over $\A$
and $\B$, respectively. Under certain assumptions we show that for each mapping
$f\colon{\mathcal M} \to {\mathcal N}$ satisfying
$$\||\ip{f(x)}{f(y)}|-|\ip{x}{y}| \|\leq\phi(x,y)\qquad (x,y\in{\mathcal M}),$$
where $\phi$ is a control function, there exists a solution $I\colon{\mathcal
M} \to {\mathcal N}$ of the Wigner equation
$$|\ip{I(x)}{I(y)}|=|\ip{x}{y}|\qquad (x, y \in {\mathcal M})$$ such that
$$\|f(x)-I(x)\|\leq\sqrt{\phi(x,x)} \qquad (x\in {\mathcal M}).$$
