Abu Dawud Book 1, Hadith Number 17.

Chapter : Return of salutation at the time of urination.

Narated By Muhajir ibn Qunfudh : Muhajir came to the Prophet (PBUH) while he was urinating. He saluted him. The Prophet (PBUH) did not return the salutation to him until he performed ablution. He then apologised to him, saying: I disliked remembering Allah except in the state of purification.