cancel
Showing results for 
Search instead for 
Did you mean: 

OData v4 - Media Handling

former_member480435
Discoverer
0 Kudos
1,011

Hello,

I am currently working with OData v4, which is connected to an external (non-Fiori) application.

Current request is to prepare service, which will be called by that application, via method POST.
With use of this method, external application need to send XML file to SAP.

I have prepared new service, with use of structure, which contains fields:
  • File Name
  • Mime Type
  • Data (XSTRINGVAL)

Unfortunately, during test in /IWFND/GW_CLIENT, I am receiving below error:
"The server is refusing to process the request because the entity has an unsupported format"

First question, is it possible to transfer file to SAP, with use of OData v4, in my system?

System specification:

SAP ERP 6.0 with EHP8
SAP_BASIS 750 0016
SAP_ABA 750 0016
SAP_GWFND 750 0019

Second question, has anyone came across simmilar problem and know how this can be solved?

I know, that in OData v2, in order to process files (streams), model definition must be modified and properties Content Type and Content Source set, but in definition for OData v4, I cannot see such properties.

Best regards,

Damian Dworak

Accepted Solutions (0)

Answers (1)

Answers (1)

hendrik_l
Explorer
0 Kudos

Hello damian.dworak ,


may this similar question helps: https://answers.sap.com/questions/759124/stream-support-for-odata-v4---code-based-implement.html. But a higher version of SAP GWFND (7.51 0006) seems to be required.

Best regards,

Hendrik

damian_dworak1
Discoverer

Hello hendrik_l,

Thank You for your reply and sorry for long time to answer You back.

Finally I was able to fulfill this business requirement, with that version of system.

In transaction /IWFND/GW_CLIENT, there is a Test Group V4_TEST, with a lot of examples provided by SAP.
My solution was based on below example.

I know, that proper REST method for this purpose should be POST, but I got a lot of trouble trying to use it.
With method PUT everything worked like a charm.

Best regards,

Damian