‎2007 Oct 01 1:42 PM
Hi Friends,
I am trying to call a GUI_download function module inside a method.
But after executing it is throwing an error message stating that FM does not exists or exceptions raised.
Kindly suggest..
Regards,
Chaitanya
‎2007 Oct 01 1:45 PM
Hi,
Uncomment the EXCEPTIONS part & handle the sy-subrc.
Check in debug mode, which exception is raised.
You might not have some authorization to download on a specific directory.
Best regards,
Prashant
‎2007 Oct 01 1:45 PM
Hi,
Uncomment the EXCEPTIONS part & handle the sy-subrc.
Check in debug mode, which exception is raised.
You might not have some authorization to download on a specific directory.
Best regards,
Prashant
‎2007 Oct 01 1:59 PM
Hi Prashant,
Thanks for the inputs....
the exceptions have been taken care but the problem is that the FM itself is not getting executed.
So how to debug now???
As soon as it reaches to the calling point it comes out saying that the FM does not exists.
Please advice...
Regards,
Chaitanya.
‎2007 Oct 01 2:00 PM
Hi Kumar,
It seems you are on 4.6B or lower version. Use WS_DOWNLOAD instead of GUI_DOWNLOAD.
Best regards,
Prashant
‎2007 Oct 01 2:19 PM
Hi,
Don't call the FM inside the method instead call static method GUI_DOWNLOAD of global class CL_GUI_FRONTEND_SERVICES. You can call this directly without instantiating the class.
call method cl_gui_frontend_services=>gui_download
exporting
filename = ldf_fullpath
filetype = 'ASC'
changing
data_tab = gt_outtab
exceptions
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
others = 24.
if sy-subrc is not initial.
* handle exceptions here...e.g. RAISE EXCEPTION xxx
endif.Don't forget to reward points.
Cheers,
Sougata.
‎2007 Oct 01 2:32 PM
‎2007 Oct 01 2:46 PM
Hi,
I tired your code and now I am getting an error message saying Error when opening the RFC connection.
Kinldy advice.
Regards,
Chaitanya.
‎2007 Oct 02 3:30 AM
Hi Kumar,
What is the value of sy-subrc after the method <i>cl_gui_frontend_services=>gui_download</i> is called?
Cheers,
Sougata.