11-10-2008 4:07 PM
Hello.
I need to save my internal table data to an excel file. Is there any useful function module to do this???
Thanks.
11-10-2008 4:10 PM
Hi,
create the output in ALV-Grid, change layout to excel and save the excel-sheet.
Regards, Dieter
11-10-2008 4:29 PM
11-10-2008 6:39 PM
You shouldn't use WS_EXCEL.
I use: REUSE_ALV_GRID_DISPLAY
It is very easy to build an excel output with this FM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = MYREPORT
is_layout = gd_layout
it_fieldcat = gd_fieldcat[]
i_save = 'X'
TABLES
t_outtab = ITAB
EXCEPTIONS
program_error = 1
others = 2.
Good luck.
SL
11-10-2008 4:14 PM
Use the function GUI_DOWNLOAD
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w_path
filetype = 'DAT'
TABLES
data_tab = it_tab_exp
EXCEPTIONS
file_open_error = 01
file_write_error = 02
invalid_filesize = 03
invalid_table_width = 04
invalid_type = 05
unknow_error = 07.
03-15-2024 9:36 AM
03-15-2024 9:35 AM
11-10-2008 4:33 PM
11-10-2008 7:57 PM
Use the Function Module - "ALSM_EXCEL_TO_INTERNAL_TABLE".
Regards
Ganesh Reddy.
11-10-2008 8:24 PM
The requirements was for Internal Table -> Excel.
Not Excel -> Internal Table.