cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Image dynamically in Webdynpro ABAP

Former Member
0 Kudos

Hi Experts,

How to add Image dynamically in Webdynpro ABAP.

My requirement is i maintain all the images in a table.

image source has to pick the table URl dynamically and display.

is that possible in webdynpro?

and also please give the suggesion,

without using MIME objects is that anyway to get images?

Thanks in advance.

Regrads,

Jeyanthi

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Images are just binary data (XSTRING) and as such can be stored in any database table. If you don't want to store in the MIME repository consider just creating a custom database table to hold the data. You can perform SQL on the table just like normal as well. Binary long strings really don't complicate the logic.

Former Member
0 Kudos

Hi Thomas,

Image Source is accepting only Mime Objects or ICON Images. It is not directly taking any URL. I mean to say if i give source is 'C:\allthebest.gif' it is not taking that URL.

If i import it through MIME objects then it is automatically taking that component image.

Please suggest me the same.

Thanks & Regards,

Jeyanthi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That's because 'C:\allthebest.gif' isn't a URL. That's a local location. The image source accepts relative URL from the Applicaiton Server just fine - so you can use the ICM cache technique from the linked other thread. Also you can use full URLs from other locations by specifying an HTTP(S) SM59 Destination as part of the URL:

$LOCAL_HTTP$/a.gif - where LOCAL_HTTP is the name of the SM59 based destination. But that still isn't going to work for C:\ - you can't reference local client objects like that in Web Dynpro.

Former Member
0 Kudos

Hello Thomas,

Sorry, I know that topic date from 2009, but what is the DDIC Type corresponding of XSTRING ?

Thank you in advance.

Rachid.

0 Kudos

But how to display back once we read the data from table ?

former_member230839
Participant
0 Kudos

Hi,

are those icons wou want to display then. he following code will be useful.

data : lo_IMG type ref to CL_WD_IMAGE.

LO_IMG = cl_wd_IMAGE=>new_IMAGE( id = img_id SOURCE = 'ICON_BW_APD_TARGET' tooltip = sts_tltp ).

lo_cont->add_child( the_child = lo_img ).

here lo_cont is the container where you want to add the image dynamically and source is the attribiute through which you can change the ICON image. this thing you can getit from data base table and change accordingly.

Regards,

Anil kumar G

Former Member
0 Kudos

Hi Anil,

Thanks for your kind reply but, 'ICON_BW_APD_TARGET' is the Mime object Name right?.

How can i get table URl image into Mime object. then i can use the class to fetch that.

My requirement is how to get image files from table to mime object repository?

Thanks in Advance

Jeyanthi

Former Member
0 Kudos

Hi,

The below thread might be helpful regarding dynamic upload of images as MIME objects.

[;

Regards,

Manne.

Edited by: Raja Sekhar Manne on Jun 8, 2009 8:38 AM