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: 

Download of TIFF-Files from the Archive

0 Kudos

Hello,

I start a last try, to solve this problem with your help.

Starting point is, that there are attached consignment notes (from transports) in the Ixos-Archive. These consignment-notes are stored in the TIFF-format.

Now I want to download these consignment notes but I fail here.

I use the function module ARCHIVOBJECT_GET_TABLE to create binary dataset. Afterwards I transfer these datasets to 255-character-size and at last I download this dataset with GUI_DOWNLOAD to the presentation server.

Unfortunately I cannot open the downloaded TIFF-files I tried with various programs) 😞

              CALL FUNCTION 'ARCHIV_GET_CONNECTIONS'
EXPORTING
objecttype = 'VTTK'
object_id = l_object_id
TABLES
connections = lt_connections
EXCEPTIONS
nothing_found = 1
OTHERS = 2.
IF sy-subrc = 0.
READ TABLE lt_connections INTO lw_connections INDEX 1.
CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'
EXPORTING
archiv_id = lw_connections-archiv_id
document_type = lv_document_class
archiv_doc_id = lw_connections-arc_doc_id
signature = 'X'
compid = ifirstpage
IMPORTING
length = ilength
TABLES
archivobject = idoc
binarchivobject = idoc_binary
EXCEPTIONS
error_archiv = 1
error_communicationtable = 2
error_kernel = 3
OTHERS = 4.
CASE sy-subrc.
WHEN 0.
COMMIT WORK.
REFRESH itab.
CALL METHOD cl_rmps_general_functions=>convert_1024_to_255
EXPORTING
im_tab_1024 = idoc_binary[]
RECEIVING
re_tab_255 = itab[].
lv_filename_down = '\\C:\temp\frachtrief.tif'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* bin_filesize = bin_filesize
filename = lv_filename_down
* filename = '\\P1030.gruppe.local:\_Austausch\Factoring_ungarn\Download_Frachtbrief.TIF'
filetype = 'BIN'
IMPORTING
filelength = length
TABLES
data_tab = itab
* FORMAT_TAB =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6.
2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

For BINARY, you should use BINLENGTH, not LENGTH.

length or ilength variable name?

Also, what is the definition of IDOC_BINARY?

EDIT: you say 255 characters, but it should be 255 bytes, we're talking about TIFF, it's binary.

0 Kudos

Hello Sandra,

I have changed it now that way that the parameter binlength is given in the FM ARCHIVOBJECT_GET_TABLE (instead of parameter length) and that I pass this value to the FM GUI_DOWNLOAD.

Unfortunately this changes nothing at the situation: The file cannot be opened 😞

Error-Message: The photo cannot be opened because the file-format is not supported in the photo-display or the actual updates for the photo-display are missing.

Do you have anopther idea?

Kind regards

Udo