cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File naming in Mail attachment

Former Member
0 Kudos

Hi experts,

I am doing a Mail to File scenario, in which at the sender side I have a mail with File attachments.We are using IMAP protocol and picking up from a URL.At the receiver end we have to provide a file which is the attachment from the incoming mail.

With the help of the module I have separated the body and the attachment and the file is created with the static name I provided in the File adapter

My requirement is to dynamically name the file based on the customer name.I am not configured the design part, as no mapping of the interfaces are required.

For some reason,I am not able to open the mail bodyin sxmb_moni,but can see the attached file.

Thanks,

Tushar

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Thushar,

use module PayloadSwapBean at mail adapter to get the attachment into message.

Define a variable at File Receiver Adapter / Advanced Tab and refer it as part of the filename: myFile%Customer%.xml

[Configuring the Receiver File/FTP Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm]

[XI: Sender mail adapter - PayloadSwapBean - Step by step|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2849] [original link is broken] [original link is broken] [original link is broken];

Regards,

Udo