Skip to Content
0
Former Member
Mar 01, 2006 at 05:41 AM

Excel display on user command in a report

55 Views

hi fiends.

following is my code for putting Internal table data to Excel file...it is doing well..

but now i want to display that excel file from same list by pressing Entr Key ...Plz Help..

tables : mseg.

Data : begin of itab occurs 0,

matnr like mseg-matnr,

menge like mseg-menge,

end of itab.

parameters : docno like mseg-mblnr.

set pf-status 'MENU'.

select * into corresponding fields of table itab from mseg

where mblnr = docno.

write : 'Material Quantity' , / .

loop at itab.

write : / itab-matnr, itab-menge .

endloop.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'D:\abc.xls'

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

tables

data_tab = itab

.