cancel
Showing results for 
Search instead for 
Did you mean: 

Contorl Flush Error

Former Member
0 Kudos

Hello,

I am trying to export data from internal table to desktop in the excel format. Am using GUI_DOWNLOAD function module.but i get control_flush_error. AM not able to figure it out. My internal table has data.

any suggestions wud b appreciated.

thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Can you post some relevant code?

Regards,

Rich Heilman

Former Member
0 Kudos

I am calling this function module on a button event.

i am building up the internal table this way.

LOOP AT IT_ALL_OBJECT_KEY INTO obj_key.

select * from but000

into table keys

where partner = obj_key.

APPEND LINES OF KEYS TO ITAB.

endloop.

and then calling the function module

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

FILENAME = 'C:\Temp\contacts.xls'

FILETYPE = 'ASC'

  • APPEND = ' '

WRITE_FIELD_SEPARATOR = 'X'

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

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

DATA_TAB = ITAB

  • 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

.

hoping this might help u in understanding my problem

thanks

former_member214131
Active Contributor
0 Kudos

Hello,

1. Please make a check whether the Internal table has any record to download.

2. Change the File name to 'C:\TEMP\CONTRACTS.TXT'. Check the FM documentation (ASC/BIN) for details.

Hope this helps you.

Best Regards, Murugesh AS

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

This code is working fine in my system......



report zrich_0001 .

data: begin of itab occurs 0,
      a(20) type c,
      b(20) type c,
      c(20) type c,
      end of itab.

itab-a = '1'.
itab-b = '2'.
itab-c = '3'.
append itab.

itab-a = '10'.
itab-b = '20'.
itab-c = '30'.
append itab.

itab-a = '100'.
itab-b = '200'.
itab-c = '300'.
append itab.

call function 'GUI_DOWNLOAD'
     exporting
          filename                = 'C:testdownload.xls'
          write_field_separator   = 'X'
     tables
          data_tab                = itab
     exceptions
          file_write_error        = 1
          others                  = 22.

Regards,

Rich Heilman

Former Member
0 Kudos

Rich and Shailaja,

Please compare the versions of SAP GUI you are using. Often problems with interaction with the frontend relate to GUI problems. It may be that Shailaja needs to load some patch or upgrade the GUI.

Cheers,

Martin

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I am actually running a 6.40 gui over 46c system.

Regards,

Rich Heilman