on 2024 Dec 16 4:06 PM
Hi,
I am trying to create Sales Order in SAP Public Cloud with help of Sales Order Integration, SAP_COM_0109. I am getting error "Unexpected character '{' (code 123) in prolog at [row,col {unknown-source}]: [1,2]". In note 3266527 stays: "Use XML". Why? When I run Postmen with same endpoint and JSON body I am able to create Sales Order. Why in iFlow I must convert it to XML or there is some way to enable JSON as accepted format?
Thank you
Request clarification before answering.
Hello,
In the SAP Public Cloud environment, especially when dealing with SAP S/4HANA Cloud, the system often expects data to be exchanged in XML format via APIs, particularly for standard communication scenarios like SAP_COM_0109. This explains why SAP Note 3266527 mentions the use of XML.
Here is why you might be able to create a sales order using Postman with a JSON body: Postman allows you to send requests in different formats depending on the configuration of the API endpoint and the content-type header you specify. It's possible that when you tested with Postman, you configured the request with the appropriate headers to accept JSON, and the backend system for Postman was able to process JSON for that specific endpoint.
In the SAP iFlow scenario, if the standard communication arrangement SAP_COM_0109 is designed to accept XML, it won't accept JSON directly. However, one way to handle this is by using a JSON to XML conversion step in your iFlow. You can introduce a content modifier or a mapping step to convert the JSON payload to XML format before sending the request.
Therefore, I'd suggest you convert your JSON to XML according to the SAP Note 3266527.
Best regards,
Dequan Xu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
34 | |
22 | |
16 | |
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.