Hypopituitary means you are missing most of the hormones that come from the pituitary, there are 7, not just one. I am hypopituitary for 5 of the 7.
So what hormones are you missing? If that list includes LH then your body isn't making testosterone properly and viagra can't work. If we are talking thyroid, then again viagra can't fix that. Did you tell your endo about the problem? What does he intend to do about it?