cancel
Showing results for 
Search instead for 
Did you mean: 

receiving PDF via mail and send via RFC into ERP

rainer_hbenthal
Active Contributor
0 Kudos

Hi,

i have a scenario where i'm picking up an email with an attachmanert. With Payloadswapbeans i'm picking up the attachmant and make the attachment the payload. The original content is not important.

This works well, the email is picked up, the module states SUCCESS swapping the payload, but then i'm getting a mapping exception. I ssume that there is a problem with the binary content of the PDF.

I tried every combination in the mailadapter use package mail/base64 encoding but there no change in the error.

What can i do to get the binary content base64 encoded and map this to the importing parameter of the remote function?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

> Hi,

>

> i have a scenario where i'm picking up an email with an attachmanert. With Payloadswapbeans i'm picking up the attachmant and make the attachment the payload. The original content is not important.

>

> This works well, the email is picked up, the module states SUCCESS swapping the payload, but then i'm getting a mapping exception. I ssume that there is a problem with the binary content of the PDF.

>

> I tried every combination in the mailadapter use package mail/base64 encoding but there no change in the error.

>

> What can i do to get the binary content base64 encoded and map this to the importing parameter of the remote function?

In a past project, i did this with an Udf function, that decode in binary64,

but this is a usefull alternative (as just posted):

https://wiki.sdn.sap.com/wiki/display/XI/HowtoSendBinaryDatatoRFCfromXI(or)PI

RKothari
Contributor
0 Kudos

Please check the below thread:

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Maybe after the payload swap bean, you need to convert the binary input into hexadecimal string as what was done in this blog:

/people/praveen.gujjeti/blog/2010/03/28/sap-xipi-storing-binaries-images-pdfs-etc-in-the-database-blobs-using-jdbc-adapter

except that in your case, instead of forming the stored procedure xml, you replace that with your rfc structure.

note: there is an extra 1byte of hardcoding that was done

Hope this helps,

Mark

stefan_grube
Active Contributor
0 Kudos

> What can i do to get the binary content base64 encoded and map this to the importing parameter of the remote function?

Write a Java Mapping.