2007 Sep 24 3:35 PM
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.
2007 Sep 24 3:39 PM
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
2007 Sep 24 4:17 PM
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
2007 Sep 25 8:34 AM
2007 Sep 24 3:42 PM
give the filetype as DBF and checkout if it works
GUI_Download accepts 8200 char length for a field.
Regards
vasu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |