07-02-2007 7:22 AM
hi,
i have to convert intertal table into text file , right now i am using SAP_CONVERT_TO_TEX_FORMAT but this FM what it is doing means
if my internal table having one space field's means it is suppressing that space also, my requirement is it should not suppress the space, is there is any FM
like this.
07-02-2007 7:26 AM
07-02-2007 7:26 AM
Hi ,
Use GUI_DOWNLOAD to download data in text file ....
Thanks & Regard's
Bhaskar Rao.M
07-02-2007 7:28 AM
You can use the Function Module : GUI_DOWNLOAD for that purpose.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_ofname
filetype = 'ASC'
write_field_separator = '|'
TABLES
data_tab = it_tab
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.
Regards
Gopi
07-02-2007 7:32 AM
hi,
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_ofname // path of file to be downloaded
filetype = 'ASC' or 'DAT' // type for storing it may be asc or dat format depends on your requirement
write_field_separator = '|' // for tab delimited option enable this option
TABLES
data_tab = <dyn_table> // internal table for downloading
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.
if helpful reward some points.
With Regards
Suresh.A