Coffee is not allowed

Oh!! i feel like drinking coffee again but my doctor advised me not to drink coffee because it might be the cause of my gas pain. I drink around 5 cups of coffee everyday before i felt abdominal discomfort. I got heartburn, abdominal pain, feeling of fullness last three weeks ago.
Fortunately, relieved after one week of medication. My doctor prescribed Motillum 10 mg one tablet three times a day. I am advised to take the tablet 30 minutes before meals and Omeprazole once a day and take it 15 minutes before meal. I wish and pray gas is just only the cause of my abdominal discomfort and not any other cause.