cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Batching multiple operation in a single request

GowthamRaja
Active Participant
0 Likes
3,532

Hi Experts,

I am doing a task as displayed below

How To Batch Multiple Operations Into A Single Request

whether the multiple operation in a single request can be done only with Odata using $batch or there is any different approach. is it possble to do it using rfc methods as per link [Content Deleted June 2013] Kindly help me on this issue

Message was edited by: Jason Lax

View Entire Topic
rohith_deraje
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Raja,

If you are using SUP ODP to consume Gateway REST services, here is some android saple code to send multiple request in single call. Please revert back if this is what you are looking for. I will share you the code to hadle the response as well.

ISDMBundleRequest batchRequests = new SDMBundleRequest();

String serviceDocPath = "http://<host>:port /sap/opu/sdata/iwfnd/RMTSAMPLEFLIGHT/";

ISDMRequest serviceDocRequest = buildRequest(serviceDocPath , (ISDMNetListener) this);

batchRequests.addRequest(serviceDocRequest);

  

ISDMRequest metaDataRequest = buildRequest(serviceDocPath + "$metadata",(ISDMNetListener) this);

batchRequests.addRequest(metaDataRequest);

  

searchURL = "http:// <host>:port/sap/opu/sdata/iwfnd/ RMTSAMPLEFLIGHT/carrierCollection";

ISDMRequest collectionDataRequest = buildRequest(searchURL, (ISDMNetListener)this);

batchRequests.addRequest(collectionDataRequest);

  

getRequestmanager().makeRequest(batchRequests);

Regards

Rohith

GowthamRaja
Active Participant
0 Likes

Hi Rohith,

Thanks for your information. i cannot get your information clearly, can you please make me clear on what you have posted. Thanks in advance

rohith_deraje
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Raja,

If I understand your question correctly, You are trying to send batch requests to gateway.

Batch => Multiple operations in single call/requests.

The cample code I shared above is to send batch/bundle requests from android application to gateway using SUP.

SUP:- Sybase unwired platform which is a mobile platform ofering from SAP to develop online/offline mobile applications.

Is my undertsnading correct here?

Regards

Rohith

GowthamRaja
Active Participant
0 Likes

Hi Rohith,

I am doing an android application that i am scanning a barcode and getting the value of the barocode.

My Requirement is:

I have to pass the value stored in a variable to get the details of a value from sap system backened table. How to do this Please guide me. Awaiting for your reply, Thanks

GowthamRaja
Active Participant
0 Likes

Hi,

As per the document

How To Batch Multiple Operations Into A Single Request

i cannot post the batch operation as mentioned in page.18, after sending the request it displays as

"The server is refusing to process the request because the entity has a unsupported format" and the status code as 415-unsupported media type. kindly help me on this to resolve the problem. Thanks

jibin_joy
Contributor
0 Likes

Hi Rowtham,

   can u post ur batch Request with its main header.

Regards,

Jibin Joy

jibin_joy
Contributor
0 Likes

Hi Gowtham,

   

   Its all depends on ur entity design .

- we can use GetEntitySet Method if Barcode information is also presented in same entity with help of $filter option.

- If not available use custom operation http://www.odata.org/documentation/uri-conventions#ServiceOperationParameters .

- one more option is to use "select" option which is also implemented in GETEntityset . I think this option is provided by SAP not from Odata Protocol.

Regards,

Jibin