Skip to Content
0
Former Member
Mar 01, 2011 at 09:21 AM

IDOC to PDF and XML via EMail: using InputAttachment interface in mapping

67 Views

Hello Together,

I am working on the following scenario:

IDOC --> Transformation Nr. 1 IDOC-XML; Transformation Nr.2 XML- PDF --> Email with 2 Attachments XML and PDF.

Till now Iu2019ve managed "IDOC to Email" with XML-Attachment. Therefore I used MailPackage and SwapBean. Unfortunately I didnu2019t see any possibility to send PDF attachment with MailPackage approach.

Thatu2019s why I decided to change the scenario in this way to avoid using of MailPackage:

u2022 first step: IDOC to FTP (2 XML files)

u2022 second step: FTP (1. file = payload + 2. file= attachment) to Email with one XML-attachment

It works without MailPackage, but I still need the PDF-attachment. In the moment I am trying to read the XML-attachment, to transform XML2PDF and to add the second attachment to the message inside of mapping . I use InputAttachment and OutputAttachment interfaces.

http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/InputAttachments.html

Unfortunately the reading of the XML-attachment with u201CInputAttachementu201D interface inside of mapping doesnu2019t work. Tracing says: "there is no attachment".

So my questions are:

1. Is it possible to work with Input- and OutputAttachement interfaces inside of mapping? Or does it work only inside of adapter module?

2. If it works inside of mapping, how can I test it in design time?

If you see any other way to solve my problem, let me know please.

Thank you a lot, regards Anna