‎2020 Nov 01 1:00 PM
Hi Experts,
I use "execute method" in "cl_gui_frontend_services class" for encrypting my text file. it is working when folder does not have space
lv_param = 'C:\Users\myname\Desktop\PA\File.txt'.
lv_default = 'C:\Users\myname\Desktop\PA\'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'C:\EncryptFile.jar'
parameter = lv_param
default_directory = lv_default
maximized = 'X'
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.
This code is working.
If My folder has space as code below ('C:\Users\myname\Desktop\P A\File.txt'). It is not working
There is space between "P" and "A"
lv_param = 'C:\Users\myname\Desktop\P A\File.txt'.
lv_default = 'C:\Users\myname\Desktop\P A\'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'C:\EncryptFile.jar'
parameter = lv_param
default_directory = lv_default
maximized = 'X'
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.
What can I do for solving this problem when my folder has space?
‎2020 Nov 01 1:26 PM
Hello,
use quotation marks ("...").
It should work this way:
lv_param ='"C:\Users\myname\Desktop\P A\File.txt"'.
lv_default ='"C:\Users\myname\Desktop\P A\"'.
‎2020 Nov 01 1:26 PM
Hello,
use quotation marks ("...").
It should work this way:
lv_param ='"C:\Users\myname\Desktop\P A\File.txt"'.
lv_default ='"C:\Users\myname\Desktop\P A\"'.
‎2020 Nov 01 1:33 PM