Skip to Content
0
Former Member
Jun 22, 2007 at 05:49 AM

Problem with GUI_DOWNLOAD

866 Views

Hi !!

Iam using FM ''DDIF_FIELDINFO_GET' to get field names and short txt. after that iam moving all the short txt into an internal table (As aim interested only in the txt ). but whn i pass the itab to FM ''GUI_DOWNLOAD' in field names param, i get a dump. I have pasted my code below. Kindly help me.

DATA:

lt_dfies TYPE TABLE OF dfies,

lwa_dfies TYPE dfies,

lt_txt TYPE tttabname,

lwa_txt TYPE tabname.

CALL FUNCTION 'DDIF_FIELDINFO_GET'

EXPORTING

tabname = 'TRLS_POSITION_VALUE'

langu = sy-langu TABLES

dfies_tab = lt_dfies

EXCEPTIONS

not_found = 1

internal_error = 2

OTHERS = 3.

  • prepare Col Headers

LOOP AT lt_dfies INTO lwa_dfies.

lwa_txt = lwa_dfies-scrtext_s.

APPEND lwa_txt TO lt_txt.

ENDLOOP.

  • Download to excel

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE = l_fullpath

filename = l_fullpath

filetype = 'DAT'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • 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'

  • wk1_n_format = 'X'

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE

  • SHOW_TRANSFER_STATUS = ABAP_TRUE

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = l_tab_scrn

fieldnames = lt_txt.

Thanks,

Sri