If a person gets a wet dream before shares in the month of Ramadan and has time to take Ghusle Janaba, bath for purification, then he should do it, and then eat his share. However, if he does not have the time for Ghusl, he should take Ghusl before the Fajr Prayer. If a person gets a wet dream after taking share in the state of Saum, he should take Ghusl as soon as he wakes up. One's fast does not break by wet dreams. Even if he happens to be in the state of Janaba for some time, there is nothing wrong with it. He should take a Ghusl before offering any Salaah / Prayer.