Skip to Content
avatar image
Former Member

please help Using this code trigger the backend but no data received

oModel.createEntry("/CrudSet", {
"Carrid": oEntry.Carrid,
"Connid": oEntry.Connid,
"Countryfr": oEntry.Countryfr,
"Cityfrom": oEntry.Cityfrom,
"Airpfrom": oEntry.Airpfrom,
"Countryto": oEntry.Countryto,
"Cityto": oEntry.Cityto,
"Airpto": oEntry.Airpto,
"Distance": oEntry.Distance,
"Distid": oEntry.Distid,
"Period": oEntry.Period
}, {
async: false
});
oModel.submitChanges({
success: function(oData, response) {
sap.ui.commons.MessageBox.show("Sucess");
},
error: function(response) {
sap.ui.commons.MessageBox.show("Fail");
}
});

I am using this code it is tr

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 14, 2017 at 01:22 PM

    Hi Joseph BERTHE

    Thank for your replay issue is solved

    problem is byte field value i was writing into '0'

    Now i have written into 0(zero)

    Thanks,

    Srinivasa Reddy

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 07, 2017 at 11:35 AM

    When you do a create operation be careful with the data type. For instance an interger property will not accept string e.g.

    { myIntProperty : '1234' } Not OK
    { myIntProperty : 1234 } OK

    In some case, I use to do a read operation to get the right structure and I store it in Json format. Then I populate the result for my Create operation.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded