on 11-16-2015 9:08 PM
Hi,
I'm trying to execute a batch operation and when I use GET operation, I get error "The Data Services Request could not be understood due to malformed syntax". It does not happen with any other operation (tested with PUT and POST).
I already tried several solutions discussed in the SCN, but I'm still getting this error.
My HTTP request:
My response:
Doing more deeply investigation (debugging) I found something interesting:
In method: PROCESS_BATCH (/IWCOR/CL_DS_PROC_DISPATCHER)
And processing the BATCH, I found something that intrigues me:
When it's processing the requests in the bacth, if operation is something different of POST/PUT/PATCH/MERGE/DELETE, in my case GET, the flow goes to exception and ends with the error above.
Does anybody already saw that? Any comments?
Thank you!
Flavio
Flavio,
I think it is simple. 'Changeset' is only for edit operations. For 'GET' you do not need to wrap it with a 'Changeset'.
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Thanks for your response, it does not directly correct my issue, but give another direction on my investigation that leads me to correction.
In my batch operation at SAPUI5 I was using method addBatchChangeOperations to add a READ operation into the batch collection, but the correct method is addBatchReadOperations.
Thank you for your help!
Flavio
Hello Furlan,
Please find the below sample payload format and create your payload as below ->
QUERY :
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET get_emp_dataSet?$filter=Userid+eq+'00001' HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET get_emp_dataSet?$filter=Userid+eq+'00002' HTTP/1.1
--batch--
READ :
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_dup_vendor1('0103541011059') HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_dup_vendor1('0103541011052') HTTP/1.1
--batch--
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.