Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9146

Re: Displaying an Image of SAP in a Website

$
0
0

Hi Rafi,

 

We had a similar requirement and we followed something like this,

 

From the RFC itself converted the HEX to xstring using FM  SCMS_BINARY_TO_XSTRING and then xstring to base64 using FM   SSFC_BASE64_ENCODE.Once you get the image converted into base64 it is easy to us it in HTML pages.

 

You will get the base64 string something similar to the following format.

 

iVBORw0KGgoAAAANSUhEUgAABAAAAASwCAYAAABl1zj2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJC

(Will be extremely long string based upon your image properties)

 

Now in the HTML page, use the image tag as follows.

 

<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAABAAAAASwCAYAAABl1zj2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJC"/>

 

image/png - MIME type

 

Hope this helps!

 

Regards

Anoop


Viewing all articles
Browse latest Browse all 9146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>