cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway error on Post of Binary Image data in gateway client.

Pavan_Golesar
Active Participant

Dear All,

NOTE:Currently we are facing issue with JSON formatted payload in case of PUT/POST operation hence we are forcefully diverted to use XML (Also raised a query ).

Scenario briefing :Here we a trying to use POST operation for passing the data from Gateway to backend RFC enabled FM.

But the challenged is that gateway client is not accepting it as shown below:

In error Log it says as below:

Error in conversion from UTF-8 to type X or type XSTRING: 3839353034453437304430413141304130303030303030443439343834343532303030

Below is are two required snapshots from SEGW:

Question: How can we resolve this issue?

Can any1 share some views on this critical issue.

Thanks

Pavan G

Message was edited by: Pavan Golesar

Accepted Solutions (1)

Accepted Solutions (1)

EkanshCapgemini
Active Contributor

Hi Pavan,

Are you using base64 encoded string of binary image file? If yes, please check this link to properly encode your file to base64 string

Upload File to GOS | SCN

You need to define your Photo1 parameter as string and not as rawstring in this case. You may need to convert base64 to xstring in POST method if your backend FM requires a XSTRING value (depends how FM is designed).

Regards,

Ekansh

Pavan_Golesar
Active Participant
0 Kudos

OK. But since it critical issue and need immediate solution this is what I am going to do:

Passing Base64 string format of image to gateway.

At gateway this is handled as EDM.Sting and passed to bapi.

In backend, the bapi converts this string to binary and stores in DDIC.

Hope this is correct and works.

Correct me if I am wrong

Message was edited by: Pavan Golesar

EkanshCapgemini
Active Contributor

Hi Pavan,

That would work however do include a field for MIME_TYPE as well.

Regards,

Ekansh

Answers (0)