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: 

Archivelink: how to compose custome URL for not certified content server.

Geert_Steyaert
Explorer
0 Kudos

Hi,

I have an Archivelink config problem.

I'm tasked to set up a standard scenarion, FI document to scanned invoice image linkage. The problem is that the images are on a non-certified Content server.

In fact the contentserver is nothing more than an webserver. And the images are simply stored as documents on the webserver:

eg. http://a.b.c.d/DocImages/1295/2006/06/20060627_29000006.tif provides a valid image. No authentication needed.

I have set up my contentrepository as HTTP content server, and filled out "/DocImages/" as HTTP script. THe invoices are getting posed in SAP via iDocs. In the inbound function module I'm adding a valid record in the TOA01 table for the right BKPF document reference and I'm giving

"1295/2006/06/20060627_29000006.tif" as ADI DOC ID. Now I configured the ALviewer, in the application maintenance to try to have a simple concatenated URL used for doc retrieval.

The actual problem is that I'm always getting a "proper" SAP ArchiveLink protocol URL generated, such as http://a.b.c.d/DocImages/?get&pVersion=0045&contRep=ZD&docId=1295%2F2006%2F06%2F20060627_29000006.ti...

I tried using @URL or @DID in the "displayed stored document", "retrieval for frontend" and "display local file" function in my custom protocol. I've used Comm. type "HTTP". Also tried "Archivelink" and "open" but no luck

How could I make it work ? Are there other parameters I can change to influence the URL composing. The only thing I can think of is using a different viewer. But still, how do I pass, say Internet Explorer or other tool the correct URL ?

Adding a script to the webserver is the last resort, but changes are very inflexible there

Anyone can help/has experience ?

Thanks,

Geert Steyaert

8 REPLIES 8

Former Member
0 Kudos

Hi Geert,

I don't really recommend this non-standard scenario since you get the SAP content server with a regular ArchiveLink interface for free. This would be the best solution. You could migrate your documents since you have all TOA01 entries with the links.

Now, for your scenario you could use the ARCHIVOBJECT_DISPLAY user exit (being registered in table TOAEX). Here, you get all TOA01 information in the import parameters. Then you can implement your own viewing using this user-exit. You can generate your URL and you call the function module 'CALL_BROWSER'.

Best regards

Torsten

0 Kudos

Hi Torsten,

I agree, the SAP solution works fine and is free but the (poor man's) DMS we're trying to hook into is part of a whole Scanning system/Invoice verification loop and having them to use a SAP content server as a repository is too far fetched.

On the User Exit, indeed that seems to be the solution. Now I was looking into the code for ARCHIVEOBJECT_DISPLAY and they are referring to a sample functionmodule implementing this user exit which should be present in the system. But that sample code is not there ... I checked on multiple systems/versions of R/3 and in all is the table TOAEX empty, not even non-active entries.

Basically I would like all existing functionality (protocols, applications, etc) but the generation of the URI should be in my hands ...

Any idea where to get that sample code from ? Or is that bit of comment in the code still a relic of the past ?

Cheers,

Geert

0 Kudos

ABAP LOPTAU02 contains a call to that function.

On the other hand, I do not see what the rules are for EXIT_ID.

0 Kudos

Sorry, my reply was not very productive.

ABAP LOPTAU02 is precisely function ARCHIVEOBJECT_DISPLAY.

Torsten has made an interesting contribution some weeks ago in

I quote:

---

It [= the function we would have to write] is provided with the DOC_ID, CREP_ID, DOC_TYPE and some more parameters. From here you have access to the content via SCMS_AO_STATUS, SCMS_AO_TABLE_GET* and then you have to present the content.

---

0 Kudos

Some update :

Usage of the User Exit is not that good as it it's quite high up in the program chain. To me it's better to use the customer exit (SALIN001) I've found in function module "ARCHIVELINK_FUNCTION". That Cust. exit is called for protocol types OPEN and OPEN_V_URL. In there I've coded the URL composition as I need for the external web/image server.

----


  • INCLUDE ZXOAMU01 *

----


IF aid = 'ZD' AND method ='CDDC'.

DATA: url_higher TYPE string.

DATA: toaar_higher TYPE string.

DATA: host TYPE string.

DATA: script TYPE string.

FIELD-SYMBOLS <fs1> TYPE ANY.

FIELD-SYMBOLS <fs2> TYPE toaar.

url_higher = '(SAPLOPTM)URL'.

toaar_higher = '(SAPLOPTM)TOAAR'.

ASSIGN (url_higher) TO <fs1>.

ASSIGN (toaar_higher) TO <fs2>.

host = <fs2>-http_serv.

script = <fs2>-script.

CONCATENATE 'HTTP://' host script did INTO <fs1>.

CALL FUNCTION 'WS_EXECUTE'

EXPORTING

commandline = <fs1>

program = 'mspview'

EXCEPTIONS

frontend_error = 01

no_batch = 02

prog_not_found = 03

illegal_option = 04.

ENDIF.

RAISE exit.

It's very rudimental coding, but I don't consider myself an ABAPer at all ... It's more a PoC.

One thing I don't particularly don't like is, to have to call the Microsoft Office Image Viewer manually, hardcoded. I've been trying via SOLE and SOLI to add the proper OLE object to the tables and configure the protocol to make use of the new OLE objects. But no luck

I've tried with object "MiDocViewer.MiDocView", property "filename" and with object "MODI.Document", method "create". NO luck with both.

Does anyone has experience setting up custom OLE applications and integrating them in Archivelink protocol/application customizing (Method, Set and Get) ??

That would allow proper customizing instead of ugly hardcoding.

Thanks,

Geert

Former Member
0 Kudos

You could try to omit the 'program' argument from the function call to 'ws_execute'. This will force Windows to decide by itself.

0 Kudos

in this case the commandline is a normal URL. But nothing happens when I omit the 'program'. Not Firefox or any other browser or image viewer are being started.

So I guess I'll have to keep the 'program' arg. in.

if I create an shortcut to the same URL, then the browser is started and automatically the image viewer, so no problem there.

I really would like to go to proper OLE route, that would allow the SAP way of working. There are some OSS notes on Application Maintanance in ArchiveLink but all on 'existing' preconfigured applications. Something news as the Microsoft Office Document Image viewer is not described. Any experienced OLE/ArchiveLink specialists out there ?

0 Kudos

Well, then, if the old-fashioned function-module WS_EXECUTE doesn't cut it, let's try something OO, as in the following sample program (which works!):

(we do not determine the "program" - we send the URL to the desktop and that's it)

report zztmp_fese .

parameter p_line(255) lower case

default

'http://www.eandis.be/nl/07_publicaties/pdf/kennismakingsbrochure.pdf'

.

data document type string.

move p_line to document.

call method cl_gui_frontend_services=>execute

exporting

document = document

synchronous = 'X'

exceptions

others = 1.

call method cl_gui_cfw=>flush

exceptions

others = 1.