cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic excel filename Receiver Mail adapter

Former Member
0 Kudos

Hi all,

May i know what is the way to dynamically set the file name of attachment in receiver mail adapter.

Can we do using DynamicConfiguraion???

If yes how?

Thanks In Advance,

H.L.Babu

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Yes we can set the attachment name of the mail dyanamically, using a adapter module.

Thanks for all your replies.

Former Member
0 Kudos

But i am not using any mail package.

and also in adapter module i have written code like..

byte by[] = generateExcel(is);

xp.setName(filename);

System.err.println("The name of the file."+filename);

xp.setContentType("application/vnd.ms-excel");

xp.setContent(by);

System.err.println("After successful setting of XML Payload");

msg.setDocument(xp);

System.err.println("Message Set is successful");

But it is not getting the excact file name..

Any coments..

former_member187339
Active Contributor
0 Kudos

Hi Babu,

>>But i am not using any mail package. and also in adapter module i have written code like..

May be you should have mentioned this earlier..

Have you tried setting the content disposition as i mentioned earlier in your module? Try doing that

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

That will not work..

Is there any other way...

I am not using any mail package i am supposed to set the attachment dynamically.

I went through the blog

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1757138050DB11322619323182075768End...

but the attachment name is not coming properly..

former_member187339
Active Contributor
0 Kudos

Hi Babu,

>>May i know what is the way to dynamically set the file name of attachment in receiver mail adapter.

1. Use mail package XSD as target

2. Set receiver mail adapter to use mail package and

3. Create content disposition and content type dynamically using dynamic configuration in mapping

Content disposition of Mail package should have value


attachment;filename="<yourfilename>"

Rgards

Suraj

Shabarish_Nair
Active Contributor
0 Kudos

one option is

Dynamic name in the mail attachment - pseudo "variable substitution"

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

similarly dynamic configuration can also be utilized.

former_member200962
Active Contributor
0 Kudos

Check the links given here:

There are lot many thread dealing with the same issue......just make use of the search option to know more.