Skip to Content
avatar image
Former Member

Employee photo in image field

Hi All,

I am working on Employee Bio-data form.Photos has been uploaded through OAAD transaction.

I am calling adobe from from print program(passing url of photo in interface parameter).

I got url link by using following function.

   CALL FUNCTION 'HR_IMAGE_EXISTS'
           EXPORTING
             P_PERNR                     = P_PERNR
*   P_TCLAS                     = 'A'
            P_BEGDA                     = SY-DATUM
            P_ENDDA                     = SY-DATUM
          IMPORTING
            P_EXISTS                    = IMAGE_EXISTS
            P_CONNECT_INFO              = IMAGE_INFO
          EXCEPTIONS
            ERROR_CONNECTIONTABLE       = 1
            OTHERS                      = 2
                   .
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CLEAR URI_TAB[].

  CALL FUNCTION 'ARCHIVOBJECT_GET_URI'
    EXPORTING
      OBJECTTYPE               = IMAGE_INFO-SAP_OBJECT
      OBJECT_ID                = IMAGE_INFO-OBJECT_ID
    TABLES
      URI_TABLE                = URI_TAB
    EXCEPTIONS
      ERROR_ARCHIV             = 1
      ERROR_COMMUNICATIONTABLE = 2
      ERROR_KERNEL             = 3
      ERROR_HTTP               = 4
      ERROR_DP                 = 5
      OTHERS                   = 6.

If i directly use that url in url field of imagefield or in form.ready event like

ImageField1.value.image.href = "url".photo is displayed.But if i pass varible which contains url value to ImageField1.value.image.href = "url_variable" or url field of an image field the image is not getting displayed.Please help me how to pass context varible which contains url value to an image fielld?

Thanks & Regards,

Kavitha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 24, 2012 at 08:30 AM

    Hi Kavitha,

    give every effort to avoid script. Just bind the context variable to the image node on the tabstrip "URL".

    Cheers.

    Tao

    Add comment
    10|10000 characters needed characters exceeded