Can constipation cause upper abdominal pain if you're really constipated?

Yes. Constipation can be surprisingly painful and difficult to treat. However, any severe abdominal pain should be evaluated by a physician to make sure nothing else is going on.