Application Development 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: 

Display images of Employee from toahr table

avinashd_m
Participant
0 Kudos

Hi all,

I want to display  employee photo in organization given his personnel number ,and i come to know that the table toahr contains details for this ,But i dont know how to get url for the image ,please help me to solve this problem

Avinash Dm

5 REPLIES 5

former_member184569
Active Contributor
0 Kudos

HI Avinash,

You need to link the photos to infotype 0002.

You can use this link for more details

How to Upload Employee Photo in SAP HCM - ERP Human Capital Management - SCN Wiki

0 Kudos

hello Susmitha ,

I want to display the Employee Photo in Smartforms,for that i have to send url of photo to smartform,so where can i get url  of the image which is already uploaded and the entry for that is already available in toahr table

Thanks

0 Kudos

Have you configured the content repository for Archive link?

Try using the following FMs.

'HR_IMAGE_EXISTS'

     

'ARCHIVOBJECT_GET_URI'

      

Check the code extract in  this thread.

0 Kudos

Hi Susmitha,

I am getting corresponding URI /output in both FM u have suggested ,from that url how can i display the image ,

Thanks,

0 Kudos

In an unmodified Smartform/Sapscript runtime you can't AFAIK. SF supports only output of so called BDS persisted Bitmaps (transaction SE78)  - so to output images somewhat dynamically you'd have to get your image during runtime, convert it to BDS bitmap and store it in BDS. Here is the Document with the code, there was also a blog on the topic on SCN; the performance will be "atrocious".

The only way I know of how to work around the limitiation is creating an implicit enhancement in FM SAPSCRIPT_BITMAP_GET, "intercepting" the call to BDS by interpreting NAME and TYPE and returning the image in correct OFT format (as well as the three exporting parameters)... I've done this for test purposes on our sandbox using functionality available in CL_RSPO_OUTPUT_RENDERER_OTF, just to try if it's at all feasible to bypass BDS. But, since the code of that class is obviously unfinished (can get removed if SAP decides to clean up dead, unused code) and contains severe bugs (it does not process 8 bit bitmap correctly for example, it does unnecessary conversions), I'm not prepared to share more of what I've publicly before I've found time to finish reimplementing the necessary functionalities of from that class in Z namespace...

cheers

Janis