Skip to Content
avatar image
Former Member

Change Image Dynamically

Hi guys,

I need to change an image dynamically.

I know I can display an Image by supplying the abolute URL like: http://sapcookbook.com/store/images/wd-abap_book.png But say I want to display an image in the following location (which is an internal shared file on a company server): *
hafXXX.wX\Files\WA\RenderFull.jpg*

Please advise on how I could go about retrieving this file. I have tried various ways...

Thanks,

Christiaan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 16, 2010 at 08:35 AM

    Hi Christiaan,

    If the file is accessible from the SAP server using "open dataset" commands, then just read it and expose it using a temporary web cache then pass the generated URL to the image source.

    If you can't read it from the SAP server, ACFUpDownload and then then same thing.

    Could you let us know what various ways you have tried?

    Chris

    Add comment
    10|10000 characters needed characters exceeded

    • It is a common approach to this requirement, but you are correct that if you have a large amount of images and frequent usage it can dominate a server cache u2013 especially if that cache is too small. This could cause the flushing of key framework libraries from this cache resulting in lower performance.

      There is an alternative which I would suggest if you are concerned about this situation. You can create a custom handler class for your images. This way each image has a unique URL based upon the image name and doesnu2019t use the ICM cache.