on 11-03-2010 3:06 PM
Hello being a newbie i am hoping someone can help me
I am trying to display my own icons in my alv table. I have uploaded the gif files into the MIME and i can display them as an image but cant work out how to point my ALV at where the file is stored.
I have managed to display the standard Traffic light icons but what do i need to do in order to display my own
Any help will be greatly apredicated
Thanks
Shaun
The image source for mimes uploaded into your own component is <namespace>/<component_name>/<mime_name>
so to access from a different component you could just use
"../<component_name>/<image_name>" as your image source, if both components are in SAP namespace. (the ALV is, and unless you are using a custom namespace yours should be too.)
Let us know if that doesn't work.
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for you quick response
Ok so am i not right in thinking that i can just point the programme to my gif file like the code below?
As the predefined Icons RED, YELLOW etc show fine
lv_ratings = lv_ratings / 5 / lv_records.
if lv_ratings eq 1.
wa_vendor-STATUS = 'ICON_RED_LIGHT'.
elseif lv_ratings eq 2.
wa_vendor-STATUS = 'ICON_YELLOW_LIGHT'.
elseif lv_ratings eq 3.
wa_vendor-STATUS = 'ICON_GREEN_LIGHT'.
else.
wa_vendor-STATUS = '<VENDOR_SEARCH_RATE>/3.GIF>'.
endif.
append wa_vendor to it_vendor.
Hi Shaun,
Within the component the image is appearing you can just name the mime - it is local to that component.
Since the ALV is a different component it would make sense that you would need to give a relative path.
have a look at the help for the image UI element - it explains it much better than I'm going to attempt to here! (and gives you far more options that I even realised were possible
[Handling Web Icons - SAP Help|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/ec/bb08428dab5f24e10000000a1550b0/frameset.htm]
So /3.gif would be valid way of addressing the image if ZVENDOR_SEARCH_RATE was the name of the component containing the MIME ".3.gif".
NB it should be noted that my first response to use a relative path is not supported - sigh - egg on my face again
no relative paths are supported, that is no input in form ./path or ../path.
Cheers,
Chris
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.