on 06-08-2009 7:08 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.