cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Operation error only with GET operation

furlan
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor

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

furlan
Participant
0 Kudos

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

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

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