Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Convert xstring to xml

MichaelH1
Explorer
0 Likes
5,041

Hello all,

I want to upload a MS Word document and use it as a new document template in CRM WebUI. Therefore I enhanced the document template application in CRM 7.0. The uploaded file I got as an xstring. I asume that I have to tranform the xstring into xml before I can tansfer it to the MS Word application.

Can anybody give me a hint how to convert the xstring into xml which will be understand by MS Word so the variables can be placed into the document?

Many thanks in advanced, any help is welcome!

Best regards

Michael

4 REPLIES 4
Read only

Former Member
0 Likes
1,246

Hi,

Try the below FMs

Convert the xstring to binary. SCMS_XSTRING_TO_BINARY

Then Binary to String SCMS_BINARY_TO_STRING

regards,

Nazeer

Read only

0 Likes
1,246

Hi Nazeer,

thanks for your answer. Your proposal I've already tried out before, but I got only a string which won't work with MS Word to use the document as a template. I think that I have to convert the word document first into XML which will meet the MS Word conventions. Do you know a function module or a method which will support this? I think there should be a parameter where I can post the schema.

Many thanks in advance!

Michael

Read only

0 Likes
1,246

Hi

U can use a transformation (CALL TRANSFORMATION statament) or u can use methods of class CL_IXML and interfaces IF_IXML*: i think u can find out demo program (ex. SXSLTDEMO_FLIGHTS).

Max

Read only

0 Likes
1,246

Hi Max,

thanks for this hint. I'll try it. That sames to be a good solution.

Regards

Michael