Skip to Content
0
Former Member
May 12, 2005 at 01:49 PM

GUI_DOWNLOAD: problems with table containing char length 8000

83 Views

Hi

I have some problems using GUI_DOWNLOAD. Here is some of my code:

DATA: g_record TYPE Z_CHAR8000 OCCURS 0 WITH HEADER LINE.

  • z_char8000 is a char of length 8000

  • insert code to fill data in g_record 😊

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = g_filename

  • filetype = 'ASC'

filetype = 'BIN'

TRUNC_TRAILING_BLANKS = 'X'

TRUNC_TRAILING_BLANKS_EOL = 'X'

TABLES

data_tab = g_record

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.

An example of data in g_record:

Hans,Kruger,Berlin,Superstrass 3,0101709991,,,,,,,,,,,,

When I open the resulting file in notepad the above data is present, and that's a good thing! The bad thing is that for every entry I have in the g_record table the GUI_DOWNLOAD puts 8000 characters into the file (the data from g_record and trailing blanks so that the line becomes 8000 chars long). I dont want the trailing blanks and TRUNC_TRAILING_BLANKS dont seem to work. Have any of you had hte same problem and/or is there a solution?!

I have tried using filetype ASC and here I dont get the trailing blanks, but another problem hits me. I cant download more that 1024 characters from each entry in g_record and thats not good enough!

Regards Anders