cancel
Showing results for 
Search instead for 
Did you mean: 

CSV file to mail

Former Member
0 Kudos

Hi Experts,

Can any one help me to do a scenario which is related to File(.csv) to Mail.

I want to send a file(.csv) which is in a folder to the mail server as attachment or content.

Please help me, I had a look on SDN help but I can't find any suitable scenario for me.

Thanks in advance

Regards,

Rachel.

Accepted Solutions (0)

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Selvam,

Thanks for the response,

I have gone through the link,

But I want to send the .csv file. Can you please advise about the Module tab parameters in the receiver communication channel.

Thanks,

Rachel

Former Member
0 Kudos

Hi,

Use File adapter with FCC (File content conversion) and provide the necessary content conversion parameters at the file adapter level...search sdn on this if need more info...

you can use either mail package xsd as your mail message or you can use your own message..and configure the mail adapter as receiver...

and remaining things are as usual..

HTH

Rajesh

Former Member
0 Kudos

HI Rajesh,

Thanks for responding.

Can you please tell me how can i take the total body in to a single field. can i use as below

Row.fieldNames--> SingleField

Row.fieldFixedLengths-->500

can I use the above values to solve it.

Please advise

Thanks,

Rachel.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Rachel,

one trick is that you never use a FCC but direct the entire payload into a java mapping. The code creates a target XML with entire payload into one field of target XML. Second technique is to use any FCC and obtain the payload as XML then direct it into one field of target. Both these options have been discussed in a wonderful manner is this link

http://wiki.sdn.sap.com/wiki/display/XI/WholePayloadtoaXML+field

regards

Anupam

Former Member
0 Kudos

Hi Anupam,

Thanks for your response.

If I want to send that file as an attachment, how to do that.

Can you please advise.

Thanks,

Rachel.

PriyankaAnagani
Active Contributor
0 Kudos

Hi Rachel,

If you want to send the file as an attachment, select the message protocol as XI payload in mail receiver communication channel.

If we select this message protocol then weu2019ll get option in the mail receiver communication channel, u201CKeep Attachmentsu201D.

If we select the u201Ckeep attachmentsu201D in the Mail Attributes, then the content will be sent as an attachment (.txt file) otherwise the content will be sent as body of the mail.

Regards

Priyanka

Former Member
0 Kudos

chk this:

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

allamudi_loordh
Active Participant
0 Kudos

Hi,

use mail package as in target structure to get the file name dynamically and pass the csv file to mail content.u can get mail package external definitiion.if you have any doubts come back.

Former Member
0 Kudos

Hi Loordh,

Thanks for your help. it's a good idea.

Please tell me how to pass the content of the file into the target,

Can you please tell me how can i take the total body in to a single field. can i use as below

Row.fieldNames--> SingleField

Row.fieldFixedLengths-->500

can I use the above values to solve it.

Thanks,

Rachel.