Hi Junaid,
Is there a reason why you have used setVariableValueExt instead of setVariableValue for the second variable?
Also, is this a BEx query? Is yes, then have you considered using offsets in the query design?
You can just use one variable ZDB_FISCPER and to obtain last year same period you could just offset from this variable.
Regards,
Swapnil Koti.