كتاب الطهارة وسننها
1  
The Book of Purification and its Sunnah
(27)
Chapter: A man who is greeted while he is urinating
(27)
باب الرَّجُلِ يُسَلَّمُ عَلَيْهِ وَهُوَ يَبُولُ
Sunan Ibn Majah 350
It was narrated that Muhajir bin Qunfudh bin (Umair) bin Jud'an said:
"I came to the Prophet when he was performing ablution and greeted him with the Salam, but he did not return (the greeting). When he had finished his ablution he said: 'Nothing prevented me from returning your greeting but the fact that I need to have ablution.'" (Da'if) Another chain with similar wording.
حَدَّثَنَا إِسْمَاعِيلُ بْنُ مُحَمَّدٍ الطَّلْحِيُّ، وَأَحْمَدُ بْنُ سَعِيدٍ الدَّارِمِيُّ، قَالاَ حَدَّثَنَا رَوْحُ بْنُ عُبَادَةَ، عَنْ سَعِيدٍ، عَنْ قَتَادَةَ، عَنِ الْحَسَنِ، عَنْ حُضَيْنِ بْنِ الْمُنْذِرِ بْنِ الْحَارِثِ بْنِ وَعْلَةَ أَبِي سَاسَانَ الرَّقَاشِيِّ، عَنِ الْمُهَاجِرِ بْنِ قُنْفُذِ بْنِ عُمَيْرِ بْنِ جُدْعَانَ، قَالَ أَتَيْتُ النَّبِيَّ ـ صلى الله عليه وسلم ـ وَهُوَ يَتَوَضَّأُ فَسَلَّمْتُ عَلَيْهِ فَلَمْ يَرُدَّ عَلَىَّ السَّلاَمَ فَلَمَّا فَرَغَ مِنْ وُضُوئِهِ قَالَ ‏ "‏ إِنَّهُ لَمْ يَمْنَعْنِي مِنْ أَنْ أَرُدَّ عَلَيْكَ إِلاَّ أَنِّي كُنْتُ عَلَى غَيْرِ وُضُوءٍ ‏"‏ ‏.‏

قَالَ أَبُو الْحَسَنِ بْنُ سَلَمَةَ حَدَّثَنَا أَبُو حَاتِمٍ، حَدَّثَنَا الأَنْصَارِيُّ، عَنْ سَعِيدِ بْنِ أَبِي عَرُوبَةَ، فَذَكَرَ نَحْوَهُ ‏.‏

Reference : Sunan Ibn Majah 350
In-book reference : Book 1, Hadith 84
English translation : Vol. 1, Book 1, Hadith 350