The classical Obata theorem in Riemannian space is generalized to the Randers spaces. It is proved that, if the generalized Obata equation on a closed Douglas Randers spaces admits a nontrivial solution, then M is weakly isometric to the Euclidean sphere (Sn(1),h)(Sn(1),h), where, h denotes the standard Riemannian metric of Sn(1)Sn(1). In particular, F is locally projectively flat with positive flag curvature.