You can purchase digestive enzymes that work very well. I use a product called QuickDigest by Zand and I love them. If you are going to eat something you suspect may bother you, just eat one of the chewables before dinner. They have plant-enzymes in them that aid digestion and prevent heartburn, gas pain etc.
I also definitely recommend probiotics daily to help balance healthy gut flora and keep your digestive tract functioning properly.
For periodic constipation Senna leaf tea works amazingly well.