header in 'gui_download'
I use 'GUI_DOWNLOAD' to download data from internal table to excel.I am passing the heading in the header field of function module.
call FUNCTION 'GUI_DOWNLOAD'
FILENAME = lv_file
FILETYPE = 'ASC'
write_field_separator = 'X'
header = lv_header
data_tab = t_output.
header is of type XTRING in the function module.
if i declare my variable as type string it shows a runtime dump due to type mismatch.
I am not able to declare it as type xstring.can anyone advice on how to declare a variable as type xstring or any other way to solve my problem.
Thanks & Regards,
Abhijeet Kulshreshtha replied
to download header call GUI_DOWNLOAD twice.
Once to download Header of the internal table and next time to download data of internal table,
Check this link, in this link I've posted one sample code
to download heading and data of internal table