Hi Puja,
I am not sure if SAP has a note to do this.
You can debug the pop window (How to debug pop-up window) and put a break-point at CALL FUNCTION "GUI_DOWNLOAD" or cl_gui_frontend_services=> gui_download. Once you reach that point, try to enhance the same with below code:
*--> lt_binary_data = contains your data in Binary format
*--> lv_filepath = Application server file path
OPEN DATASET lv_filepath FOR OUTPUT IN BINARY MODE.
if sy-subrc is initial.
LOOP AT lt_binary_data INTO ls_binary.
TRANSFER ls_binary TO lv_filepath.
ENDLOOP.
CLOSE DATASET lv_filepath.
endif.
Thanks,
Madhu M V