Assume that be a unital prime ring with whose characteristic is not 2 and containing a nontrivial idempotent P. In this paper, it is shown that under certain conditions, where an additive map on and AB = P if and only if it has the form , where h is an additive map into its center vanishing at commutators with and . An application of our results we characterize generalized Lie derivations on . Using main result we apply several classical examples of unital prime rings with nontrivial idempotents such as Banach space standard operator algebras and factor von Neumann algebras.