Skip to Content
0
Former Member
May 13, 2008 at 11:06 AM

regarding header proble in FM GUI_download.

22 Views

Hi,

I want to write header in XL file by using the paramter fieldnames, but the FM is not considering full text what i m giving ,

please see the below code

*

*To download

DATA : BEGIN OF t_header OCCURS 0,

name(100) TYPE c,

END OF t_header.

DATA : BEGIN OF itab OCCURS 0,

fld1(100) TYPE c,

fld2 TYPE char10,

fld3 TYPE char10,

END OF itab.

DATA: v_pass_path TYPE string.

itab-fld1 = 'Hi'.

itab-fld2 = 'hello'.

itab-fld3 = 'welsuresh'.

APPEND itab.

CLEAR itab.

itab-fld3 = 'welcome'.

APPEND itab.

t_header-name = 'Field1 for sure and ucb and acc'.

APPEND t_header.

t_header-name = 'Field2'.

APPEND t_header.

t_header-name = 'Field3'.

APPEND t_header.

v_pass_path = 'P:\Suresh\UCB\Incidents\INC - sanjay - pooja\File from pooja\suresh.xls'.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = v_pass_path

filetype = 'DBF' " This is important

*for XL download

APPEND = 'X'

  • WRITE_FIELD_SEPARATOR = 'X'

header = '00'

  • TRUNC_TRAILING_BLANKS = ' '

WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = 'X'

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = itab

fieldnames = t_header.

thanks,

Suresh