cancel
Showing results for 
Search instead for 
Did you mean: 

Convert XML to text file and sending the same via Mail receiver adapter

Former Member
0 Kudos

Dear All,

I have a requirement like....

I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and

the converted file needs to be sent to a mail address in text format.

Any body has idea how to achieve this?

Thanks in advance for your help.

Regards

Hari

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and 
the converted file needs to be sent to a mail address in text format.

FIrst of all you need to import the Mail xsd from service market place and include it in the External Definition....then using this XSD create the Message/XSLT mapping...also create an IN Async MI for the mail receiver....

Since you are getting a XML file which you want ot send to the mail in text format you will need to convert the XML into a string and map it to the Content node of Mail XSD....you will need XSLT mapping in your case.

Since you want the content to be in text format...populate the Content_TYPE node with constant value text/plain

regards,

Abhishek.

Shabarish_Nair
Active Contributor
0 Kudos

>

> Dear All,

>

> I have a requirement like....

>

> I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and

> the converted file needs to be sent to a mail address in text format.

>

> Any body has idea how to achieve this?

>

> Thanks in advance for your help.

>

> Regards

> Hari

use the StructXML2Plain or XML2Plain from the standard MessageTransformBean

Add the module to you Mail adapter before the mail adapters standard module itself

Ref: http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm