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: 

save the output of the abap report to local file in the pc

Former Member
0 Kudos
6,005

Hi ALL,

In my ABAP Report I am having a internal table with final data, right now I am moving that data to al11. but now I want to save that data in local PC as the file format given in the selection screen before executing the report.

CAn any one say how to do this or suggest me how to proceed please.

Ravi

1 ACCEPTED SOLUTION

Former Member
1,144

Hi Ravi,

You can use the function module GUI_DOWNLOAD to store in a file on PC.

CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
        filename         = file_path
        filetype         = 'ASC'
*       APPEND           = 'X'
        write_field_separator = 'X'
*       CONFIRM_OVERWRITE = 'X'
   TABLES
        data_tab         = it_finaltab     "need to declare and populate
   EXCEPTIONS
        file_open_error  = 1
        file_write_error = 2
        OTHERS           = 3.

Regards,

Chandra Sekhar

3 REPLIES 3

Former Member
0 Kudos
1,144

Use Gui_dowload. If you search the forum, you will find lots of related thread

Former Member
1,145

Hi Ravi,

You can use the function module GUI_DOWNLOAD to store in a file on PC.

CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
        filename         = file_path
        filetype         = 'ASC'
*       APPEND           = 'X'
        write_field_separator = 'X'
*       CONFIRM_OVERWRITE = 'X'
   TABLES
        data_tab         = it_finaltab     "need to declare and populate
   EXCEPTIONS
        file_open_error  = 1
        file_write_error = 2
        OTHERS           = 3.

Regards,

Chandra Sekhar

Former Member
1,144

Hi,

you can either use GUI_DOWNLOAD or WS_EXCEL to download the data from internal table to file.

Please reward if you find the answer useful.

Thanks,

Kamesh Bathla