cancel
Showing results for 
Search instead for 
Did you mean: 

Filename in Attachement payload

Former Member
0 Kudos

Hy,

I have to detach an email attachement on my file System.

That's works but I'm not able to maintain the same filename.

Can anybody help me.

Thanks

Mat

Accepted Solutions (0)

Answers (2)

Answers (2)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Mattia,

you can have a look on how to check/add/change

e-mail attachment in the adapter module:

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

if you want to give a dynamic filename have a look at this one:

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Mattia,

If your file name is a part of your email atttachment ( the payload ), then you can dynamically create your file name.

To do this,in the filename of the receiver file adapter, give the filename a <b>%var%</b>.

Anything between % is treated as a varibale by XI. Now, under variable name substitution, you will have to give the value of var and this will act as the filename.

You can access the payload using <b>payload:</b> and the XPATH.

For info on how to do this, check the topic<b> VARIABLE SUBSTITUTION</b> in this link.

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

hope this helps,

Regards,

Bhavesh

Former Member
0 Kudos

Hy,

thank's a lot bt how can i access the payload, my attachment is a .ZIP file.

I tried with the following variable definition.

payload:name,1

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Mat,

If you could tell us how in detail how you are detaching the attachment from you mail into a file, it would help us understand your problem better.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

I receive the email with a sender email adapter the is connected to a File adapter.

I detach my file into the receiveer file adapter with the module "PayloadSwapBean" (with this module I indicated wich payload have to be the data payload). The File adapter write the file corretly on the file system (-> but at the moment with another fix Filename I configured into the adapter).

Thank's a lot for your support

Mat

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

have a look at my reponse how to get the attachment's name + how to set the name of the file

Regards,

michal

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Mat,

I think Michal's 2 nd blog will solve your problem as he rightly pointed out.

Michal thanks for that blog, I just went through it. Quite useful.

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

it has one drawback... works only with sp14 and above

Regards,

michal