Ulcer/ Perferrated Ulcer???
Any number of things can cause an ulcer. It might be small, and simply be an annoyance, and it might be serious causing blood loss & requiring surgery. The only way to know for sure is for the doctor to go in & look - thus the endoscopy.
Here's some information on it: http://tinyurl.com/rfvy7