In the majority of patients the impotence is organic, though not endocrinologic, and there is no easily remedied cause. These patients require physiologic testing and urologic consultation for specific diagnosis. Likely causes of impotence in this group include vascular and neurologic diseases. These patients are candidates for penile prostheses or, in special cases, for revascularization. Patients interested in surgical approaches should be referred for further testing. There is little to be gained by continuing the work-up of patients who prefer not to have an operation.
Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
If you can keep an erection when you’re alone, then you’re probably worried about something when you’re with your partner. Think about how you feel and then talk to your partner about your concerns. You might be putting too much pressure on yourself or not protecting yourself by using condoms and birth control. Or maybe you’ll discover that you’re really not ready for sex right now and need to wait until it feels right.
Willful and capricious – erections are funny things. When you're a young man, they seem to pop up at the most inappropriate moments (and the only thing between you and embarrassment is a carefully placed notebook). As you get older, however, they go the other way, and fail to appear on demand no matter how much you try. The sad thing is, my patients often equate this with a loss of masculinity.
Stiffy Solution: Luckily, alcohol-induced impotence (also known by the infinitely less classy alias "whiskey d*ck") is a totally temporary condition, one that should clear up as soon as your dude can once again walk a straight line and recite the alphabet backwards. If your dude has consistent erectile problems from consistently drinking too much, however, he should consider cutting down on the sauce, and possibly talking with a doctor.
Only a small proportion of cases of erectile dysfunction are caused by hormone abnormalities. The most frequent hormone abnormality is a reduced level of the male sex hormone testosterone required to get an erection which can be restored by appropriate hormone replacement. It's unwise to take testosterone preparations unless you've had tests that confirm a deficiency.
Vacuum constriction devices may be effective at generating and maintaining erections in many patients with erectile dysfunction and these appear to have a low incidence of side effects. As with intracavernosal injection therapy, there is a significant rate of patient dropout with these devices, and the reasons for this phenomenon are unclear. The devices are difficult for some patients to use, and this is especially so in those with impaired manual dexterity. Also, these devices may impair ejaculation, which can then cause some discomfort. Patients and their partners sometimes are bothered by the lack of spontaneity in sexual relations that may occur with this procedure. The patient is sometimes also bothered by the general discomfort that can occur while using these devices. Partner involvement in training with these devices may be important for successful outcome, especially in regard to establishing a mutually satisfying level of sexual activity.