2009 Apr 29 6:41 PM
i´m trying to download some records from internal table using GUI_DOWNLOAD. but, when the function was execute, i received just one line in the file.
anyone knows what happening?
check if you are passing the header line or the whole table to gui_download
if that does not solve ur issue search in SCN with key words line feed carriage return.
2009 Apr 29 6:43 PM
check if you are passing the header line or the whole table to gui_download
if that does not solve ur issue search in SCN with key words line feed carriage return.
2009 Apr 29 7:16 PM
i´ve passed internal table not header line.
by the way, i´m testing in function module (se37).
thanks
2009 Apr 29 7:19 PM
in se37 it would show you single line.. try it in a program it will give you the whole table output.
[Search for sample codes:>:>:>|https://forums.sdn.sap.com/search.jspa?q=gui_download&dateRange=last90days&searchID=25511009&rankBy=10001&start=0]
2009 Apr 29 7:20 PM
Hi,
Try this code
DATA : w_file_path TYPE string.
w_file_path = p_p_per.
Function module to download the file to PC path
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w_file_path " Path
filetype = 'ASC'
trunc_trailing_blanks_eol = ' '
TABLES
data_tab = p_t_personal " Internal table with data
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.
Regards
Krishna
2009 Apr 29 7:36 PM
i´ve tried to do this, but it didn´t work!
i´m thinking there is some customizing to do for basis. i did the same test, using sm37, in two enviroment different and one works well and the other no.
thanks.
2009 Apr 30 7:00 AM
Hi,
open the file in the notepad, click on format and then click on word wrap.... may be that might be the problem...
Regards,
Siddarth
2009 Apr 29 8:27 PM
Hey.
This can help you.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'D:\NE\TEST.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
IMPORTING
FILELENGTH = fsize
HEADER =
TABLES
DATA_TAB = itab.
*EXCEPTIONS
Thanks and Regards,
Krishna Chaitanya G
2009 Apr 30 6:20 AM
Hi,
Try this code
DATA: lv_filetype(10) TYPE c,
lv_gui_sep TYPE c,
lv_file_name TYPE string.
lv_filetype = 'ASC'.
lv_gui_sep = 'X'.
lv_file_name = pa_filep.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file_name
filetype = lv_filetype
write_field_separator = lv_gui_sep
TABLES
data_tab = tb_output1_file
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "gui_download
Hope it helps.
Regards,
Manish
2009 Apr 30 6:54 AM
Kindly use
"v_filetype = 'DAT'.
ur problem will be solved...rest the above response are same
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |