Sunan Ibn Majah, Book 5, Hadith 217 (Ibn Majah 1019)

It was narrated that ‘Abdullah said:

“We would greet others during the prayer, and it was said to us: ‘During the prayer one is preoccupied.’”