cancel
Showing results for 
Search instead for 
Did you mean: 

Employee photo in image field

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kavitha,

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

Cheers.

Tao

Former Member
0 Kudos

Hi Tao Lin,

photolink is the varible which hold the link.

if i bind $.pholink to url filed ...instead of image its displaying like http:/...

I am new to adobe from.Please help me to pass varible to url field.

Thanks

Kavitha

Former Member
0 Kudos

Hi Kavitha,

you should create a image node in the context. There is a tabstrip/button named "URL" for image nodes, put your URL-variable there. And on the layout drag the image node instead of the URL-variable onto your page.

Cheers,

Tao

Former Member
0 Kudos

Hey,

Solved,,Really very great.I was struggling hard...Thanks a lot.

Thanks and Regards,

Kavitha

Answers (0)