Skip to Content
avatar image
Former Member

Batch process in hana xsodata not working

Hi All

I have created a Procedure--> Insert the multiple record at a time (Iwritten script format)

Input & output is Table type

PROCEDURE "SCHEMA"."PACKAGE::SP_CREATE" (IN I_TAB "SCHEMA"."TT_EMP",  OUT O_MSG "SCHEMA"."TT_MSGTYPE")
----I have written my code 
 End

I have written xsodata service

service namespace "PACKAGE"{
"SCHEMA"."VENDOR" as "VENCRE"
  create using "PACKAGE::SP_CREATE";
}


Now i am executing the service in Postman

1. Single record time execute successfully

Data insert into data base success

POST :
https://databaseurl/PACKAGE/oDataService.xsodata/VENCRE 

 {
"VENDOR_NO" : 10001,
"VENDOR_NAME" :"srreddy",
"EMAIL"	:"abc@GMAIL.COM",
"PHONE_NUMBER" :"111111111",
 "CONTACT_NAME" :"abc",
"ADDRESS":"HYD"	,
"CITY": "HYD",
"STATE" : "",
"ZIP": "522190",
"FILE_TYPE":"R",
"DEPARTMENT":"ece" 
}

2. Now i am executing multiple records time data not inserting that time i got 202 accept in Postman

POST :
https://databaseurl/PACKAGE/oDataService.xsodata/$batch

--batch Content - Type: multipart / mixed; boundary = changeset Content - Transfer - Encoding: binary --changeset Content - Type: application / http Content - Transfer - Encoding: binary Content - ID: 1 POST VENCRE HTTP / 1.1 Content - Type: application / json Content - Length: 500
{
"VENDOR_NO" : 10002,
"VENDOR_NAME" :"srreddy",
"EMAIL"	:"abc@GMAIL.COM",
"PHONE_NUMBER" :"111111111",
 "CONTACT_NAME" :"abc",
"ADDRESS":"HYD"	,
"CITY": "HYD",
"STATE" : "",
"ZIP": "522190",
"FILE_TYPE":"R",
"DEPARTMENT":"ece" 
}
--changeset Content - Type: application / http Content - Transfer - Encoding: binary Content - ID: 1 POST VENCRE HTTP / 1.1 Content - Type: application / json Content - Length: 500
{
"VENDOR_NO" : 10003,
"VENDOR_NAME" :"srreddy",
"EMAIL"	:"abc@GMAIL.COM",
"PHONE_NUMBER" :"111111111",
 "CONTACT_NAME" :"abc",
"ADDRESS":"HYD"	,
"CITY": "HYD",
"STATE" : "",
"ZIP": "522190",
"FILE_TYPE":"R",
"DEPARTMENT":"ece" 
}

But procedure logic correct because i am executing the Procedure in SQL editor it is working fine

Please suggest to how to avoid 202 accepted

How to Insert the multiple records into data table via Postman app?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers