cancel
Showing results for 
Search instead for 
Did you mean: 

From message to attachment in Mail adapter

Former Member
0 Kudos

Hello,

I am searching for information about this issue:

An incoming message from a WebService needs to be mapped to a target structure . SAP PI has to create a file (csv) and add it as an attachment to a mail.

So this is the process:

WebService -> Mapping -> File -> Attachment in eMail

I am not sure if this is possible to move the target structure as a csv-file attachment into the eMail.

Please can anybody help!

This is really appreciated!

Best Regards

Dirk

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
SAP PI has to create a file (csv) and add it as an attachment to a mail.

Make use of the standard module MessageTransformBean: http://help.sap.com/saphelp_nw04/Helpdata/EN/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm

use this module in your receiver email channel (check example Conversion in the Receiver Communication Channel )....this will convert XML into CSV.

In the email channel make use of the Keep Attachment option to get attachment....this will attach the content as attachment....let us know if this works.

Regards,

Abhishek.

Former Member
0 Kudos

Hi Dirk,

Ref the below blogs:

/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

Thanks,

Former Member
0 Kudos

Thank you, Hareenkumar!

The first link seems to be the right one to help me!

So the solution should be to use a Java mapping to generate the required file structure

and add it then as an attachment to the mail.

And thank you, Abhishek!

I will try this first as it seems to be easier to implement for me.

But this needs some weeks as we are analyzing requirements currenly and need to find out what is possible with PI and what is the effort for impolementation!

So I will come back later!

Regards

Dirk

Edited by: Meinhard Dirk on Dec 7, 2010 12:09 PM