cancel
Showing results for 
Search instead for 
Did you mean: 

Display Employee (PA30) photo in Web Dynpro Application

Former Member
0 Kudos

Hi experts,

I'm trying to display the employee photo, the same that is displayed in PA30, in a Web Dynpro Application.

The idea is to input the personnel number and then some data from that pernr is displayed.

I tried to achieve my requirement by calling function model HR_IMAGE_EXISTS exporting the PERNR and then calling  function 'SCMS_DOC_URL_READ' to retrieve the photo url so I can bind it to the image element in WD. That didn´t worked!

Can you please help me?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi

Using  the FM  "HRWPC_RFC_EP_READ_PHOTO_URI"  You can get the Employee Photo  and display in WDA Application

Regards,

Siva.

Former Member
0 Kudos

Thank you!

I have the url and bind it as source of my image ui element but I keep getting error 404...

Regards

Answers (1)

Answers (1)

kmoore007
Active Contributor
0 Kudos

After function HR_IMAGE_EXISTS, use function  ARCHIVOBJECT_GET_URI.  Like below:

CALL FUNCTION 'HR_IMAGE_EXISTS'

     EXPORTING

       p_pernr               = pernr-pernr

       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 image_exists IS NOT INITIAL.

     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 sy-subrc <> 0.

     ENDIF.