Pain when going #2?

Sorry for tmi ladies, but I’ve been having some serious upper stomach cramps when I go to the bathroom. I go from being constipated for 2 days to not being able to stop. The cramps are so bad that they make me want to vomit. Anyone having a similar issue?