cancel
Showing results for 
Search instead for 
Did you mean: 

Mail receiver adapter: change filename of attachment to number in payload.

Former Member
0 Kudos

Dear experts,

I want to send out Purchase Orders from XI to a email address. The XI message containing the Purchase Order is sent as an attachment to a email to the supplier. However, the filename of the attachment needs to unique. Preferably the PO number which is in the file content.

Can anybody help me out with how to accomplish this?

My current settings are:

Transport protocol: SMTP

Message Protocol: XIPAYLOAD

Not using mail package

Keeping attachments.

Using: MessageTransformBean

Transform.ContentDisposition --> attachment;filename="testing.xml"

Please tell me how to dynamically change the "testing.xml" part!

Thanks in advance,

*will reward points if helpful

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Use this

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

Regards,

Prateek

Former Member
0 Kudos

Thanks Prateek!

This is what I was looking for.

Can you please do me one more favour?

How to include this code in the module? I have been looking on help.sap.com but only found to be able to do this in PCK. Is this correct?

How can I use the code?

Thanks in advance.

prateek
Active Contributor
Former Member
0 Kudos

Thanks again Prateek,

Is there no easier way to perform this action of dynamic renaming?

Seems a bit elborate...

Thanks in advance.

prateek
Active Contributor
0 Kudos

Read the first comment under the weblog i mentioned earlier. I am not sure it will work or not but u may give it a try

Regards,

Prateek