cancel
Showing results for 
Search instead for 
Did you mean: 

Determine URL of original in DMS

Former Member
0 Kudos

Hello,

Could anyone explain how I can determine the URL of an original file which is stored in the SAP Content Server using DMS?

I want to send this URL to an web application, where an user should be able to view the file using the URL.

Which function module or bapi should I use?

Thanks in advance

Johan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Did you find a solution for this because I'm having the same situation

Former Member
0 Kudos

Hi Tim,

Did you find the solution ?

Regards

Saumya

Former Member
0 Kudos

You can use Function module SDOK_PHIO_GET_URL_FOR_GET

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Johan,

maybe the function module 'C_DESK_DOC_GET_URL' could be useful for you to get the required URL.

Best regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

thanks for the quick answer, but this function module does not return the complete URL.

I have already tried the function module CVAPI_DOC_VIEW which return almost the whole URL.

But I am still looking for the function module or bapi which will give the correct result.

Hopefully you can help me out.

Kind regards,

Johan

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Johan,

I regret that the mentioned function module could not be usefule for you. The problem is that in the standard you should not be able to access the original file directly on the content server. Maybe the BAPI Document_CheckOutView2 could be useful too for displaying originals. In some cases I use also report DMS_KPRO_READ to download files form the content server. Maybe the coding of this report could also help you.

Best regards,

Christoph

Former Member
0 Kudos

Function SDOK_PHIO_GET_URL_FOR_GET works perfectly, but you need a fair bit more to make it work nicely:


We have implemented logic that creates a sicf service that takes four, optionally five parameters

(doc type, number, part, version, with description optional).


This will do an authorisation check for reading documents, checks for ACC and ACL, and then does a http redirect to the URL generated by SDOK_PHIO_GET_URL_FOR_GET).

The URL is time limited, and hence should not pose a great security risk. What is stored in other systems is the parameterised url, roughly like this:

http://sapproduction/sap/bc/bsp/sap/zdms_orig_redir?dokar=ZZZ&dokno=12345&doktl=000&dokvr=01&descr=C...

The logic of generating this URL is made available in easyDMS, and as "you can also" service in PLM7 for documents, document search list and a custom button in the documents POWLs.


Former Member
0 Kudos

Hi Chirstoph,

I am beginner ,the BAPI Document_CheckOutView2  asks for a path and downloads the files there .My requirement is to get the image from the content server via browser using HTTP URL to use it in UI. I also used the function

SDOK_PHIO_GET_URL_FOR_GET  which has two importing parameters

CALL FUNCTION 'SDOK_PHIO_GET_URL_FOR_GET'

           EXPORTING

                object_id              = lf_phio

*         REQUESTED_COMPONENTS   =

*         CLIENT                 = SY-MANDT

*              standard_url_only      = 'X'

*         DATA_PROVIDER_URL_ONLY =

*         URL_LIFETIME           =

          IMPORTING

               urls                   = lt_url

               document_url           = lf_doc_url

          EXCEPTIONS

               not_existing           = 1

               not_authorized         = 2

               no_content             = 3

               bad_storage_type       = 4

               no_urls_available      = 5

               OTHERS                 = 6.

  

when I use this  lt_url  gives SAP internal URL which cannot be used in browser whereas lf_doc_url  gives HTTP url . When i use this http url in browser it shows 'SSF error: Decoding not possible'  . I even used CALL_BROWSER function to call lf_doc_url but still the same error appears.


Can you please guide me how can i get the image from DMS through the browser so that i can consume in my UI.

Regards,

Sujeet .