Skip to Content

Migrating App from WEB IDE to Eclipse - OData Connection

Hi experts,

I have an application that works fine on WEB IDE with a Destination configured in SAP Cloud Platform.

I want to extend my app in Eclipse, so I migrated the application.

I am trying to connect to an OData Service in an Abap System.

The new destinations look like this: manifest.json

When I run the application in eclipse the result is the following:

How is the configuration of the connection to the abap system for consumption of the service in eclipse (authentication)?

It is possible to configure the authentication in the file manifest.json ?

Is there another setup for the correct consumption of the service?

If you can help me with this I would appreciate it.


manifestjson.png (11.4 kB)
error.png (9.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 26, 2017 at 07:09 AM

    Have you checked by deploying the project from Eclipse to the ABAP repository and then running it on the ABAP Server? Before deploying the project you will have to adjust the uri in the dataSource section of the manifest.json file to /sap/opu/odata/sap/<SERVICEURL>.

    Add comment
    10|10000 characters needed characters exceeded

    • saurabh vakil Juan Camilo Jaramillo

      The concept of destination is relevant only for SAP Cloud Platform when you develop your application in Web IDE. When using Eclipse for development you have to either test locally by disabling web security in Chrome browser or decalre the service URL as /proxy/http/<host>:<port>/sap/opu/odata/sap/<SERVICENAME> in the manifest.json file.

      However if you have the option to deploy on the ABAP repository and then test it the the URL jst needs to start with /sap/opu/......

  • May 28, 2017 at 06:40 AM

    You can write proxy/http/yourservername/servicename in manifest.json. Also you can either set credentials while calling the odata service in code or you can provide in the servicename in GW.



    Add comment
    10|10000 characters needed characters exceeded

  • May 28, 2017 at 11:01 AM

    In web IDE. The code here is the relative url you used in you abap server.

    The url should be " /sap/.....", no "http", I guess you changed it.....

    But the url is not accessible when you are testing your app in webide.

    In webide we has a neo-app.json, the file defines a mapping rule for urls. It map the /sap... url to the real one according information you provided in "destination" in your hcp cockpit.

    So everything works fine, if you create the odata service and odata model using wizard of webide.

    And that's one reason why webide better than eclipse.

    Currently we have also a local version of webide, you can install it on your laptop.

    You can download and check the documents here.

    Currently there is no any reason of study sapui5 in eclipse, except for open old projects built by eclipse.(Open it in webide also involves some change)

    If you insist to use it in eclipse.

    First you need to check weather your code is running locally or running on abap server.

    When running on abap server, it's ok. But when you running locally your url is http://localhost......, and you can not invoke services from other domain according to the same-origin policy.

    So you need to build a proxy in eclipse, to cheat the browser you are calling something from localhost......

    And you should write some if else code, to makesure when you running on local, you invoke service through the proxy.

    Here is an instruction for that

    Add comment
    10|10000 characters needed characters exceeded

    • Hello, Juan

      There is no way to add destination in eclipse.

      And it's not recommend to combine your java code and html5 code for hcp development.

      For your want to deploy it on HCP.

      You need to develop your java application in eclipse and expose your service as OData or rest, you can use apache lingo, or OData4j as the framework for generating odata service.

      After the deployment of your java application, you can create the destination in HCP to set your java application as the backend.

      After that , you can start developing your HTML5 application in WebIDE, and connect the backend service via destinations in your HCP cockpit.

      After the development, you can deploy your sapui5 application as HTML5 application in your HCP, using deploy menu.