can cause flatulence in some people. in some people, beans can cause flatulence, stomach pain, or bloating. that's because beans contain raffinose, a type of fiber that can lead to digestive problems ( 19 ).