cancel
Showing results for 
Search instead for 
Did you mean: 

XMII Runner

Former Member
0 Kudos

Hi All,

My requirement is to render 4 SVG images and display in the UI without saving those in the server.

I tried using XMII Runner with the syntax "/XMII/Runner?Transaction=<Trx Path>&OutputParameter=<Parameter1>&Content-Type=image/png" and it gives me desired result in my irpt.

My problem is, since I want to have four outputs from this transaction, if I give the above syntax four times to output one parameter at a time the transaction is executed every time and the four values which should correspond to each other changes after every execution.

Is there any way to have multiple output params in the XMII runner? Or is there any way to execute the transaction only once and capture all the four values?

Please suggest!!

Regards,

Anuj

Accepted Solutions (1)

Accepted Solutions (1)

HariCS23
Contributor
0 Kudos

There are multiple ways you can use to return more than one encoded images text .

And parse that xml OP and get the encoded text separately.

Ex: define XML with two columns ( svgindex,svgtext) and append your OP to that XML.

Define OP parameter of XML.

user same type of url but the Content-Type would be text/xml.

Once you get the result at client side ( you need to use ajax call to that URL to get XML) ,parse that using DOMXML to get the each encoded image text separately.

Hope this helps.

Thanks,

Hari

Former Member
0 Kudos

Hi Hari,

Thanks for your response.

I already tried the method of getting those encoded images in a XML but not very clear with using DOMXML to separate the encoded images and display them.

It would be really great if you can help out with that as well.

Warm Regards,

Anuj

HariCS23
Contributor
0 Kudos

Anuj,

These pointers might help you.

http://help.sap.com/saphelp_mii122/helpdata/en/4c/c8e2a88e9b60c5e10000000a15822d/content.htm

http://www.w3schools.com/ajax/default.asp

http://www.w3schools.com/ajax/ajax_xmlfile.asp

http://www.w3schools.com/dom/default.asp

Once you get the encoded text in XML,parse it to get each node and set the image src...

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

I believe you set the image src using javascript : imageobj.src = encodedimagetext.

Thanks

Hari

Former Member
0 Kudos

Hello Hari,

Thanks for your kind input.I will try it out and these inputs will definitely help me.

Warm Regards,

Anuj

Former Member
0 Kudos

Hi Hari,

Its working now with the syntax of the src for image as mentioned by you.

Now a single call to the transaction serves my purpose. I was able to get the encoded images but was not aware of the syntax ' src="data:image/png;base64, encoded text" '

Thanks for your help!!

Best Regards,

Anuj

Answers (0)