cancel
Showing results for 
Search instead for 
Did you mean: 

how can we display photo of particular person on webdynpro abap view

Former Member
0 Kudos

hello gurus,

i am very new to webdynpro abap.i have one requirement.could any one can suggest me to overcome my requirement.

in my requirement i have one view.in that view i need to display one photo image which ever saved on my desktoop.if i click on save button i should generate one doc number and update what ever the photo image i have displayed in the view against this doc number.after some time if give the doc number in to docnumber field and click on display button it should display what ever the photo we have saved previously against this doc number.this is my exact requirement.i think for this we need to maintain one Z table to stroe the photo and respective doc.number.for this how can we stroe photo against doc number in ztables.what is the type i supposed to give for photo image field.

could you please any one suggest me on this and could any one send me the sample code if possible.

regards,

babu.

Accepted Solutions (0)

Answers (2)

Answers (2)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Babu,

I doubt whether you can directly display the image from your desktop into the webdynpro application using Image UI Element. Only solution what I can think of is to load the image into the MIME folder and then bind the path of image in the Source property of the image UI element. But if you ask me this is not a good solution. Let me propose my solution. If no one get back to issue with better approach then you can follow the same

1. whenever the image the is uploaded from the desktop, create this image in the MIME folder ( you search in SDN for creating objects in MIME folder )

2. then bind the path of the image in Mime folder to the Source property of the Image UI Element

3. Once the image is persisted in the DDIC table, delete the image from the MIME folder.

4. to persist the image in DDIC table, create an attribute of type RAWSTRING.

5. Whenever you want to display image from DDIC table into the UI, then again create the image in MIME folder and delete the image from MIME folder when you are existing from the application.

Alternative would be to use the Mime repository for storing the image and in the DDIC table just maintain the Mime folder path for the document number.

Hope this helps you.

BR, Saravanan

former_member184578
Active Contributor
0 Kudos

Hi.,

Yes you have to take Ztable with doc number and image. for image take data type RAWSTRING in Z Table,

take File upload UI in View and bind data source to context attribute which has the type Ztable-image .

After uploading .,

now take image UI Element in View and Fetch image from Z Table and bind it to image UI.,

hope this helps u.,

reply if you need some other clarifications.,

Thanks & Regards,

Kiran