cancel
Showing results for 
Search instead for 
Did you mean: 

Mail - multiple attachments (PDF) to File System

Former Member
0 Kudos

Dear Experts,

I need your expertise to achieve my following requirement.

Client installed a office 360 mail box to receive Invoices in a PDF format. Vendors used to send their Invoices in a PDF format to this office mail box. Each mail will have 1 or more attachments in a PDF format. A resource used to retrieve these attachments and post on ECC system.

Now, we need to make this requirement as online using PI. Version of PI 7.4 dual stack.

PI has to pick the attachments from the email and place them on File System.

Could you please help me to achieve this Interface on PI ?

Thanks

Rams

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Experts,

I have configured the sender Mail Adapter by using the new OSS note 2040884 (Processing Mail attachments as PI messages).

The email has 1 PDF document attached, PI is able to read the email.

Configuration

Module

Result is like following...

on RWB

in Moni

when i click on Display, i can able to view my PDF attachment

but in the above screenshot i couldn't able to find the attachment, however the MaiDocument itself is showing like PDF document.

I need following clarifications and help to place the PDF document on Network directory using File Adapter.

1. I don't know why PI is not taking the attachment as attachment and it is considering the attachment as a message

2. How to download this PI message as PDF document with the same name on Network directory ?

As of now, i am using the file adapter as receiver and i can see the file as interface name without any extension. as shown in below screenshot

Please let me know any other options to get this PI message as my extension document?

Thanks
Rams

former_member190293
Active Contributor
0 Kudos

Hi Rams!

You've just set in module parameters to create message from attachment and ignore message payload. So your message main payload is replaced with attachment and main payload itself is lost.

Regards, Evgeniy.

Former Member
0 Kudos

Dear Evgeniy,

I will update and will check whether it will show the attachment now or not?

Meanwhile from the OSS note

Mail.IgnoreMainPayload : This parameter is used to ignore the actual payload of the mail message(which is

being picked up by the Mail Sender channel).

If Mail.IgnoreMainPayload = true and the mail message contains 5 XML attachments then 5 XI messages will

be created and sent to IS.

If Mail.IgnoreMainPayload = false (default) and the mail message contains 5 XML attachments then 6 XI messages(1 for MainPayload and 5 for XML attachments) will be created and sent to IS.

--> how is this related to Attachment

thanks
Rams

former_member190293
Active Contributor
0 Kudos

Hi Rams!

That's right.

Once you have the only attachment and ignore main payload you have just one message as adapter output.

If you set not to ignore main payload - you'll have two messages.

And so on, depending of attachments count.

Regards, Evgeniy.

Former Member
0 Kudos

Hello Evgeniy,

I have updated the module as per your suggestion... please find below screenshots of result after this

In Mail - I am sending 2 attachments like following

In RWB and MONI i can see 3 messages (1 for message body and 2 for attachments)

Message 1 in Moni

Message 2 in moni - First Attachment from Mail

Message 3 in moni - Second Attachment from Mail



Problem:

1. I didn't find any attachment in 2 messages

2. When i try to open the PDF (by clicking on MailDocument) it is empty



Another strange issue is, the DynamicConfiguration section is empty even i selected 'Adapter-Specific attributes', Hence i can't achieve my solution Attachment name with same name on network directory.


Need your kind help


I don't know why SAP is released the note 2040884 to get multiple attachments from email because the dynamic configuration is not working and attachments are also missing...



Thanks

Rams

former_member190293
Active Contributor
0 Kudos

Hi Rams!

First, I'm not sure you are able to fulfill your requirement even with new functionality of mail adapter since it is intended for XML attachments processing:

Attachment.ContentType :  This parameter is mandatory when the above parameter(Mail.GenerateXIMsg) is configured to 'true'. This will help to process only those attachments whose content-type is text/xml. Hence the value of this parameter must be text/xml.

    If Attachment.ContentType = application/xml and the mail message contains 3 XML files(.xml) and 2 Text files(.txt) then 4 XI message(1 for payload and 3 for XML attachments) will be created and sent to IS. Hence we will ignoring Text files(.txt) files.

I would recommend you to use AttachmentSplitterBean developed by .

Regards, Evgeniy.

Former Member
0 Kudos

Dear Experts,

I have configured the Interface by using the link but it is placing only 1 attachment  on File System.

Could any one help me how to place all attachments (PDF Files) on File system after picking up from mail?

thanks

Rams

Former Member
0 Kudos

Sorry, the proper link is which i used to configure my scenario and it is picking first attachment and placing with the same name on File

need same kind of solution to pick multiple attachments and place them on File System with the same name.

Thanks

Rams

Harish
Active Contributor
0 Kudos