cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Loading of Images

CHKNELL
Participant
0 Kudos

Hello!

Could anybody tell me how to dynamically load an Image stored in the R/3 via Adaptive RFC-Call & how to access it afterwards so it could be displayed in an Image-UI-element?

I couldn't find any documents regarding this topic, so any hint is more than appreciated.

Thank you very much in advance!

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

For second part of your question:

If you get binary content of image from RFC call, you may display it using IWDImage.

See my post on how to display DOC file in new window -- the same technique could be applied for images as well, the only difference is that you have to assign resulted url as image source.

VS

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Christian-

If the image you want to retrieve and display is accesible as an ArchiveLink document then you can use the function module 'ARCHIVELINK_URL_GENERATE' and pass the value of the generated URI to the 'source' property of the WDImage object.

Regrettably, since 'ARCHIVELINK_URL_GENERATE' is not a remote-enabled function module, you may have to build a simple custom BAPI that wraps the functionality of this standard function module into one that you can include in your Web Dynpro Java project as an Adaptive RFC model.

This way the image will show up 'dynamically' as it is stored in the source SAP system.

If you do not have the identifying details (docid, arcid, etc.) of this image but know the SAP Application Document (particular Business Object) that it is associated with then you can use the function module 'ARCHIV_GET_CONNECTIONS' to obtain those relevant details before you invoke your function module that serves as a wrapper to 'ARCHIVELINK_URL_GENERATE'. This function module is remote-enabld out of the box.

Hope this helps,

- Vik.