Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

header in 'gui_download'

Hi All,

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'

EXPORTING

FILENAME = lv_file

FILETYPE = 'ASC'

write_field_separator = 'X'

header = lv_header

TABLES

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,

Subasree

Tags:
replied

Hi,

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

How to create column header text while downloading file

Regards

Abhijeet

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question