Pain in upper right quadrant after taking PPI’s.

Has anyone experienced pain in upper right quadrant after taking PPI’s? 

Firstly, why have they prescribed the ppi's? 

If it's for gallbladder or hiatus hernia/heartburn/gerd, it might just be that the pain was going to happen anyway.  What kind of pain is it and where abouts? 

I was prescribed PPI’s initially for heartburn/acid reflux/indegestion. Then I was given an endoscopy, that showed inflammation of the stomach and small bowel. (Gastritis). After two years on and off, taking PPI’s, I now have pain in my upper right quadrant, had 2 ultrasounds and nothing abnormal showing. The pain is sometimes like a dull ache, other times it’s a stabbing pain.