On the generalized Stepanov theorem