From when is the problem, if it is recent onset, dietary modifications with above medication for 4 weeks will suffice. If the problem is chronic, then you will need an endoscopy
Next Steps
Avoid fatty/oily and spicy meals
Consult a Gastroenterologist for proper diet advise and need for endoscopy to be decided