cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic filename in Mail Receiver Adapter

Former Member
0 Kudos

Hi,

I am using File and Mail adapter. I need to pick the file from FTP server and Attach to the mail and send it.

I am using Payloadswapbean & MessageTransforBean.

I am not using IR , So files with different names should be picked and attach to the mail and send it.

I am able to send it but the filename is not same as the source file name.

What should i do for thefile name for attachment should be same as the source filename.

"Points will be awarded"

Regards,

Jayasimha Jangam

Accepted Solutions (1)

Accepted Solutions (1)

former_member537867
Active Contributor
0 Kudos

Hi Jayasimha,

We can do this by "Adapter Specific Message Properties" of ur comunication channels.

1.If u want to keep the output filename same as input filename, no need to use the UDF. only the 'adapter specific parameters' in both sender n receiver file adapter will do that.

In case if u want to get the filename inside our mapping we have to create a user defined function

which will return the filename and map it to one of our XML tags. 2nd point gives solution 4 that:

2. If u want to generate an output file taking some input from the payload,then u hav to use the UDF.There u hav to populate the name.

Pretty much.... if you set an attribute from the sender side, for example, you can use a UDF and access the particular attribute sent and use it in the mapping. In another example, where no attributes are sent from the sender, you can still actually set a particular attribute, say a filename derived from the payload, using a UDF, and enable the receiver attribute to use it. That's where the UDFs come in - either to get or set particular adapter specific message attributes.

This will be a very helpful blog which solves ur query:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Regards,

Vinod.

Answers (5)

Answers (5)

Former Member
0 Kudos
Former Member
0 Kudos

Hello,

Check these links,,,,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1...

/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

Regards,

Former Member
0 Kudos

Hi,

PS check this link

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

reg,

suresh

Former Member
0 Kudos

Hi,

Follow this link

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

Former Member
0 Kudos

Hi,

Check this thread...

it may help you..

Thanks,

Vijaya