‎2009 Sep 03 12:38 PM
Hello,
I have written code which creates un-encrypted file using GUI_DOWNLOAD than encrypt file using execute method of cl_gui_frontend_services, this creates two files one encrypted file & another without encryption.
After this I'm deleting un-encrypted file using file_delete method of cl_gui_frontend_services.
This works perfect in debugged mode while i run the program without debugged, It is failing to generate any file.
Also in that case y sy-subrc is also not changing.
Edited by: Sameer Desai on Sep 3, 2009 6:38 AM
‎2009 Sep 03 12:39 PM
Code:
call function 'GUI_DOWNLOAD'
exporting
filename = lv_in
filetype = 'ASC'
tables
data_tab = it_string[]
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
others = 22
.
if sy-subrc = 0.
Creating encryption command
clear: lv_file.
concatenate lv_in lv_out 'e' into lv_file separated by space.
clear: lv_exe.
move x_zkotakadmin-exe to lv_exe.
translate lv_exe to upper case.
call method cl_gui_frontend_services=>execute
exporting
application = lv_exe
parameter = lv_file
exceptions
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
others = 10.
if sy-subrc = 0.
call method cl_gui_frontend_services=>file_delete
exporting
filename = lv_in
changing
rc = lv_return
exceptions
file_delete_failed = 1
cntl_error = 2
error_no_gui = 3
file_not_found = 4
access_denied = 5
unknown_error = 6
not_supported_by_gui = 7
wrong_parameter = 8
others = 9.
endif.
endif.
‎2009 Sep 03 12:50 PM
Hello Sameer,
Are you executing the program in online or background mode ?
Just FYI, it will not run in background mode.
BR,
Suhas
‎2009 Sep 03 12:52 PM
HI,
I'm running in online only... not in background.
Regards,
Sameer