Skip to Content
0

Consuming Odata Service using WEB IDE?

May 02, 2017 at 12:28 PM

475

avatar image

Hi Experts,

I want to display my OData service data into UI5 Application using WEB IDE Tool in this i am using SAP UI5 Application Template for displaying my data.

Designing of UI5 is done and Column Headings are displaying , OData connectivity process is also done...(Binding process is also done with the DB Fields)

But Data is not displaying... Coding is as follows


VIEW.js:

Controller.js:

Here in Controller.js i implemented the logic using different ways by seeing in SCN posts and all...

finally i un-comment the 2nd box coding and execute the code ....

output will be displayed with Headers which i mentioned in VIEW.js file...but binding content was not displayed...

404 error is coming Data not found...


give me any solution for this...almost i referred all SCN posts regarding this but i didn't get any solution....

where i did mistake...please give me any idea..

Thanks,

Vamc

view.jpg (26.9 kB)
controler.jpg (103.6 kB)
10 |10000 characters needed characters left characters exceeded

Hi

When i take WORKLIST Template from WEB IDE and assign my OData service link and run the application...

Now i got the error as shown below...

{
"message": "HTTP request failed",
"headers": [],
"statusCode": 504,
"statusText": "Gateway Timeout",
"responseText": "<html><head><title>Error report</title></head><body><h1>HTTP Status 504 - Socket connection timed out for host https://XXX.XXX.XX.XXX:XXXX. Reason: Read timed out (local port 53954 to address 127.0.0.1 (localhost), remote port 20001 to address 127.0.0.1 (localhost))</h1></body></html>"
}

Thanks,

Vamc

e1.jpg (18.2 kB)
0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Jamie Cawley
May 02, 2017 at 01:55 PM
-1

Your model service url should probably be ending with /Y_CUST01_TS, so when you do the binding the url is correct. As it is now when your are binding the url it is calling would be /Y_CUST01_TS/Customers/Customers, which you should be able to see in the browser dev tools. You may want to setup a project with a Master Detail template to see how this is defined.

Regards,

Jamie

SAP - Technology RIG

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

Hi Jamie,

Thanks for the reply...

Actually i tried with that one also

"/TRG_System/sap/opu/odata/sap/Y_CUST01_TSRV"

...but same result ( No Data Found ).

Is there any other way to follow for design the project with SAPUI5 Application Template in WEB IDE

Thanks,

Vamc

0

In addition to fixing the paths, in the onInit replace

sap.ui.getCore().setModel(oModel);

with

this.getView().setModel(oModel);

Regards,

Jamie

0
Sharath M G May 02, 2017 at 02:32 PM
0

Debug and check if the model is loaded into the variable oModel.

If not, then either there should be an error or no data returned from the service.

Regards,

Sharath

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

Hi,

Model is loaded successfully but out put is not getting for my template SAPUI5 Application Template.

Individually i execute this OData into my GW Client and Link in the browser aswell ....there it is working perfectly...

But In WEB IDE i am not getting the output...

i developed one project with ECLIPSE with the same OData service...there i get the data into my table control... But in my WEB IDE i am unable to get....

Error in DOM as shown below pic:

where did i mistake...unable to find out....

Thanks,

Vamc

error1.jpg (218.2 kB)
0
avatar image
Former Member May 03, 2017 at 12:40 PM
0

Check in network tab what is the service URL which is been called.

It may help you.whether you are calling a correct url for fetching the data.

capture.png


capture.png (20.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 16, 2017 at 01:15 PM
0

Hi Vamsi,

Could you please share how you solved this issue?

Thanks & Regards,

Praveen

Share
10 |10000 characters needed characters left characters exceeded