´It was narrated from Jabir bin `Abdullah that:` "A man passed by the Prophet while he was urinating, and greeted him by the Salam. The Messenger of Allah said to him: "If you see me in this situation, do not greet me with the Salam, for if you do that I will not respond to you.'"
Explanation & Benefits
Maulana Ataullah Sajid
Commentary:
It is not correct to reply to the greeting (salam) while engaged in relieving oneself or urinating; therefore, it is better that in such a situation, salam should not be given.
And Allah knows best.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 352