cancel
Showing results for 
Search instead for 
Did you mean: 

S/4 HANA API_SALES_ORDER_SIMULATION_SRV get JSON instead of XML

aocabral
Explorer
0 Kudos
132

Hi,

I'm building a flow on BTP Integration Suite to call API_SALES_ORDER_SIMULATION_SRV OData from S/4.

I'm using OData Adapter, the flow works fine and I receive a response from S/4.

However, the response is in XML format, and I need OData Json format.

I tried adding content modifiers as "Accept: application/json", but still I get an XML.

How can I achieve that? Anyone has a working example?

Thanks,

Adriano

View Entire Topic
Ryan-Crosby
Active Contributor
0 Kudos

If you are using OData V2 it says that $format is not supported, so you would need to make use of the HTTPS adapter.  However, if you are using V4 then you should be able to make use of $format unless the help documentation is incorrect.

Screenshot 2024-06-24 at 13.34.36.png

 

Regards,

Ryan Crosby

aocabral
Explorer
0 Kudos
Hi Ryan, this is actually a POST call, so we are not using $format. We used HTTPS for GET calls and that worked fine to receive a JSON response. Same is not happening for ODataV2 and POST. We are using OData adapter to leverage the CSRF token fetch.
Ryan-Crosby
Active Contributor
0 Kudos
@aocabral updated answer with appropriate screenshot from help.