Skip to Content
0

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

Sep 04, 2017 at 06:35 AM

22

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

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

Share
10 |10000 characters needed characters left characters exceeded
Joseph BERTHE Sep 07, 2017 at 11:35 AM
0

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,

Share
10 |10000 characters needed characters left characters exceeded