In this paper we prove existence and uniqueness of the solution for one dimensional generalized backward stochastic differential equation with two reflecting barriers. As application, we will use this result to establish existence of viscosity solution for some partial differential equations with Neumann boundary condition.