12-15-2009 6:25 AM
Hi experts,
I am using the FM GUI_DOWNLOAD to generate excel output of an internal table in excel sheet.
I am passing the name of the "filename" parameter as 'c:\mg.xls', and the name of the data_tab
parameter is itab_data.
PFB the code:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\mg.xls'
filetype = 'ASC'
append = 'X'
TABLES
data_tab = it_data
The problem is that if I do not delete the xls sheet from the C drive before running the FM again, it simply appends the new entry again (without deleting the previous one).
How to resolve this... I want the previous entries to be deleted.
Thanks,
Ajay.
12-15-2009 6:28 AM
12-15-2009 6:28 AM
12-15-2009 6:28 AM
12-15-2009 6:29 AM
Hi Ajay,
Change teh code as below :
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\mg.xls'
filetype = 'ASC'
append = ' ' " This will resolve your issue
TABLES
data_tab = it_data
12-15-2009 6:30 AM
Hi,
In the FM, you have given APPEND = 'X'. Comment this line.
It will work.
I hope it helps.
Regrds,
Radhika