Application Development and Automation 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: 
Read only

getting url from content server with sdok-framework (kpro/dms)

Former Member
0 Likes
1,321

hi,

I am trying to get an url for a document with the fm SDOK_PHIO_GET_URL_FOR_PUT but it returns no result.

I feed the fm with an SDOK_CLASS (thats the phio class?) and a SDOK_DOCID (is this the PHIO?).

I have the PHIO and LOIO (both for KPro DMS) and the DOKNR (SAP DVS) but I can´t get the url to my existing document.

has anyone an idea?

or how can I find out where I could find the correct SDOK_CLASS and SDOK_DOCID from my existing document?

thank you very much.

You can get the URL as below:

DATA ls_objectid TYPE sdokobject.
DATA lv_phid     TYPE sdok_phid.

*Get your physical ID here
*lv_phid = <<physical id>>.

ls_objectid-class = 'DMS_PCD1'.
ls_objectid-objid = lv_phid.

CALL FUNCTION 'SDOK_PHIO_GET_URL_FOR_PUT'
  EXPORTING
    object_id         = ls_objectid
    client            = sy-mandt
  IMPORTING
    document_url      = lv_url
  EXCEPTIONS
    not_existing      = 1
    not_authorized    = 2
    not_allowed       = 3
    bad_storage_type  = 4
    no_urls_available = 5
    OTHERS            = 6.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF
3 REPLIES 3
Read only

Johnny_B_
Active Participant
0 Likes
930

Hello Thorsten,

have you solved the problem meanwhile ? if not, let me know i had the same issue and it is now solved.

Johannes

Read only

Former Member
0 Likes
930

Hello Johannes,

i have the same problem can you help with your solution please..

thanks in advances

massimo

Read only

Mohamed_Yousuf1
Participant
0 Likes
930

You can get the URL as below:

DATA ls_objectid TYPE sdokobject.
DATA lv_phid     TYPE sdok_phid.

*Get your physical ID here
*lv_phid = <<physical id>>.

ls_objectid-class = 'DMS_PCD1'.
ls_objectid-objid = lv_phid.

CALL FUNCTION 'SDOK_PHIO_GET_URL_FOR_PUT'
  EXPORTING
    object_id         = ls_objectid
    client            = sy-mandt
  IMPORTING
    document_url      = lv_url
  EXCEPTIONS
    not_existing      = 1
    not_authorized    = 2
    not_allowed       = 3
    bad_storage_type  = 4
    no_urls_available = 5
    OTHERS            = 6.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF