03-22-2006 7:13 PM
Hello.
i would like to ask one favor, i am trying to write all the internal table informacion into a file(.txt .dat), i don't know how to do that, please if you have any information please send me one .
thanks a lor for you help.
03-22-2006 7:16 PM
Hello,
In order to download your internal table just call the following fm:
CALL FUNCTION 'TB_LIMIT_WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
filename = dest
filetype = 'ASC'
mode = 'O'
IMPORTING
filelength = filesi "Bytes read
TABLES
data_tab = p_ti_temp "your IT
EXCEPTIONS
file_write_error = 1
invalid_filesize = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
no_authority = 7
OTHERS = 8
Hope this helps
Gabriel
03-22-2006 7:17 PM
You must use <b>GUI_DOWNLOAD</b> -;)
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:File.txt'
TABLES
DATA_TAB = INTERNAL_TAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6.
Greetings,
Blag.
03-22-2006 7:17 PM
If you want to download the information to a desktop directory, then use function module GUI_DOWNLOAD with your internal table. If you want to download to the server directory, then use the following logic.
OPEN DATASET v_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT itab.
TRANSFER itab TO v_file LENGTH reclen.
ENDLOOP.
CLOSE DATASET v_file.
03-22-2006 7:19 PM
Hi,
you can download the Internal table data in to a local file using WS_DOWNLOAD or GUI_DOWNLOAD
<u><b>WS_DOWNLOAD -- ></b></u> Save Internal Table as File on the Presentation Server
use this link to know more
http://www.sapdevelopment.co.uk/file/file_updown.htm
Thanks
Sudheer
03-22-2006 7:34 PM
Actually...You should avoid the using of <b>WS_DOWNLOAD</b>...because it's obsolet...Always go for <b>GUI_DOWNLOAD</b> -;)
Greetings,
Blag.