Skip to Content

SAP PI Sending mail with 2 pdf attachements to Proxy

Oct 20, 2017 at 09:27 AM


avatar image

Hi PI Experts,

I am working on a POC like we will be receiving mails from a folder in the mail server. The mails will have one or more pdf statements. PI has to send the "From", " To" ,"Subject" which are received from the mail to ECC Proxy along with the pdf attachments.

Is it possible for PI to send the mail pdf attachments directly to proxy with out reading?

If PI has to read the attachments let me know how we can send the attachments to proxy .

Thanks in advance


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Oct 20, 2017 at 09:56 AM

Hi Ramya!

Yes, Proxy runtime supports attachments processing via IF_WSPROTOCOL_ATTACHMENTS protocol.

DATA: lr_attachments TYPE REF TO if_wsprotocol_attachments.
DATA: lr_server_context TYPE REF TO if_ws_server_context.
lr_server_context = cl_proxy_access=>get_server_context( ).
lr_attachments ?=lr_server_context->get_protocol( if_wsprotocol=>attachments ).
lt_attach = lr_attachments->get_attachments( ).
* instantiate Attachment
LOOP AT lt_attach INTO l_attachment.

Regards, Evgeniy.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
I want to know the Design and configuration settings how to achieve the above scenario in PI.

Hi Ramya!

Mail attributes that you mentioned above can be added to XI message header (and further you can read it in mapping, for example):

Mail attachments will be passed to receiver proxy as message attachments.

Regards, Evgeniy.


Hi ,

It is not about how to pass the mail attributes.I need exact parameters to be maintained in the ESR and ID to send the mail with 2 PDF's attachments.If possible if you had worked on the above scenario pls share the exact design and configuration objects with the screen shots.

The above link is about how to configure sender mail adapter.

I need some brief explanation on how it can be achieved.

Thank you

Anurag Gupta Oct 24, 2017 at 10:58 AM

The protocol to call the Proxy is SOAP/HTTP having a XI 3.0 message protocol. and of-course we can send attachment for a SOAP/HTTP service.

10 |10000 characters needed characters left characters exceeded