Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Passing column headers in cl_gui_frontend_services=>gui_download

Former Member
0 Kudos

How to pass the coulumn headers in in the internal table while down loading it to a excel file by using method cl_gui_frontend_services=>gui_download


Active Contributor
0 Kudos

Hi Srini,

I think you have to have the header as the first line of the internal table.



0 Kudos


I thought about that .But I am not able to locate some code sample. Can you pl?

0 Kudos

For having the header in the same internal table, all the fields must have type C. Fill the fields with the header text and insert at index 1.

CALL METHOD cl_gui_frontend_services=>gui_download


filename = Your file name

filetype = 'TXT'


data_tab = i_data


file_write_error = 1

no_batch = 2



Pls also refer the following



0 Kudos

Thanks Vinod.

But the requirement is to have the field description length more than the internal table field size.

I found another way of solving this.

I called the same method twice .In the first call pass a internal table only with filed descriptions and in the second call with another table with values (this call is in the append mode).

Please let me know if any other way of doing this work around.

0 Kudos

what you can do is first download a itab which only holds one record with just headings.

then again download another itab with data to the same file location in <b>append mode</b> . (import parameter append = 'X' )

This is how i have handled this issue.



0 Kudos

I think this is fine.

Former Member
0 Kudos


For column headers define a table with all the field names type c value 'field name'.

Define another table of type output table.

Then pass the fieldnames into this output table and then populate the values in the output table to the new output table.

Now this table contains all the dats with header as the index 1.

I did like this. U can try this out.

Thanks & Regards,