The Cancer of the Prostate Strategic Urologic Research Endeavor (CaPSURE) study, designed to determine whether an individual man’s sexual outcomes after most common treatments for early-stage prostate cancer could be accurately predicted on the basis of baseline characteristics and treatment plans, found that 2 years after treatment, 177 (35%) of 511 men who underwent prostatectomy reported the ability to attain functional erections suitable for intercourse. 
Organic Impotence. Diabetes mellitus, thyroid disease, and dysfunction of the pituitary gland or testes can cause impotence, as can certain medications. Other organic causes include arterial ischemia associated with atherosclerosis of the aorta and common iliac arteries, extensive pelvic surgery such as radical prostatectomy, spinal cord injury and other neurologic disorders, and a history of cigarette smoking. Because certain medications can cause impotence, it is recommended that in cases of recent impotence it be determined whether the patient has started on a new drug. The most common offenders are diuretics, antihypertensives, and vasodilators. Alcohol, which sometimes is ignored as a drug, is often a contributor to the problem of impotence.
Thanks to over a decade of primetime television commercials, most of us can name at least one drug that treats erectile problems. However, far fewer of us can name drugs that may actually cause the problem. In reality, MedlinePlus reported that there are far more of these, and even common drugs such those to treat depression and heartburn can make it difficult to get an erection.
Having erection trouble from time to time isn't necessarily a cause for concern. If erectile dysfunction is an ongoing issue, however, it can cause stress, affect your self-confidence and contribute to relationship problems. Problems getting or keeping an erection can also be a sign of an underlying health condition that needs treatment and a risk factor for heart disease.