cancel
Showing results for 
Search instead for 
Did you mean: 

How to send binary files like .jpg from SAP to Database system through PI

Former Member
0 Kudos

Hi Experts,

In my reqirement we have to send images like .jpg files from SAP system to Database system through PI. And along with the images we have to send some  fields like Emp.No, Emp Name etc.

I got some blogs regarding converting only binary files into hexadecimal and it stores into database in BLOB column. in my case i need to send image file along with fields. Anybody can provide solution to solve this requirement.

Thanks,

Gangadhar

Accepted Solutions (1)

Accepted Solutions (1)

former_member181985
Active Contributor
0 Kudos

Hi,

You need to use ABAP proxy with attachements approach.


Check Michael's blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies...

- Praveen

Former Member
0 Kudos

Hi Praveen,

If i use it as an attachment, how the attachment will store in Database. The image should  be stored in DB along with fields.

thanks for reply....

Gangadhar

udo_martens
Active Contributor
0 Kudos

Hi  Gangadhar,

you need to merge the image and the fields into one message. Most easy from my point of view would be to do that in ABAP stack of SAP system. Just store the picture as base64 binary. You can do the same in PI reading the attachment in mapping time.

Regards,

Udo

former_member181985
Active Contributor
0 Kudos

You need to convert attachement into payload via mapping (graphical or java)

1. Field payload (XML)

2. convert JPG to base64. check my blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/03/28/sap-xipi-storing-binaries-images-...

you need to use stored procedure for this with structure like below

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

<ns0:MT_JDBC_INSERT xmlns:ns0="urn:xyz.com/JDBCBLOBDemo"> 

    <STATEMENT_SP> 

        <storedProcedureName action="EXECUTE"> 

            <table>TESTSP</table> 

                              <field1>Employee Name</field1>

            <inputblob type="BLOB">HexDecimalBinaryString</inputblob> 

        </storedProcedureName> 

    </STATEMENT_SP> 

</ns0:MT_JDBC_INSERT> 

Answers (0)