salam i have the following questions to recite this ziyarat for 40 days to help get rid of a problem.1)is the sajda at end of ziyarat obligatory?or can we recite that part without sajda.2)what happens if i read the ziyarat for 40 days ,but then a girl gets her periods.Should she recite in her menses or wait till its over to recite. because i want to do the 40 day amaal.

Yes you can recite without doing sajda. And a woman can recite this ziyarat in her menses also.
One thing I wish to add that the part we recite during Sajdah that is the greatest part of this ziyarat that requires we put our forehead on the ground and say:
O’my Allah! (All) praise is for You (alone); praise of the "Ever-thankful to You", who glorify You whatever come to pass. (All) praise is for Allah for my deep-felt intense grief. O my Allah make available for me the recommendations of Husayn on the day I present myself before You, let me stand firm in safety before You on account of my sincere attachment with Husayn, along with him and his comrades, who sacrificed everything they had (heart, mind, soul and life) for Husayn, peace be on him.