Hello Anjalee,
I'm afraid it won't work since reading variable Y in Customer Exit (CE) is user-specific and DTP is run under a system-user (BWREMOTE or so). Thus, CE is trying to get values of a var Y entered by your system-user and consequently, gets no value. If you can organize your Var-value to be stored in access for all users (Z-table or Info-object MD for instance) this can work. Otherwise you'll have to use ABAP-coding instead of OLAP Vars OR try to make use of Info-Package (the pre-Netweaver type R3TR ISIP) in dialog mode instead of DTP.
Regards,
Nastya