on 03-31-2007 9:59 AM
Hi all KM Experts
I am developing an application in WebDynpro for displaying search results.
Now in search results I can show the documents links.
But my requirement is, when user clicks on the link, that document should get opened. I mean if it is doc file then in MS Word, if it pdf then in Adobe acrobat Reader etc.
Please tell me how to code this.
Points will be awarded for helpful answers.
Hi,
If you use KM Document IView in your link to access your documents then they will be opened in respective applications (acrobat Reader / MS Word).
The mime types are all registered in Mime Handler Service and by default doc and pdf are already registered there.
http://help.sap.com/saphelp_erp2005vp/helpdata/en/07/b6b0d706fb44caab64750a0bdaba09/frameset.htm
So your link should look like:
https://portal.server/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/myfile.pdf
So if some one clicks on the above link, a pdf file is opened in Acrobat Reader.
Greetings,
Praveen Gudapati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should just build the path with KM Docs component in your custom IView.
Some thing like this will generate the required URL:
IURLGeneratorService urlGenService =
(IURLGeneratorService) ServiceFactory.getInstance().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
//Path to KM doc IView
String docsURI= urlGenService.getRelativeUri(PathKey.CONTENT_ACCESS_PATH).toExternalForm();
String urlPath = docsURI + pathToKMDocument
So show this urlPath as link in your search result.
Greetings,
Praveen Gudapati
[Points are always welcome for helpful answers]
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.