cancel
Showing results for 
Search instead for 
Did you mean: 

Mail attachement to FTP folder

monikandan_p
Active Participant
0 Kudos

Dear Experts,

     I have a requirement that i need to take the mail attachment from email and update in FTP folder using SAP PI

Is this possible in SAP PI 7.1.Kindly suggest some ideas or provide some docs.

Thanks..

Have a nice day.

Best Regards,

Monikandan.

Accepted Solutions (1)

Accepted Solutions (1)

monikandan_p
Active Participant
0 Kudos


Issue resolved.

Finally I have followed this below link and got the solution.

Please note it:

http://wiki.scn.sap.com/wiki/display/XI/Step+by+Step+Mail+To+File+Scenario

Thanks all for ur help

Best Regards,

Monikandan.

Answers (5)

Answers (5)

monikandan_p
Active Participant
0 Kudos

Hi all,

      I have done this development but now i am facing one issue.

From Mail ->PI->FTP is working,but the data is not coming as per in the attachment.

Kindly go through the screenshot and help to solve this issue.

Best Regards,

Monikandan

rhviana
Active Contributor
0 Kudos

Hi Monikandan,


Do you did this configuration at Adapter Mail Sender ?

http://help.sap.com/saphelp_nwpi71/helpdata/EN/2e/bf37423cf7ab04e10000000a1550b0/content.htm?framese...

Please post a image of module adapter mail sender.

Regards,

Former Member
0 Kudos

Hi Moni

Have you used payload swap bean to swap the main payload with attachment data??

Please tell us briefly what is the exact issue.

monikandan_p
Active Participant
0 Kudos

Hi Indrajit,

  Kindly verify the sender and receiver module.

Sender:

Receiver:

Best Regards,

Monikandan.

Former Member
0 Kudos

Hi Moni

Use the below module parameters in the sender adapter

This will make the attachment as your main payload. Please make sure you have checked the keep attachment option in the sender mail adapter.

Now if you want to populate the attachment name , then you need to use message transformation bean in the receiver adapter.

Parameter

Transform.ContentDisposition =   attachment;filename="MailAttachment-1.csv"

monikandan_p
Active Participant
0 Kudos

Hi Indrajit,

     I have configured the module key as per ur instruction but now also it showing the same result.

Kindly go through the below screenshot,verify the config and let me know any changes need to do.

Sender Communication channel  Config:

Receiver Communication channel config:

§  As you said already I have give the Parameter Name like this:

  1. Transform.ContentDisposition =   attachment;filename="MailAttachment-1.csv"

Source:

Data from mail attachment

Target:

To FTP Folder->output is like this

Kindly help to resolve the issue.

Thanks.

Best Regards,

Monikandan

monikandan_p
Active Participant
0 Kudos

Hi Ricardo,

     I have configured the module key as per ur instruction but now also it showing the same result.

Kindly go through the below screenshot,verify the config and let me know any changes need to do.

Sender Communication channel  Config:

Receiver Communication channel config:

§  As you said already I have give the Parameter Name like this:

  1. Transform.ContentDisposition =   attachment;filename="MailAttachment-1.csv"

Source:

Data from mail attachment

Target:

To FTP Folder->output is like this

Kindly help to resolve the issue.

Thanks.

Best Regards,

Monikandan

Former Member
0 Kudos

Hi Moni

Please make the below changes and then test

in the sender mail adapter the swap.keyValue will be attachment-1 .

In the receiver adapter , remove the dynamic configuration module and use the message transformation bean

localejbs/AF_Modules/MessageTransformBean


use the parameter


Transform.ContentDisposition =   attachment;filename="MailAttachment-1.csv"

Former Member
0 Kudos

Hi Monikandan,

Were you able to successfully setup the scenario?

BR,

Bálint

monikandan_p
Active Participant
0 Kudos

One more question:

What are the  pre requisities  to do for the mail configuration  to pick the attachment from email.

How about the performance its good?

Kindly guide.

Best Regards,

Monikandan

iaki_vila
Active Contributor
0 Kudos

Hi Monikandan,

As far as i know there isn't any prerequisite remarkable when you use the Sender mail adapter, you only need to have access to the mail server with the needed ports. Check the help documentation Configuring the Sender Mail Adapter - Configuring the Mail Adapter in the Integration Directory/PCK ...

About the performance, per my experience, i havent got any problem with that.

Regards

Former Member
0 Kudos

Hi Moni

Just you need check the keep attachment option in sender mail adapter. Nothing else is required.

Don't worry about performance.

rhviana
Active Contributor
0 Kudos

The Minkandan,

All depends of the scenario provide from Client.

There is a client that's accept the "design of interface" using one mail box and receiving one attachement/mail.

This scenario is simple and it's possible to use the Module Adapter from SAP - PayloadSwapBean.

But I saw in some clients, there they have a one mail box only, to receive a many attachments in one mail box also this attachments there are .pdf, .txt .jpg .pgn and .xml, for that you must use Module adapter custom to separate the .xml from the others formats.

Regards,

BR.

Ricardo Viana.

monikandan_p
Active Participant
0 Kudos

Hi Ricardo,

      I have done this development but now i am facing one issue.

From Mail ->PI->FTP is working,but the data is not coming as per in the attachment.

Kindly go through the screenshot and help to solve this issue.

Best Regards,

Monikandan

Former Member
0 Kudos

Hi Moni

Use Payload Swap bean to make the attachment as main payload.Use this module in sender mail adapter

Check this

PayloadSwapBean (SAP Library - SAP Exchange Infrastructure)

iaki_vila
Active Contributor
0 Kudos

Hi Monikandan,

You can do it with standard beans, Check sivasakthi danasekaran's blog


Regards.

rhviana
Active Contributor
0 Kudos

Verry good blogs