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

call function 'GUI_DOWNLOAD'

Former Member
0 Likes
756

hi all,

i have a small doubt. im supposed to download to the client the text file with the header line.

call function 'GUI_DOWNLOAD'

exporting

    • BIN_FILESIZE =

filename = 'c:/data.txt'

FILETYPE = 'ASC'

    • APPEND = ' '

WRITE_FIELD_SEPARATOR = 'X'

HEADER = '00'----


>wanna know whether i can use this to give a header line. what exactly does paramter mean and what r the available options.

    • TRUNC_TRAILING_BLANKS = ' '

    • WRITE_LF = 'X'

    • COL_SELECT = ' '

    • COL_SELECT_MASK = ' '

    • DAT_MODE = ' '

    • CONFIRM_OVERWRITE = ' '

    • NO_AUTH_CHECK = ' '

    • CODEPAGE = ' '

    • IGNORE_CERR = ABAP_TRUE

    • REPLACEMENT = '#'

    • WRITE_BOM = ' '

    • TRUNC_TRAILING_BLANKS_EOL = 'X'

    • IMPORTING

    • FILELENGTH =

tables

data_tab = i_chqs.

Thanks A lot.

Santosh Kotra.

hi all,

i have a small doubt. im supposed to download to the client the text file with the header line.

call function 'GUI_DOWNLOAD'

exporting

    • BIN_FILESIZE =

filename = 'c:/data.txt'

FILETYPE = 'ASC'

    • APPEND = ' '

WRITE_FIELD_SEPARATOR = 'X'

HEADER = '00'----


>wanna know whether i can use this to give a header line. what exactly does paramter mean and what r the available options.

    • TRUNC_TRAILING_BLANKS = ' '

    • WRITE_LF = 'X'

    • COL_SELECT = ' '

    • COL_SELECT_MASK = ' '

    • DAT_MODE = ' '

    • CONFIRM_OVERWRITE = ' '

    • NO_AUTH_CHECK = ' '

    • CODEPAGE = ' '

    • IGNORE_CERR = ABAP_TRUE

    • REPLACEMENT = '#'

    • WRITE_BOM = ' '

    • TRUNC_TRAILING_BLANKS_EOL = 'X'

    • IMPORTING

    • FILELENGTH =

tables

data_tab = i_chqs.

Thanks A lot.

Santosh Kotra.

4 REPLIES 4
Read only

Former Member
0 Likes
624

Hi

You can use HEADER parameter only for BINARY file (so not ASCII): it's used to indicate informations like code page.

Max

Read only

Former Member
0 Likes
624

The particular parameter is not for header but there is another table parameter for Fileheader, but it works only for filetype DBF.

Regards

Anurag

Read only

athavanraja
Active Contributor
0 Likes
624

if you want to have header for your columns, first call gui_download with just the header and then call gui_download again with parameter APPEND= 'X' and data table to the same file

Regards

Raja

Read only

0 Likes
624

Dear Santosh,

'Header' parameter in FM 'GUI_DOWNLOAD' is not meant for inserting a table header, rather 'this parameter enables you to place individual bytes in front of data in the case of a binary download'.

To put the header line in download table, you have 2 options.

1. If your file type is 'DBF', use parameter 'FIELDNAMES'.

2. What I use commonly to enter columnnames in internal table is like this.

types : begin of ztype,

dat1(10) TYPE c,

dat2(15) TYPE c,

dat3(10) TYPE c,

dat4(15) TYPE c,

end of ztype.

data : itab type standard table of ztype,

wa type ztype.

wa-dat1 = 'Test1'.

wa-dat2 = 'Test2'.

wa-dat3 = 'Test3'.

wa-dat4 = 'Test4'.

INSERT wa INTO itab INDEX 1.

call FM 'GUI_DOWNLOAD' with data_tab = itab

Hope this solves your problem.

Regards.

<i>Awarding Points for Helpful Answers is a Good way of saying Thanks. </i>