cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Customer create with multiple line items

Former Member
0 Kudos

I have successfully created a Customer with a REST API but would like to have multiple line items for the Customer create. I get the following error when using the SAP NetWeaver Gateway Client, HTTP Request, with multiple line items: Error while parsing an XML stream.

The following code is a simple example of one entry into a customer create function module with a table type customer table as the import. How do I format the HTTP Request to insert an additional customer?

{
   "d" : {
     "__metadata" : {
     "id"  : "http://lsbdb.pok.bb.com:8002/sap/opu/odata/SAP/Z_C_SRV",
     "uri" : "http://lsbdb.pok.bb.com:8002/sap/opu/odata/SAP/Z_C_SRV",
     "type" : "Z_C_SRV.Customer"
                    },
        "IName1" : "Software Galleria",
        "IName2" : "SG"
  }
}

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

For creating multiple customers you have to use $Batch.

Read about it here. http://www.odata.org/documentation/odata-version-2-0/batch-processing/