Why do you want to write zero to the cube?
To make sure the stock value for particular month is Zero, and retrieve the data to EPM excel sheet.
If I keep it null , it means calculation(stock)is not applicable, If I have record as zero, it means for that particular month stock is zero.
My Fundamental doubt is
If I have no data in the cube and in ct_data I have zero - Well in this case will zero be written?