Skip to Content
0
Former Member
Dec 04, 2009 at 12:46 PM

Problem in Mail Receiver attachment name

31 Views

Hi all.

we are doing a interface from file to Mail (Excel file as a attachment).

we have written the adapter module to convert the XML from PI to Excel.. which is working fine.

For the attachment name i was hardcoding the attachment name using

localejbs/AF_Modules/MessageTransformBean

and Transform.ContentDescription as Testing.xls.

The scenario works fine.

But i want the attachment name to be dynamically set like xyzddmmyyyy.xls.

I am not using any Mail package.

I want to set the attachment name dynamically. so i follwed the blog

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID0922321550DB00664514007823519662End?blog=/pub/wlg/3202

i am getting the filename from the xmlpayload and setting it using

xp.setName(filename);

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

xp.setContent(by);

but the problem is that now i am not getting the excel file instead a untitled.bin file which have the Contents.

in module configuration i have

localejbs/XMLToExcelConversion LocalEnterpriseBean 0

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean LocalEnterpriseBean 1

Can you please throw some light on this problem..

Thanks in advance

Babu.