Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode and download to BIN where not compatible

former_member210563
Participant
0 Kudos

Hi,

I have an internal table like this from older vers. 4.6C:

*Used in the Excel macro download

data: begin of bin_tab occurs 1,

record(1000) type x,

end of bin_tab.

The old WS_DOWNLOAD has been changed to GUI_DOWNLOAD.

The new table to download to is the described one from the doc:

Data:

gs_dataline type c,

new_data_tab LIKE STANDARD TABLE OF gs_dataline.

The filetype parameter in GUI_DOWNLOAD is set to BIN.

When I want to loop the new one into the old one, I get this message:

BIN_TAB is not type-compatible with format parameter DATA_TAB.

Any good ideas ?

Any help is appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Peter ,

Declare a workarea like this

DATA: BEGIN OF line_bin,

data(1024) TYPE X,

END OF line_bin.

DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.

  • Binary download

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = fullpath

FILETYPE = 'BIN'

IMPORTING

FILELENGTH = length

TABLES

DATA_TAB = data_tab_bin

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

Please reward if useful.

2 REPLIES 2

Former Member
0 Kudos

Hi Peter ,

Declare a workarea like this

DATA: BEGIN OF line_bin,

data(1024) TYPE X,

END OF line_bin.

DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.

  • Binary download

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = fullpath

FILETYPE = 'BIN'

IMPORTING

FILELENGTH = length

TABLES

DATA_TAB = data_tab_bin

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

Please reward if useful.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Peter

Please note that the function module GUI_DOWNLOAD has been marked as <i>obsolete</i> (see fm documentation) because it is not unicode-enabled. Instead use the static method <b>CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD</b> (and GUI_UPLOAD).

Regards

Uwe