Bank credit to housing as well as commercial real estate witnessed a nearly 38 per cent annual growth in July, taking the loan outstanding to the realty sector to a record Rs 28 lakh crore, as per the latest RBI data.