i did the same ..i came from Dubai as Tourist and i did not book any accomodations .I was staying with a thai friend and she send me the invitation letter which i showed them at the immigration in Suvarnabhumi intl Airport .
if you staying with a friend you should ask him/her for the invitation letter,in which the person must mention that you will stay with him/her ,after you dont have to book for accommodation.