In this paper, we provide some rigidity results for compact manifolds with smooth boundary by using appropriate geometric or topological assumptions and the Obata-type equation \(\nabla ^2 f -fg =0\) with Robin boundary condition \(f_{\nu } = cf\) , where \(c>1\) (note that in this case f has no critical points). By the same idea, we also use equations \(\nabla ^2 f +fg =0\) and \(\nabla ^2 f=0\) to establish similar rigidity results. The proofs of our rigidity results are mainly based on the warped product structures on compact manifolds determined by the Obata-type equation (see Proposition 1.11), and we also provide the corresponding structure on complete non-compact manifolds with compact boundary (see Proposition 1.13). It should be pointed that we have actually provided all possible structures determined by the equation \(\nabla ^2 f -fg =0\) with \(f_{\nu } = cf\) for complete manifolds with compact boundary.