01-09-2007 3:27 PM
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.
01-10-2007 6:36 AM
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.
01-10-2007 6:36 AM
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.
01-11-2007 12:21 AM
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