on 06-15-2006 7:45 AM
I have to send file with original name as attachment through Mail Adapter. I am picking the file from FTP server through File Adapter. I am not using message mapping because files do not have any standard format.
Hi Gaurav, thanks for your response...
Yes, i think ;o)
But i do a mistacke and i don't kown where...
In module, i have setup these parameters :
AF_Modules/DynamicConfigurationBean 1
AF_Modules/MessageTransformBean rename
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.FileName
rename Transform.ContentDisposition attachment;filename=message.FileName
rename Transform.ContentDescription message.FileName
rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
Result : my file name is 'message.FileName'...
Think I didnt understood properly something...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ohh
I didnt understood properly.
Did you tried michal's method with Module.
You can capture the filename with getElementByTagName and then set it back while creating an attachment.
Even without using IR we can capture filename in Dynamic Configuration that can be used in module
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
Our problem (Alok and me) is that we don't use any mapping... we use a 'virtual interface' without IR access, so no UDF...
The only thing that we can do, is access to ASMA on DynamicConfigurationException module...
and i believed that SAP prefers ASMA to mail package...
I begin to think that there is no solution...
Edited by: Emmanuel JORAND on Sep 30, 2008 7:26 AM
Edited by: Emmanuel JORAND on Sep 30, 2008 7:27 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Alok
A very simple trick can solve this without building a complex code here
Get the file name using Dynamic configuration and do the following.
You need to use Mail package
in the Content_Type field
provide the value like this
<Content_Type>text/plain;name="filename.txt"<Content_Type>
generate this string using constants and filename.txt you can put using Dynamic conf
so it can be
constant(text/plain;name=") contact (UDF for filename)concat constant (")
UDF should capture Dynamic configuration parameter filename and return it.
Thanks
Gaurav Bhargava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
I had a similar scenario where file is picked up from a folder in R/3 system and sent as an attachment through mail.
I used the same mapping what you had mentioned and is using mail package and have checked keep attachments also.
I am still getting the attachment as Untitled.xml with the whole mail packae as the content in the attachment.
Is there some other configuration which needs to be done at the receiver adapter?
Thanks
Justin
hi,
it can be done very easily with a simple adapter module
just have a look at my weblog:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3202
Regards,
michal
-
<a href="https://weblogs.sdn.sap.com/pub/wlg/1843"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alok,
YOu can use the 'content disposition'parameter of MessageTransformBean to achieve this..
For more info.. look at http://help.sap.com/saphelp_nw2004s/helpdata/en/84/2e3842cd38f83ae10000000a1550b0/frameset.htm
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijaya,
In MessageTransformationBean we have ContentDisposition Key name to set file name. But in this we can not set file name dynamically. I have to set the attachment name by file name which we get from FTP through File adapter.
In our scenario we can not use Message Mapping.
Thanks
Alok Sarawat
Hi,
Have you solve your problem ?...
I have exactly the same scenario : pik up a file (file adapter) and send it in attachment by mail adapter without mapping (no IR)...
I activated Adapter specific paramters properties in the File adapter sender and i can see the FileName tag in DynamicConfiguration section of SoapHeader in SXMB_MONI...
I want to use MessageTransformationBean... BUT, how can i 'access' to FileName tag ???...
Thanks...
I setup modules like this :
AF_Modules/DynamicConfigurationBean 1
AF_Modules/MessageTransformBean rename
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.FileName
rename Transform.ContentDisposition attachment;filename=message.FileName
rename Transform.ContentDescription message.FileName
rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
But my file name attachment is message.FileName....
Edited by: Emmanuel JORAND on Sep 29, 2008 9:23 PM
Edited by: Emmanuel JORAND on Sep 29, 2008 10:25 PM
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.