cancel
Showing results for 
Search instead for 
Did you mean: 

How to display image in webdynpro which is in binary format

Former Member
0 Kudos

Hi Everyone,

Can someone tell me How to display image in webdynpro which is in binary format.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member198833
Active Participant
0 Kudos

Hi Smruti,

You can get a temporary URL from ICM if you place the image on ICM cache.

Then, you can use the URL to regularly displayed it in an Image UI Element.


Please read this trend on how to cache the image XSTRING into ICM and get a temporary URL:

Regards,

Felipe

Former Member
0 Kudos

Hi Felipe,

Can you please find below code and suggest me whether it is possible to display the binary format to image in webdnypro UI.i am getting the image from webservice in base64 format then i am converting the image to binary format.

CALL FUNCTION 'SSFC_BASE64_DECODE'

     EXPORTING

       b64data = output-parameters-return-base64

     IMPORTING

       bindata = image

     EXCEPTIONS

       OTHERS  = 8.

*

   CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

     EXPORTING

       buffer        = image

       "APPEND_TO_TABLE       = ' '

     IMPORTING

       output_length = imagelength

     TABLES

       binary_tab    = it_img.

former_member198833
Active Participant
0 Kudos

Hi Smruti,

Web Dynpro UI Element expects an image URL, not an binary file. Therefore, you need to cache the binary file in ICM and get from it a temporary URL and use this to display your image.

If you go through the steps provided by Thomas Jung on you will be able to do this easily.

Regards,

Felipe