2007 Jan 30 1:23 AM
Hi All,
Can you tell me how to place .EXE file in application server . Can you help me with code to upload the exe file on application server. Or Is there any another way to do it.
Thanks
Shan
2007 Jan 30 1:45 AM
Try this code.
REPORT zrich_0002.
DATA: idata_tab TYPE TABLE OF string.
DATA: xdata_tab TYPE string.
data: file1 type string.
PARAMETERS: p_file1 TYPE localfile DEFAULT 'c:sapcar.exe',
p_file2 TYPE localfile DEFAULT 'usrnspsyssapcar.exe'.
start-of-selection.
file1 = p_file1.
call method cl_gui_frontend_services=>gui_upload
EXPORTING
filename = file1
filetype = 'ASC'
CHANGING
data_tab = idata_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18.
OPEN DATASET p_file2 FOR OUTPUT IN BINARY MODE.
CHECK sy-subrc = 0.
LOOP AT idata_tab INTO xdata_tab.
TRANSFER xdata_tab TO p_file2.
ENDLOOP.
CLOSE DATASET p_file2.
Regards,
Rich Heilman
Hi All,
Can you tell me how to place .EXE file in application server . Can you help me with code to upload the exe file on application server. Or Is there any another way to do it.
Thanks
Shan
2007 Jan 30 1:45 AM
Try this code.
REPORT zrich_0002.
DATA: idata_tab TYPE TABLE OF string.
DATA: xdata_tab TYPE string.
data: file1 type string.
PARAMETERS: p_file1 TYPE localfile DEFAULT 'c:sapcar.exe',
p_file2 TYPE localfile DEFAULT 'usrnspsyssapcar.exe'.
start-of-selection.
file1 = p_file1.
call method cl_gui_frontend_services=>gui_upload
EXPORTING
filename = file1
filetype = 'ASC'
CHANGING
data_tab = idata_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18.
OPEN DATASET p_file2 FOR OUTPUT IN BINARY MODE.
CHECK sy-subrc = 0.
LOOP AT idata_tab INTO xdata_tab.
TRANSFER xdata_tab TO p_file2.
ENDLOOP.
CLOSE DATASET p_file2.
Regards,
Rich Heilman
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |