cancel
Showing results for 
Search instead for 
Did you mean: 

SAP to REST with attachment

slmason2010
Discoverer
0 Kudos
436

Hi,

There is a zip file on ERP AL11 which needs to be sent to REST url.

how do I map the string containing the file to attachment? or is there a better way to do this?

Set up is: Sender is SOAP, Receiver is REST. ABAP Program retrieves the file and calls the proxy sending the file as xstring. I have tried sending as base64 but was unsure how to decode it before reaching REST.

My current error is 415 unsupported media type.

Any advice would be appreciated.

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

chandrukan
Explorer
0 Kudos

Hi Samantha,

Kindly confirm while data/file sent to Target, will it be only attachment which needs to be sent or along with data and attachment to be sent.? Kindly confirm.

Also, i would suggest you to please check with target vendor whether they can support SFTP service instead of web service connection for ZIP file process. so that our side would simplest task which we can done it via pass through scenario.

Please confirm whether sender SAP will expect response from target while request file sent to target.? please cross check and confirm.

Also, instead of sender as proxy(soap), ask our functional/technical abap consultant to place file (via ABAP program) in AL11 directory instead of proxy. So in this case, we can try to deliver attachment to target via REST.

The below paramters will help you for ZIP file process via REST.

Thanks and Regards,

Chandra Kandepalli

slmason2010
Discoverer
0 Kudos

Thank you for your response.

the data/file sent to Target, will it be only attachment, no other data is required.

Receiver do not want to receive SFTP, REST is our only option.

SAP will expect response from target, I have added response in mapping,

I can reconfigure to use FILE adapter for sender, if this will make it easier.

Regards