cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the images in webdynpro ....?

0 Kudos

Hi......Experts...

i have a scenario like i need to display an images in webdynpro based on the selected employee in the alv table.

I will tell you again:

in my screen i have an alv table with some records ,if i select a particular line item of the table ( say for ex if am clicking on line item 3 as an EMPID = KV03 means) i need to display the corresponding image of that employee...this is what exactly am looking for,

how can i get all the images in webdynpro for the above..

So please tell me this one Quickly

thankyou in advance those who let me know the answer the question.

Accepted Solutions (0)

Answers (4)

Answers (4)

bhushan_ghule
Active Participant
0 Kudos

Hi Srikumaran .

I think your requirement is like this .

If your are  dealing with the custom table then you can add field for image of type rawstring .

Through modify statement  you can save image in table & through select statement you can fetch image form table .

<- Removed by moderator ->

Thanks & Regards .

Bhushan Ghule

Message was edited by: Neil Gardiner

0 Kudos

this is the exact scenario which am trying BUSHAN i have got this scenario from FB and one more thing is 1) i need to display the resume in the pdf format like above as well as in DOC using that office UI element . how can i do that

simple uploading the resume in text format using GUI UPLOAD or else with opendataset IN AP server and how can i display in PDF using that PDF sourse UI element right.

Can you Give any other Scenarios based on SAP HR related modules ......do you have any plz send to my mail...am requsting you again plz.

Tank you very much

Regards

kumaran

bhushan_ghule
Active Participant
0 Kudos

Hi kumaran .

1 ) To display resume in pdf format you have to convert MS word(.doc) file in pdf format and use        Interactiveform ui element to display pdf file . same file you can store in ztable no need to use   application server

2 ) to show resume in word format you can use  office control  ui element .  

3 ) you asked for the scenario , here it is .

try to add custom infotype fields in the standard application configuration HRESS_AC_PERSINFO

solution is mentioned  in the below link.


http://scn.sap.com/community/erp/hcm/employee-self-service/blog/2012/06/13/summary-of-configuration-...

http://help.sap.com/erp_hcm_ias_2012_03/helpdata/en/38/fd1f7ed337404cae5c8a2341dbdca4/content.htm?fr...

Thanks & regards

Bhushan Ghule

0 Kudos

Thank you....bhushan ...very usefulll buddy

Former Member
0 Kudos

Hi Srikumaran,

You can display a image according to ALV selection, so to get index of ALV selection line you can write event handler for ON_LEAD_SELECT event and use the below code snippet for getting selected index

R_PARAM->IF_SALV_WD_TABLE_LEAD_SELECT~INDEX

Regards,

Mukesh

0 Kudos

yeh thank you Mukesh ....i got it

former_member184958
Active Participant
0 Kudos

Hi,

Declare one attribute(Emp_image) with type as TOAURI-URI inside that node.

Then read that node, you will get the pernr

Then call the below function module where ever you want to display the employee image,

data image type TOAURI-URI.

CALL FUNCTION 'HR_ESS_WHO_PROG_GET_PICT_URI'

    EXPORTING

      PERNR            = Pass your Pernr here i.e employee id

    IMPORTING

      URI              = image

    EXCEPTIONS

      NOT_SUPPORTED    = 1

      NOTHING_FOUND    = 2

      NO_AUTHORIZATION = 3

      INTERNAL_ERROR   = 4

      OTHERS           = 5.

lo_el-emp_image = image.

Now set this image to that attribute.

Hope this will helpful to you.

Regards,

John.

0 Kudos

yeh its correct but it is only related to the pennr associated tables but in my case it ll be custom table .....any how i ll check it ......thankyou buddy

former_member217916
Participant
0 Kudos

Hi Srikumaran,

You can display images using the Image UI element. Following link has step by step information on how to add images to web dynpro application.

<- Removed by Moderator ->

The above link only gives the basics of adding image elements. But in your case you would need to bind the source attribute of your image UI elements to a context node.

- Add Image UI element into the view.

- Add a context attribute to the ROOT context node, you can name it SOURCE_IMG and specify its type as STRING.

- Navigate to the SOURCE property of Image UI element and bind the property to the context node creation in above step.

- Now inside the method where you are handling your ON_CLICK event of your ALV you need to set the set attribute of SOURCE_IMG.

CALL METHOD lo_root_node->set_attribute_property
      EXPORTING

        attribute_name = 'SOURCE_IMG'     
        value          = l_img_path.

The l_img_path variable would need to have employee image source for the particular pernr being processed.

Regards,

Karan Ranawat


Message was edited by: Neil Gardiner

0 Kudos

thank you very much  karan i will try and tell you....