cancel
Showing results for 
Search instead for 
Did you mean: 

MAIL Adapter Transformation Bean

Former Member
0 Kudos

Hi Guys,

I am working on Mail 2 CSV file interface. Can any one provide me information on Sender side MAIL transformation Bean to convert CSV file to XML.

Thnx,

Siva.

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Are you sure you want to convert it to xml? You already want CSV at receiver side. So there doesn't seems to be much point in changing it to xml and then changing it again from xml to csv.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Actual my requirement is

customer send us a CSV file format attached to the email and i have to extract it from the mail and put in the file location. No mapping or anything required.

Customer sends us orders via email. The email contains some text but the order details / requirements are contained within a CSV file attachment.

Customer sends emails to us which represent their orders

The emails always include a CSV file attachment

i need to extract file attachment

Extracted file should be saved to network share folder.

My doubt is in below wiki Mail 2 File Scenario attachment in the form of xml , but in my case attachment format is CSV.

Could you please help me on this how can i handle this CSV mail attachment.

http://wiki.sdn.sap.com/wiki/display/XI/StepbyStepMailToFileScenario u2013 Mail 2 File Scenario

/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step - Michael blog

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm - Payload swap bean

http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm - Sender MAIL Adapter parameters (Configuring the Sender Mail Adapter)

- Payload Swap bean module parameters

Thnx,

Siva

Former Member
0 Kudos

Use payloadswap bean and transform the attachment to payload. Skip the mapping and write the file using file adapter protocol File.

All links are already there in your post

Former Member
0 Kudos

Hi Jaishankar,

you are saying correct, that bean is for Mail with attachment as xml format ..but here my requirement is i am getting Mail with attachment as CSV format.

is any other beans for how to handle this CSV format ?

Thnx,

Siva

Former Member
0 Kudos

>>that bean is for Mail with attachment as xml format

No, it is not.

prateek
Active Contributor
0 Kudos

You can use PayloadSwapBean for any format. You just use the bean and no mapping is required. Just configure ID part and your scenario is done.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Thanks for your inputs.

I have used below beans in MAIL Adapter module Tab

1 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean 1

2 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail

1 swap.keyName Content-Description

1 swap.keyName Content-Disposition

1 swap.keyValue MailAttachment-1

1 swap.keyValue attachment;filename="MailAttachment-1.xml"

as per my requirement can i use attachment;filename="MailAttachment-1.xml" as xml or can i need to change instead of xml as csv ?

Thnx,

Siva.

Former Member
0 Kudos

Hi experts,

Can any one help me on my requirement.

Thnx,

Siva

Answers (1)

Answers (1)

0 Kudos

Hello!

You can refer to SAP help page:

Adding Modules to the Module Processor

http://help.sap.com/saphelp_nwpi71/helpdata/EN/cd/5af7c0c994e24fb0d0088443513de2/frameset.htm

Inserting MessageTransformBean in Module Processor

http://help.sap.com/saphelp_nwpi71/helpdata/EN/57/0b2c4142aef623e10000000a155106/frameset.htm

As the latest link says you can develop your own class to convert the csv to xml and make it works.

Best regards,

Franklin