Skip to Content

How to get data ODataModel batch request response?

Hi All,

is there a possibility to retrieve the data from the response of a batch request?

BR,

Szilamér

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 17, 2015 at 02:51 PM

    post what you already have, of course it is possible to get data back from batch

    Gateway Batch Calls from SAPUI5

    that blog is pre-v2 though

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you! This is what i was looking for (copied from the blog):

      1. that.oModel.submitBatch(function(data) { 
      2.       that.oModel.refresh(); 
      3.       sap.ui.commons.MessageBox.show(data.__batchResponses[0].__changeResponses.length 
      4.         + " contacts created", sap.ui.commons.MessageBox.Icon.SUCCESS, 
      5.       "Batch Save", sap.ui.commons.MessageBox.Action.OK); 
      6.     }, function(err) { 
      7.       alert("Error occurred "); 
      8.     }); 

      "data" contains the response data i need.

      BR,

      Szilamér

  • Oct 19, 2015 at 03:55 AM

    Hi Joo,

    Check out my blog

    sending data to the back-end using JSON format

    Regards

    Venkat

    Add comment
    10|10000 characters needed characters exceeded