cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send csv file as attachment to outgoing mail from mail adapter?

0 Kudos

Hi All

Previously, i had a proxy to file scenario. I was writing a csv file to file server, using file content conversion of file adapter.

Now, the same scenario is changed as a file to email scenario. I need to send the same csv file as an attachment to outgoing mail from email adapter.

With normal mail adapter, i am getting xml file as an attachment.

How can i get csv file as an attachement to outgoing email from mail adapter?

Many Thanks

Chandra

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

you can use the messagetransformbean in the mail adapter to convert the xml to csv.

http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm

Former Member
0 Kudos

Go to Module and add the following under Processing Sequence

Number Modulename Moduletype Key

1 localejbs/AF_Modules/StrictXml2PlainBean LocalEnterpriceBean strict2plain

2 localejbs/AF_Modules/MessageTransformBean LocalEnterpriceBean contentType

3 localejbs/AF_Modules/TextCodepageConversionBean LocalEnterpriceBean codepageConversion

4. sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean LocalEnterpriceBean mail

Add the following under module Moduleconfiguration and change the MAYFILENAME to your file name.

Modulekey Parameter Name Parameter value

strict2plain Header.endSeparator \r\n

strict2plain Header.endSeparator ,

strict2plain record.endSeparator \r\n

strict2plain record.fieldSeparator ,

strict2plain recordTypes Header,record

contentType Transform.ContentDescription Outmail

contentType Transform.ContentDispostion attachment

contentType Transform.ContentType text/plain;charset="UTF-8";name="MYFILENAME.csv"

codepageConversion Conversion.charset ISO-8859-1

bye !!

Former Member
0 Kudos

Edited by: - External Consultants Mouchel on Apr 22, 2009 6:25 PM

Edited by: - External Consultants Mouchel on Apr 22, 2009 6:31 PM

Former Member
0 Kudos

Hi Chandra,

1) see my post from today:

Mail Receiver: Attachment gets not generated

2) You need as target-message the external definition from SAP.

See

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb155...

Page 7: SAP Note 748024.

Regards Mario