Few changes are required:
Please create ZFISCQRT of same data type as of 0CALQUARTER.If you check the last line there i am concatenating the fiscal year with fiscal quarter as the format of it is like this:20141.
The above code will populate fiscal quarter based on the fiscal year period ranges given by you.
Write the code in end routine after the amendments i added.Let me know if this works or not.
Regards,
AL