cancel
Showing results for 
Search instead for 
Did you mean: 

SAP NetWeaver Gateway Batch Services

arnab_das5
Explorer
0 Kudos

Hi All,

I just need small help regarding GateWay Services for Batch-Retrieval Read (POST/PUT).

In Rest-Client i'm giving my service URL following $batch & those Header Details--


Authorization: Basic c3VtYW4ucGFkaWExMjM=

x-csrf-token: U1UjqYUouCRIoRTmaF8qOQ==

Content-Type: multipart/mixed; boundary=batch

And in BODY, i'm giving

--batch

Content-Type: application/http

Content-Type: application/json

content-length: 54768

Content-Transfer-Encoding: binary

GET WBSCollection(PROJECT_ID eq '12345') &$format=json   http/1.1

--batch

when i'm sending the request getting status message i.e

202 Accepted i.e correct

but in Response TAB getting this message

Response does not contain any data.

i checked in my RFC or even Class Label everything is working fine but not getting

any data from rest client ?



Accepted Solutions (1)

Accepted Solutions (1)

arnab_das5
Explorer
0 Kudos

hi guys ,

issue got solved ..............Read Retrieval

Pass URL as   http://**************/sap/opu/odata/sap/<service_name>/$batch

Authorization: Basic c3VtYExMjM=

x-csrf-token:   mdtxFGA==

Content-Type: multipart/mixed; boundary=batch

BODY part

--batch

Content-Type: application/http

Content-Transfer-Encoding: binary

Accept: application/json

GET WBCollection/?$filter= PROJECT_ID eq '12345'' HTTP/1.1

          """"""""""   <should be at least 2 enter>or it wont work

--batch

Content-Type: application/http

Content-Transfer-Encoding: binary

Accept: application/json

GET WBCollection/?$filter= PROJECT_ID eq '12345'  and WBS_ID eq '124.123' HTTP/1.1

      """""""<should be at least 3 enter> or it wont work

--batch--

----------------------------thanks guys-----------------------------------

output --- 

202 Accepted

SB9
Active Participant
0 Kudos

After 1 hour I found this post and the solution was the 3 enter to be inserted before --batch-- to make it work. Thanks a lot.

Answers (3)

Answers (3)

midhun_vp
Active Contributor
0 Kudos

Hi,

The solution is documented here:

$batch Processing - SAP NetWeaver Gateway - SAP Library

Regards, Midhun

SAP Technology RIG

arunchembra1
Participant
0 Kudos

Hi Arnab,

Please check the below link but i am not sure this will help you because till now i didn't see any document related to batch get.

http://scn.sap.com/community/mobile/blog/2013/04/15/json-post-put-on-gateway

Thanks,

Arun Chembra

kammaje_cis
Active Contributor
0 Kudos

Hi Arnab,

Check if this helps.

http://scn.sap.com/message/14002206

Thanks

Krishna

former_member192971
Participant
0 Kudos

Hi Kishore ,

As you are aware that I followed that Document for Post Method , But i am not able to Insert Multiple Rows at a time into Custom table from Odata service using Rest Client .

you can check this http://scn.sap.com/thread/3401946 for the discussion .

Still getting error as <code>CX_SXML_PARSE_ERROR/001560AA0E081DEB8CA398D5EBFB9406</code><message xml:lang="en">Error while parsing an XML stream: '&lt;EOF&gt; reached'.

Could you pls suggest what might got wrong ....?

  

Appreciate your help.

Thanks,

Uday.