Anejaculation is a condition where a man can not discharge semen. It can be absolute when he can not discharge in any situation and situational when he can not discharge in certain situations but can discharge in other conditions. If he can ejaculate with masturbation but not with sex then it is a psychological issue. If he can not ejaculate even with masturbation or in dreams then it is a physical issue for which some tests need to be done. The psychological issue is due to inhibition when a man can not ejaculate in presence of another person. 

It can be overcome by gradual desensitization. He can rub his penis on any body part of the female like buttocks, thighs, breasts, belly, etc, and try to ejaculate. The female can also masturbate him. It's a long drawn process and often frustrating but is useful. He can also self masturbate and on the verge of ejaculation put the head of the penis into the vagina. Also, a vibrator can be used. But before doing all these enough foreplay should be done if needed help of pornography can be taken. Also, there is medicine to reduce the anxiety related to it and facilitate ejaculation. For physical problems, the treatment is decided after doing some blood tests and ultrasound test. 

Some couples practice fertile period or ovulation method for sex, it puts stress on a partner by making a pleasurable activity into a TASK of performing. It can be overcome easily if they forget the ovulation time and do sex all through the month on alternate days. Also, he can masturbate, collect semen in a clean glass cup, and after it liquifies pull in a disposable syringe of 5 mL without the needle and push into the vagina.