Application Development and Automation 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: 
Read only

how to transfer data from a program to excel format?

Former Member
0 Likes
475

Hi,

<h4> I want to convert the abap output to excel format. Please tell me how to do it?</h4>

Megha Jain.

Hi,

<h4> I want to convert the abap output to excel format. Please tell me how to do it?</h4>

Megha Jain.

3 REPLIES 3
Read only

Former Member
0 Likes
435

Hi Megha,

What do you mean by 'DATA'. Are you talking about internal table?? If yes,

then use GUI_DOWNLOAD function module and pass the internal table to this FM. Specify the path of the file with extension '.xls'.


call function 'GUI_DOWNLOAD'
exporting
filename = 'C:\test\test.xls'
filetype = 'ASC'
write_field_separator = 'X'
tables
data_tab = it_tab
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
OTHERS = 5
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

where internal table 'IT_TAB' is having all the values.

Feel free to revert back in case of any doubts.

Cheers

VJ

Read only

Former Member
0 Likes
435

Hi,

If you want to get the output of the prog in xl format then refer the below link

http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm

Regards,

Shirisha

Read only

Former Member
0 Likes
435

Moderator message - Welcome to SCN. But please search the forum before asking a questiuon. This one is frequently asked. See also and - thread locked