Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table to Excel

Former Member
0 Kudos

Hello.

I need to save my internal table data to an excel file. Is there any useful function module to do this???

Thanks.

9 REPLIES 9

Former Member
0 Kudos

Hi,

create the output in ALV-Grid, change layout to excel and save the excel-sheet.

Regards, Dieter

0 Kudos

I've used WS_EXCEL and it works fine.

Thanks anyway.

0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

what is gd_layout?
Does it gives straightforward excel output?

 

0 Kudos

there is manual process, but could you provide a code to do it.

Former Member
0 Kudos

The function module WS_EXCEL is obsolete.

Former Member
0 Kudos
 Use the Function Module -   "ALSM_EXCEL_TO_INTERNAL_TABLE".

Regards

Ganesh Reddy.

The requirements was for Internal Table -> Excel.

Not Excel -> Internal Table.