Hello,
Welcome to the forum. You have pain in the center of the abdomen, around the area of the epigastrium. It is indicative of gastric problem from which you are suffering.
Constipation can result because of inadequate water intake, sedentary lifestyle, low level of fibre in the diet, stress, intake of dairy products in huge amounts,
irritable bowel syndrome,
diverticulosis, etc
Take fruits, veggies, berries in your diet, 1-2 L of water, fibre rich balanced diet, soups, milk. Do regular exercises. Laxatives, h2 blockers (antacids like ranitidine, etc), proton pump inhibitors may be helpful. Avoid alcohol, cigarretes, caffeine.
However if problem continues to exist, you can get your hormones levels checked, USG done, get
colonoscopy,
sigmoidoscopy done to rule out any problem in the colon. Take care.