Let P be a nonconstant selfmap of a set M. A sandwich-type theorem for generalized sub-P -periodic functions defined on M with values in a reflexive Banach space is proved. In particular, given functions f, g : M → R, we obtain necessary and sufficient conditions for the existence of a generalized P -periodic function F : M → R such that f ≤ F ≤ g. The formula for F is given and its Lipschitz constant is discussed. Moreover the solvability of the functional equation f • p = r • f with the help of a new sandwich method, is considered.Mathematics Subject Classification. Primary 39B82, 39B12; Secondary 39B62, 46B20.