cancel
Showing results for 
Search instead for 
Did you mean: 

ARCHIVOBJECT_GET_URI

04-16-2009 12:31 PM
1889 views 5 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello,

We are experiencing problems to open attached ZIP files in SAP purchasing documents (Purch Reqs & POu2019s) that are stored in our Content Server.

The currently allowed document types according to ArchiveLink configuration are PDF, DOC; XLS, PPT, TIF, and ZIP. There are no problems while opening any document type, but for ZIP files.

The problem appears when we call standard SAP Bapi ARCHIVOBJECT_GET_URI from a customized function module (ZMM_LINK_DOCUMENTS_CS) in an external application to get the ZIP file from content server, and convert it into a binary coding, that can be read from our external application. System is not able to open Zip file.

Could you help us?

Thanks in advance,

Angel.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

RieSe
Contributor
0 Likes

Hi,

please try following:

there is a class called cl_abap_zipper. Its very handy to use. Try to get the files in the zip within this

class.

If you may get the content of the zip file in form of an internal table based on the knowledge provider structure sdokcntbin, the following coding may help:

on_initialization:

data:

file_content_binary type sdokcntbin,

file_content_binaries

type table of sdokcntbin.

bytes_rest type i.

bytes_rest = file_size.

describe field file_content_binary-line length line_length in byte mode.

loop at file_content_binaries assigning <file_content_binary>.

move <file_content_binary>-line to data.

if bytes_rest <= 0. "mismatch between line values and size

exit.

endif.

if bytes_rest >= line_length.

call method server->response->append_data( data = data

length = line_length ).

else.

call method server->response->append_data( data = data

length = bytes_rest ).

endif.

bytes_rest = bytes_rest - line_length.

endloop.

Best regards,

Stefan

Former Member
0 Likes

Hi Stefan,

Thanks for your faster reply.

I think, i can this code in BSP page, but, with this funcion I only return the URL generate to asp application. This application call to Content Server and explorer navigator show the file (.tiff, .doc).

To zip show file, have I create a new bsp page?.

Thanks in advance,

Angel.

Answers (1)

Answers (1)

RieSe
Contributor
0 Likes

Hi Angel,

send me more Details and i can deliver you a code snippet.

Best regards,

Stefan

PS: don't hesitate to contact me via stefan.riedel-seifert @ infoserve.endress.com

(condense this to get the right address)

Former Member
0 Likes

Hi Stefan,

We have a Bapi ZMM_LINK_DOCUMENTS_CS that has how input parameters a document number (ebeln, Banfn).

With this parameters we call function ARCHIVOBJECT_GET_URI with corresponding bus (bus2105 or bus2012). This function module retruns a URL and we return this URL to .NET aplication.

This morning i have looking new parameter for ContentServer.dll and I have seen downloadAs parameter. If you add this parameter with downloadAs = .ZIP then explorer opens zip fily correctly.

Thanks for all.

Angel.

Former Member
0 Likes

Hi,

I am having the same issue with Excel file. I have also added downloadAs=.XLS parameter to my URL. Please look into the URL below:

http://10.1.25.105:1090/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=Z9&docId=26AE59514...

Let me know what I am missing.

Thanks,