I’ve been getting extremely painful period like cramps during exercise

Period is due in a little less than two weeks. It is very painful that I have to stop and sit down. It is still painful then for minutes. What causes this?