I have pinching pain in upper abdomen, and bloated stomach?

Need more info. When does it happen? How often? Does it happen with activities or exercise? Does it happen with eating? Need to see a doctor as there are many possibilities including rib injury, muscle pain, gallbladder, gastritis or stomach ulcer, liver conditions, etc.