cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment content in body of the mail in different format

Former Member
0 Kudos

Hellow Guys,

I have a proxy to mail scenario in which I'm getting output XML as an attachment need the same attachment content in body in different format.(need both attachment and body now)

For ex: In Attachment I'm getting as beloiw,

<m<MessageId>56607416CE000A66C848</messageId><ServiceVersion>1.0</ServiceVersion><ServiceDirection>Outbound</ServiceDirection><DocumentType>FSOCREATE</DocumentType><FSONumber>54772</FSONumber><TransmissionDatetime>08-DEC-2013 16:20:35</TransmissionDatetime><TransmissionId>56607416CE051810E100800C848</TransmissionId><FSOLastUpdateDate>08-DEC-2013 16:20:18</FSOLastUpdateDate><fsoOutbound><priority>P2</priority><CaseNumber>2004110734</CaseNumber><PartRequestNumber>8001203631</PartRequestNumber><ReportingHostName>SZXNAS38A-DR</ReportingHostName><ProductSerialNumber>850000155303</ProductSerialNumber><Model>FAS3240-R5</Model><CustomerContactName>Lin Li</CustomerContactName><CustomerPhonenumber

So now I want to get some of the specific fields from attachment  as below   in my body of the mail as below.

messageId : 56607416CE00A66C848


FSONumber: 54772


PartRequestNumber: 8001203631


I'm using SAP XI 7.0 version


I think this can be acheived by using java mapping.


If anyone can help in providing that code or your suggestions it will be a great help from your end.


you can drop me code to my mail address danii5456@gmail.com


Thanks in advance


Danii.





Accepted Solutions (0)

Answers (1)

Answers (1)

vicky20691
Active Contributor
0 Kudos

Hi dani,

Create a receiver data type and map the fields and apply FCC to get the conetent you want...

To send the mail to body -

Use message protocol - XIPAYLOAD

and localejbs/AF_Modules/MessageTransformBean  and parameter

Transform.ContentDisposition = inline

Transform.ContentType = text/plain;charset=utf-8

Regards,

Vikas

Former Member
0 Kudos

Hi Vikas,

Thanks for the Quick rep...

But its a Proxy to Mail scenario how can I do FCC.

If you can help me with the java code or how to achieve this in a clear way it will be more helpfull for me.

Thanks in Advance.

Danii

nitindeshpande
Active Contributor
0 Kudos

Hello Danii,

What is the version of your PI system? If 7.1 and above, then you can use Read Attachments option in Operation Mapping.

Pleas go through the below thread to have more info on it -

https://scn.sap.com/thread/1341089

Regards,

Nitin

Former Member
0 Kudos

Hellow Nitin,

Its 7.0 version

vicky20691
Active Contributor
0 Kudos

Hi Dani,

Use the MessageTransformbean XMLtoPlain..for conversion too.

and the mail channel configuration to send email to body remains sameas i mentioned above

REgards,

Vikas