Hi Vicky
Only time for a question suggestion - and I haven't scripted that tcode - or if I have, I don't remember. :)
When I run into that issue, I check the box to Start SAP GUI on the RUN tab and try again. It usually fixes the issue, since in debug, the GUI is started.
HTH. If not, I'll circle back to check out the tcode tomorrow.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------