Skip to Content
0
Former Member
Nov 26, 2013 at 03:56 PM

Attaching a file to a SOAP message

58 Views

SAP PI (7.11) receives an extended version INVOIC.INVOIC02 IDoc from SAP ECC 6.

The extension segment provides data required to retrieve contents of a PDF file from the outbound SAP ECC system. The retrieval is performed by an RFC which is called at mapping runtime. The RFC returns a string in encoded form representing the contents of the file. The business partner requires the file to be attached to the SOAP message and not passed as a string inside the payload.

sample section of the target payload containing the file contents.

<ns0:Attachment type="FILE">

<ns0:AttachmentName>FSO302175.pdf</ns0:AttachmentName>

<ns0:CustomContent>JVBERi0xLjcKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzCjw8……. </ns0:CustomContent>

</ns0:Attachment>

However, the vendor needs this to be included as MIME attachment.

Would checking the "Keep Attachment" option in the receiver soap adapter achieve this?

What would be the best way to do this?