on 03-27-2006 6:18 PM
Hi folks,
our scenario is:
1. are receiving mails with a csv file as an attachment
2. we use a senderChannel with the Mail adapter to get the mails
3. we swap the mail content with the attachment with localejbs/AF_Modules/PayloadSwapBean
4. we transform the "attachment" to XML with
localejbs/sap.com/com.contentmaster.CMTransformModule/CMTransformBean
5. we use the mail adapter
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
My question:
We need the filename in SAP but I have no idea how I can get the filename after the swap. Is it possible to get the filename and how can I integrate the filename into the XML or IDOC?
Andreas Solf
Hi Andreas,
Take a look at this blog.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prashanth,
we not use the file adapter at the moment. So do you think this will be necessary or we find a solution without the file adapter.
Hi Moorthy,
we define a dynamic filename when we sent a message (option 1), but we need the name of the attachment when we recieved a new mail.
Cheers Andreas
Hi Morrthy,
I just read the topics of the blog you sent to me
Did you ever wanted to post your message as an attachment with the mail adapter?
Did you ever used MessageTransformBean to set a static name to your attachment?
Finally, did you ever wanted to make it a little more dynamic?
and found that we have a solutions for this questions. We not need to create or name attachments. We need to get the filename of an attachment that was sent to us.
Cheers Andreas
Hi,
Check this weblog, this shows how to add the file name in payload.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Thanks,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again,
still searching for a solution.
The payload data are:
Content-ID: <payload-e2055983be3011dabf3b001279cd5411@sap.com>
Content-Type: application/octet-stream;name="filename.csv"
Content-Disposition: attachment;filename="MailAttachment-1.bin"
Content-Description: MailAttachment-1
<?xml version="1.0" encoding="UTF-8"?>
...
How can I get the filename out of the headerdata to include it into the XML.
Cheers Andreas
P.S. I start my first steps in XI and I'm not a XI professional. So please send me a step by step solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
There are two options-
Option 1: Use the Module Processor code in the Mail Adapter and get the file name and use it in the Mapping
Option 2: Use java Proxy to invoke the MailBox and detach the attachment and construct the XML message and send into XI
Here is link for using the module in Receiver Mail Adapter- just for the info
/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.