12-23-2004 8:47 AM
hi ,
how can i download an internal table into an excel file.
Regards
Arun
12-23-2004 8:52 AM
During debuggin right click and choose option save as excel or if you want to do it thru program you can use gui_download to do the job.
Regards
Raja
12-23-2004 8:55 AM
12-23-2004 8:59 AM
Then you can use FM GUI_DOWNLOAD to do the job. This has been discussed many times in the forum . search the forum for code sample. its simple.
REgards
Raja
12-23-2004 9:19 AM
Hi ,
my requirement is that i want each field of the internal table to be in seperate col of the excel document.
e.g my internal table is
123 abc
456 dcg
my output must be
123 | abc
456 | dcg
12-23-2004 9:34 AM
Yes this function can do that.
just pass the filename with extension .xls and the itab.
Raja
12-23-2004 11:22 AM
Hi,
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = 'd:\cps_data1.xls'
filetype = 'DAT'
mode = 'A'
TABLES
data_tab = intab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
here intab is your internal table name.
Try this. it will help.
Regards,
Kathir
12-23-2004 2:17 PM
Hi Arun
Use the FM "RH_START_EXCEL_WITH_DATA" if your system has it.
<i>As another thing, let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)</i>
Kind regards...
*--Serdar