It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that a man greeted the Prophet (peace and blessings be upon him) with salam while he (peace and blessings be upon him) was urinating, and he (peace and blessings be upon him) did not return his greeting.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 482
Sayyiduna Abu Sa'id (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "Two men should not go out to relieve themselves in such a way that their private parts are uncovered (exposed) while they are talking, for Allah Almighty is intensely angered by that."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 483
It is reported from Iyad bin Hilal (may Allah have mercy on him) like the previous narration.
(b) Abu Bakr Muhammad bin Ishaq bin Khuzaymah (may Allah have mercy on him), after recording these two narrations, said: This is the correct one, and he is Iyad bin Hilal; Yahya bin Abi Kathir (may Allah have mercy on him) narrated hadith from him. I think that narrating it from Hilal bin Iyad is a mistake on the part of Ikrimah bin Ammar.
Abu Dawud said: No one narrated it with a connected chain except Ikrimah bin Ammar.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 484