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

GUI_DOWNLOAD

Former Member
0 Likes
594

Hi everybody. I use this function whit the fieldnames tab. This itab have 1 field, type string. But when I open the downloaded file, in the header only appear the 10 first characters. What happend? Thanks.

Hi everybody. I use this function whit the fieldnames tab. This itab have 1 field, type string. But when I open the downloaded file, in the header only appear the 10 first characters. What happend? Thanks.

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
552

In order to help you better, I would have to see your code, but here is an example of the use, notice here I am useing an internal table for the field names, and it is defined with 30 characters.

REPORT  zrich_0001.

TYPES: BEGIN OF t_fldnames,
       fldname(30) type c,
       END OF t_fldnames.

DATA: ifldnm TYPE TABLE OF t_fldnames WITH HEADER LINE.
DATA: ispfli TYPE TABLE OF spfli.

SELECT * INTO TABLE ispfli FROM spfli.

ifldnm-fldname = 'Client'.     append ifldnm.
ifldnm-fldname = 'Airline Code'. append ifldnm.
ifldnm-fldname = 'Flight Connection Number'. append ifldnm.
ifldnm-fldname = 'Country Key'.   append ifldnm.
ifldnm-fldname = 'Departure city'.  append ifldnm.
ifldnm-fldname = 'Departure airport'.  append ifldnm.
ifldnm-fldname = 'Country Key'.  append ifldnm.
ifldnm-fldname = 'Arrival city'.  append ifldnm.
ifldnm-fldname = 'Destination airport'.  append ifldnm.
ifldnm-fldname = 'Flight time'.  append ifldnm.
ifldnm-fldname = 'Departure time'.  append ifldnm.
ifldnm-fldname = 'Arrival time'.  append ifldnm.
ifldnm-fldname = 'Distance'.  append ifldnm.
ifldnm-fldname = 'Mass unit of distance (kms, miles)'.  append ifldnm.
ifldnm-fldname = 'Flight type'.  append ifldnm.
ifldnm-fldname = 'Arrival n day(s) later'.   append ifldnm.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = 'c:/test.xls'
    write_field_separator = 'X'
  TABLES
    data_tab              = ispfli
    fieldnames            = ifldnm.

Regards,

Rich Heilman

Read only

0 Likes
552

Thanks. I'll try explain better my problem. My code is equal (equivalent) than your:

TYPES: BEGIN OF gtyp_cabeceras,

column(50) TYPE c.

TYPES: END OF gtyp_cabeceras.

DATA: g_t_cabeceras TYPE STANDARD TABLE OF gtyp_cabeceras,

g_w_cabeceras TYPE gtyp_cabeceras.

g_w_cabeceras-column = 'Matr de coches'.

APPEND g_w_cabeceras TO g_t_cabeceras.

CLEAR g_w_cabeceras.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = l_file

filetype = 'DBF'

TABLES

data_tab = l_t_datos

fieldnames = g_t_cabeceras.

In the resultant excel file, the header must be "Matr de coches", but is "Matrdecoch" (condense and only the 10 first characters). Sorry, my english is very poor :S

Read only

0 Likes
552

up

Read only

Former Member
0 Likes
552

give the filetype as DBF and checkout if it works

GUI_Download accepts 8200 char length for a field.

Regards

vasu