Skip to Content
0
Former Member
Apr 15, 2008 at 09:49 AM

GUI_DOWNLOAD fieldnames

430 Views

Hi,

I am trying to use GUI_DOWNLOAD in v4.7 to create a file of vendor data with column headings. I am getting the file created with the right data but the headings are truncated to 10 bytes (the longest one is 15).

Here is my code:

*...

BEGIN of t_fieldnames,

field(20) type c,

END OF t_fieldnames.

DATA: i_vendor TYPE TABLE OF t_vendor,

i_fieldnames TYPE TABLE OF t_fieldnames,

wa_vendor TYPE t_vendor,

wa_fieldnames TYPE t_fieldnames,

v_file TYPE string.

*...

*then populate i_vendor

*...

*then for each field:

WRITE text-001 TO wa_fieldnames-field.

APPEND wa_fieldnames TO i_fieldnames.

*...

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = v_file

FILETYPE = 'DBF'

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = i_vendor

FIELDNAMES = i_fieldnames

I know I could code a workaround, by adding the headings to the first row of my internal table, but I am puzzled as to what is constraining the heading names to 10 bytes, especially as I've used this FM before without this problem. Any ideas?

Many thanks in advance,

Peter