cancel
Showing results for 
Search instead for 
Did you mean: 

Loading an image

Former Member
0 Kudos

Hi,

Could you please tell how to load an image in web dynpro ?

Thanks,

abilash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check these link ...

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/kmc/gettinganimagefromKMDocumentstobeusedinWeb+Dynpro

Thanks & Regards,

Suvarna Chittoor.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First Keep your image in Sample.jpg in c:\program files\<installation directory>\src\mimes\components\<ur component name>\Sample.jpg

U can display .JPG,.BMP,.GIF

1)Insert Image UI element

2)create an attribute IMAGE and set calculated=True in attribute properties

3)It generate two methods getImage() and setImage() methods

4)Bind the image attribute to image UI element

5)write the following coding in

getImage()

{

return "sample.jpg"

}

6)u have to specify the Image name correctly if it is in uppercase or lowercase

Otherwise,

Insert Image UI element then click image properties---->Source=Sample.jpg

Directly u type the image name Sample.jpg in that source and press Enter,automatically it will bind with tickmark. Then deploy it works...

Regards,

Suresh.T