Skip to Content
0
Former Member
May 10, 2011 at 03:48 PM

How to access GOS attachment via URL

1094 Views

Hi Expert,

I have upload a image to a businees object using GOS. Where is the image stored? And How can I access the image via URL?

I can read the image as binary data tab, but I want to generate URL for the attachment so that I can use the attachment in lots of applications simply.

The following is the way I deal with the employee photo, and I just want to know if there is any way to deal with attachment in GOS. Thanks a lot

-


code begin----


CALL FUNCTION 'HR_IMAGE_EXISTS'

EXPORTING

p_tclas = tclas

p_pernr = pernr

IMPORTING

p_exists = l_exists

p_connect_info = l_connection

EXCEPTIONS

OTHERS = 2.

IF sy-subrc <> 0 OR l_exists = '0'.

EXIT.

ENDIF.

l_input-command = 'get'.

l_input-contrep = l_connection-archiv_id.

l_input-docid = l_connection-arc_doc_id.

l_input-accessmode = 'r'.

DATA l_url TYPE saeuri.

CALL FUNCTION 'ARCHIVELINK_URL_GENERATE'

EXPORTING

input = l_input

IMPORTING

absolute_uri = l_url

EXCEPTIONS

undefined = 1

error_parameter = 2

OTHERS = 3.

-


code end----


Best Regards,

Guo Guo Qing