4 weeks ago
Dear ABAPers,
is there any way to bundle outgoing OData calls in a batch request (e.g. calling a non-SAP OData API from an ABAP report)? I could do this using the HTTP Client class and building up a batch body as string and send it via POST request, but this doesn't feel very nice 🙂
I did some research and couldn't find anything pointing that way (also looking at client proxies).
Many thanks in advance for some hints or confirmation, that there's no build-in functionality!
P.S.: Not talking about implementing a gateway OData with change sets.
Thanks for clarification about "batch". I have checked this resource explaining OData Batch processing. Is it what you want?
If yes, then it seems it should be doable with ABAP - HTTP requests, using cl_http_client. But I did not tried it myself.
Only tricky part seems to be working with Multipart content type in request + response. But ABAP HTTP request has method "ADD_MULTIPART". For HTTP Multipart response I see "NUM_MULTIPARTS" (Returns the number of multi-part segments of this entity) + "GET_MULTIPART" method (Returns the specified multipart segment of this entity).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tomas_Buryanek - thanks for your quick response.
I want to put together several OData operations into one HTTP request. That's why I thought of the OData batch, as it's only one POST request containing multiple Odata requests. As written, it would work to put this together "manually" and parse the result, but maybe there's a much nice way in the ABAP framework.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.