on 2014 Feb 27 10:29 AM
Dear,
When I test a json deep insert (For eaxmple:a POST on /sap/opu/odata/sap/<Gateway_service>/<GW_Data>Set in the GW Client then it returns the result in atom/xml....
If i add ?$format=json to the call i receive following error:
The Data Services Request contains SystemQueryOptions that are not allowed for this Request Type
Is there a way to get the response in json for a POST deep insert/create?
Thanks in advance!
Kind Regards,
Robin
Request clarification before answering.
Hi Robin,
This error is coming from method PROCESS_ENTITY_SET (/IWCOR/CL_DS_PROC_DISPATCHER)
Below system query options are not allowed for POST.
" system query option are not allowed
IF io_uri->expand IS NOT INITIAL OR
io_uri->select IS NOT INITIAL OR
io_uri->filter IS BOUND OR
io_uri->orderby IS BOUND OR
io_uri->skip IS NOT INITIAL OR
io_uri->top IS NOT INITIAL OR
io_uri->skiptoken IS NOT INITIAL OR
io_uri->inlinecount IS NOT INITIAL OR
io_uri->format IS NOT INITIAL.
RAISE EXCEPTION TYPE /IWCOR/cx_DS_proc_error
EXPORTING
textid = /IWCOR/cx_DS_proc_error=>invalid_system_query_option.
ENDIF.
May be using batch call you can get response in JSON format. I mean using batch method, 1st give call to POST and then to GET which allows $format.
again on client side (may be ui5), you can easily convert response in json format with available APIs.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.