on 12-13-2015 3:19 AM
HI All,
I'm trying to do a batch operation on an Odata set but it gives me a malformed syntax error when i execute the URI in Gateway client.
Please find attached along the screenshot of the same. At the same time when i use "boundary=batch_005056A5-09B1-1ED1-BF82-409B26A80600"he header it gives me a success message but does not give me an entity value. Attached also the screen shot of the same.
Appreciate your help.
Thanks,
Praveen
Hello Praveen,
At the end can you please replace ' --batch- ' with ' --batch-- and try ?
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are the data types for values which are passing as Keys ?
Can you share the edm types used for those key properties ?
For example if you are sending decimal value as input then value should not be enclosed inside single quotes when edm types used is decimal.
If at all you send decimal values inside quotes then also you will get syntax error. Please check these aspects once as well.
Correct URI -> GET get_dataSet(ProductID='C1',Price=100) HTTP/1.1
Wrong URI -> GET get_dataSet(ProductID='C1',Price='100') HTTP/1.1
Hi Praveen,
According to the description 1 in section "Attention for batch response" of SAP Note 1869434,
return code 202 means that the correct request header is added, it has nothing to do with the retrieve operations.
there are some good and bad examples in this note.
also there is another blog for Batch , i think it is very good.
http://scn.sap.com/docs/DOC-45504
regards,
Yueqiang
the prerequisite of using batch is to redefine the following methods:
1) /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN
2)/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHAGESET_END.
for you troubling shooting, you could wrie some dummy codes to the begin and end method
and set up an extenal debug point to the following methods
1) changeset_begin method
2) changeset_end method
3) get_entity_set method
you will found out the following sequence:
call changeset_begin method
call multiple times of get_entityset method
call changeset_end_metho
Given that your single call of get_entityset works, you could see the result.
this is a very mature techniques, we used this in couple of projects with 740, sp8 and above.
regards,
Yueqiang
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.