Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Gui_Download

Problem with gui_download

I need to have a file like this input.

A800058000000500001

A800059205000000244

A800059205000000243

With the particularity of no existing spaces after last character in last line ( and cursor dont go to the other line )

But what i have is something like this:

A800058000000500001A800059205000000244A800059205000000243

I use this code:

-


OPEN DATASET file1 IN TEXT MODE ENCODING DEFAULT FOR OUTPUT.

IF sy-subrc = 0.

LOOP AT t_excel_interface.

TRANSFER t_excel_interface TO file1.

ENDLOOP.

ENDIF.

CLOSE DATASET file1.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = file1

filetype = 'BIN'

append = 'X'

  • write_field_separator = 'X'

  • HEADER = '00'

  • trunc_trailing_blanks = 'X'

  • 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 = t_excel_interface

  • FIELDNAMES =

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

  • NO_AUTHORITY = 5

  • UNKNOWN_ERROR = 6

  • HEADER_NOT_ALLOWED = 7

separator_not_allowed = 8

filesize_not_allowed = 9

  • HEADER_TOO_LONG = 10

  • DP_ERROR_CREATE = 11

  • DP_ERROR_SEND = 12

  • DP_ERROR_WRITE = 13

  • UNKNOWN_DP_ERROR = 14

  • ACCESS_DENIED = 15

  • DP_OUT_OF_MEMORY = 16

  • DISK_FULL = 17

  • DP_TIMEOUT = 18

  • FILE_NOT_FOUND = 19

  • DATAPROVIDER_EXCEPTION = 20

  • CONTROL_FLUSH_ERROR = 21

OTHERS = 22

-


Regards Vitor Feio

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question