cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic attachment - receiver mail adapter

Former Member
0 Kudos

Hi,

The attachment name should be of the SAP OSS note "1496201".

The note has:

"Accordingly to the new standards defined by the Brazilian authorities (SEFAZ) the XML file names must be generated as follows:

NF-e: -nfe.xml;

Cancellation: -can.xml;

Skipping: -inu.xml."

The current solution is almost on the same lines

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00a7ba12-e7cd-2b10-d589-e52b11346...

I have explored SDN & got the link

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

Please suggest how do I approach to implement the note "1496201" in my solution.

Regards,

Farooq

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You should already have the the access key in subject from the UDF on pg13. Just change the last line to "return subject" from "return xml" then concat it with -nfe.xml

Regards

Asif K

stefan_grube
Active Contributor
0 Kudos

when you have the required access-key in the XML, then you can do it similar as in Michal's blog.

If you just want to send the attachmanet without email body, you need not create a new attachment, you can just set the file name with this line:

payload.setContentType("application/xml;name=\"" + fileName + "\"");