Primary dysmenorrhea does not affect your fertility. The cause of primary dysmenorrhea is the increase of prostaglandins that lead to uterine contractions, sensitive nerve endings, and can affect your digestive tract by triggering nausea and stool change.
Elevated levels of prostaglandins has not been found to affect getting pregnant or carrying a baby to term. In fact, your levels of prostaglandin increase at the same time an egg is released by your body. When you become pregnant your body is no longer releasing eggs and your prostaglandin levels are no longer being triggered to elevate.