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

Move internal table to excel

Former Member
0 Likes
807

Hi,

I wont to now how i move data from internal table to Excel?

there is simple way to do it?

Regards

1 ACCEPTED SOLUTION
Read only

rahulkavuri
Active Contributor
0 Likes
782

Use GUI_DOWNLOAD.. tab seperator as X

Many sample codes for the above FM in SDN.. search for a sample

Hi,

Using GUI_download u can download into excel format

OR

call method cl_gui_frontend_services=>gui_download

exporting

filename = 'C:/test1.xls'

write_field_separator = 'X'

changing

data_tab = it_excel.

Hope this is helpful.

Plz reward points if helpful.

Thanks.

5 REPLIES 5
Read only

rahulkavuri
Active Contributor
0 Likes
783

Use GUI_DOWNLOAD.. tab seperator as X

Many sample codes for the above FM in SDN.. search for a sample

Read only

Former Member
0 Likes
782

Use this FM:

GUI_DOWNLOAD

Read only

Former Member
0 Likes
782

Hi,

Using GUI_download u can download into excel format

OR

call method cl_gui_frontend_services=>gui_download

exporting

filename = 'C:/test1.xls'

write_field_separator = 'X'

changing

data_tab = it_excel.

Hope this is helpful.

Plz reward points if helpful.

Thanks.

Read only

Former Member
0 Likes
782

Try with this FM SAP_CONVERT_TO_XLS_FORMAT

Read only

Former Member
0 Likes
782

hi use this...

&----


*& Report ZTESTPROG003

*&

&----


*&

*&

&----


REPORT ZTESTPROG003.

TYPES:

BEGIN OF ty_upload,

matnr like mara-matnr,

meins like mara-meins,

mtart like mara-mtart,

mbrsh like mara-mbrsh,

END OF ty_upload.

DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH header line.

DATA wa_upload TYPE ty_upload.

DATA: itab TYPE STANDARD TABLE OF alsmex_tabline WITH header line.

  • DATA itab TYPE STANDARD TABLE OF ty_upload WITH header line.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

filename = 'C:\Documents and Settings\venkatapp\Desktop\venkat.xls'

i_begin_col = 1

i_begin_row = 1

i_end_col = 4

i_end_row = 65535

TABLES

intern = itab.

if not itab[] is initial.

loop at itab .

case itab-col.

when '0001'.

it_upload-matnr = itab-value.

when '0002'.

it_upload-meins = itab-value.

when '0003'.

it_upload-mtart = itab-value.

when '0004'.

it_upload-mbrsh = itab-value.

append it_upload.

clear it_upload.

clear itab.

endcase.

endloop.

endif.

regards,

venkat.