Abu Dawud Book 1, Hadith Number 12.
Chapter : Permission to face the qiblah while releiving oneself.
Narated By ‘Abd Allah b. ‘Umar : I ascended the roof of the house and saw the Apostle of Allah (PBUH) sitting on two bricks facing Jerusalem (Bait al-Maqdis) for relieving himself.