Skip to Content
0

Sapui5 error 404 (not found) in CheckFlightAvailability function

Jul 12, 2017 at 11:45 PM

69

avatar image

Hi to all,

I'm a sapui5 begginer and I'm traying to do an odata call function with CheckFlightAvailability from sap gateway demo system. I'm using a default model for this exercise, but when I call function, it returns 404 as response, this is the code for my controller file:

I checked the network window on my browser and the metafile is loaded so I assume that my connection is ok, does anybody could help on this issue ?

Greetings,

Moisés.

code.png (19.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

VAIBHAV GB Jul 13, 2017 at 04:26 AM
0

Hi Moises Gomez Quintero,

Please try the following code to fetch the data.

oODataModel.read("/CheckFlightAvailability",{
success:function(odata){
sap.m.MessageToast.show("success");
}, error:function(oerror){ sap.m.MessageToast.show("error"); } })

Regards

GB

Show 1 Share
10 |10000 characters needed characters left characters exceeded

this call will give you details of all the flights, if you want to send filters then there is an option to add filters.

regards

GB

0
Moises Gomez Quintero Jul 15, 2017 at 01:44 AM
0

Issue solved, I corrected parameters declaration,

Greetings

Share
10 |10000 characters needed characters left characters exceeded