cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Ariba to third party how to extract the attachments with cid in SAP CPI

Ajaykumar07
Newcomer
0 Likes
509

Hi,

Introduction:

In SAP Cloud Platform Integration (CPI), handling MIME messages, especially when extracting PDFs or documents from a cid (Content-ID) reference within a URL tag, can be challenging and how to decode the attachment in CPI.

Understanding MIME Messages:

MIME (Multipurpose Internet Mail Extensions) messages allow the inclusion of various media types (like PDFs, images, etc.) in email messages and other internet communications. In an SAP CPI context, these messages often need to be decoded and processed to extract attachments referenced by cid URLs.

 

The Challenge:

You might encounter a scenario where the MIME decoder does not work as expected in SAP CPI. This can be problematic when you need to extract embedded documents (like PDFs or DOCs) that are referenced by a cid in the URL tag of your XML payload.

Sample payload 

Content-Type: multipart/related; type="text/xml"; start="12345@domain.com"; boundary="boundary123"

 

--boundary123

Content-Type: text/xml; charset="utf-8"

Content-ID: <12345@domain.com>

 

<?xml version="1.0" encoding="UTF-8"?>

<cXML version="1.2.020" xml:lang="en-US">

    <Request>

        <InvoiceDetailRequest>

            <InvoiceDetailRequestHeader>

                <Comments>This is a comment [Attachment 1]</Comments>

            </InvoiceDetailRequestHeader>

            <Attachment>

                <URL>cid:attachment1.pdf</URL>

            </Attachment>

        </InvoiceDetailRequest>

    </Request>

</cXML>

 

--boundary123

Content-Type: application/pdf

Content-ID: <attachment1.pdf>

Content-Transfer-Encoding: base64

 

JVBERi0xLj

QKJcfs...

--boundary123--

 

Thanks,

Ajay Kumar 

Accepted Solutions (0)

Answers (0)