Skip to Content
0

SAPUI5 - Maintain destinations in eclipse

Feb 21 at 06:34 AM

102

avatar image
Former Member

Hi,

I have recently started with SAPUI5, and have been following various Blogs and tutorials. I am using Web IDE as well as Eclipse. I have a few queries:

1. We maintain Destinations in the HCP Cockpit, and then use these destinations for oData services in the web IDE. How are the Destinations maintained for the different landscapes(Dev --> QA --> PRD), so that the SAPUI5 app(s) connect to the right environment?

2. How can we maintain destinations in Eclipse?

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

2 Answers

Best Answer
Bernard Le Tourneur Feb 21 at 10:12 AM
0

Are you deploying your cloud-developed app to your on-Prem ABAP Server?

Destinations in SAP Cloud are there to abstract the wiring up of URLs away from the code so that you can chop and change by config in SAP Cloud without adjusting your code.

When developing in the cloud you would be able to access the services on your onPrem ABAP server (assuming you have Cloud Connector installed).

The implication is that there should be no need to make any changes to your SAPUI5 app once you deploy it to your onPrem server.

Destinations does not apply within the context of Eclipse for onPrem systems. Destinations is a SAP Cloud concept used for wiring up and endpoints (SAP or non-SAP) to SAPUI5 (using SAP Web Ide) as well as other SAP Cloud Services

You may be more interested in configuring Data Sources in your manifest.json?

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Bernard,

Thanks for replying.I have recently started learning SAPUI5 by following the online blogs and videos. I am not deploying my apps as of now, but I wanted to understand how the app would work once it is deployed to either an on-premise system or an Cloud systems.

Currently I am using Web IDE as well as Eclipse from my practice scenario's, and not quite able to make my pick between the two.

What tool is used in an ideal implementation for SAPUI5 applications? Would a project/client have multiple web IDE environments corresponding to Dev/QA/PRD?

0

We use Web Ide and deploy from there. Best practice suggests using GIT and then engaging your GIT repository to deploy to your ABAP Repo using, say, Jenkins or any other capable CI tool.

You can use Eclipse - but then you have to raise all the infrastructure and do all the relevant installs onPrem to achieve what you get out the box with Web IDE in the cloud. (not sure where Eclipse is at with Layout Editor / data model config, ...)

When you deploy an app from Web IDE and you deploy to your ABAP Repo you would attach this to a request. This would then be used to transport the app through your different environments - your endpoints (oData CRUD activity for e.g.) should be unaffected by the journeying of your UI5 app through the environments. (You would journey your oData services separately and typically on your backend server using Solman or manual transports and then activate where necessary)

Hope this makes sense?

0
Former Member
Bernard Le Tourneur

Hi Bernard,

Thanks for clarifying, I, probably, have a better understanding now. I have worked on Pricing routines in SAP CRM, and there the routines were created in Java, and then the JAR package was deployed to SAP CRM and captured in a TR and then moved to higher environments. SAPUI5 apps would be deployed in a similar way.

However I am still puzzled about the connections between oData services, specially external or non-SAP oData services. How would the connections be managed? Would there be a specific file/configuration similar to RFC connections(T-Code:SM59) in ABAP.

Sorry for being so lame but I really cannot figure this out.

0

Hi Former Member

Maintaining URLs that engage external or non-SAP endpoints (whether presented as oData endpoints or not) could be done using a variety of means. One option would be to specify an absolute path in your manifest.json or in a separate json file where you maintain connections to external services - this json file could load within an appropriate intialisation event within your application - you are very likely to encounter CORS issues unless these are explicity addressed - options exist - e.g. proxy servers like SAP Web Dispatacher)

.

0
Former Member

Thanks Bernard, for answering my queries patiently.

1
Abdulbasit Gulsen
Feb 21 at 07:05 AM
1

Hi,

1. Destination configuration in WebIDE is only for development purposes. After you deploy your application to your DEV system, since the paths you use in the OData queries will be relative paths like "/sap/opu/opdata/....", your app will use the paths on the same server that it is running. Then, when you transport your application to QA and PROD systems using the standard transport management tools of SAP, the app will also use the services on QA and PROD systems. Make sure to have relative paths to your OData service in your manifest.json file.

2. If you use Eclipse or other development tools, you have to handle your backend connections yourself during the development process. However, it is recommended that to use WebIDE instead of Eclipse if you don't have specific reasons.

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Abdulbasit Gulsen,

Thanks for answering the quries, however I still have a few questions:

1. a) In the manifest.json, we define the datasources with a URL relative to the <destination_name> and then use these datasources in the model. The <destination_name> can be any text, so how does it map with the destinations?

How would this work if we have oData services from external systems(and not from the current SAP system)?

2. Can you guide me with the steps required for backend connections and using them within SAPUI5 applications in Eclipse?

Regards,

Chetan Mishra

0

Abdulbasit Gulsen

It is not correct to say that destination configuration in WedIDE is only for development purposes.

WebIDE developed apps can be deployed and act as Production apps in SAP Cloud Platform (as an HTML5 Application). In this scenario destination remain both relevant and critical for the routing of information from the UI to any number of endpoints.

0

Hi,

You should not mention the destination name in the datasource configuration. You need to map your paths (like /sap/opu/odata) to the destinations in neo-app.json file. It will only be used on the WebIDE to map your requests to your backend through the destination. You can define your datasources without destination name in the manifest file. Please provide your manifest.json and neo-app.json files if you still have problems. It'll be easier to understand your problem.

Regarding your question about Eclipse, I don't use Eclipse for Fiori development for a long time, so I cannot recommend the best practice for you. Do you have a specific reason to use Eclipse ?

1
Former Member
Abdulbasit Gulsen

Hi Abdulbasit,

I have attached the manifest.json & neo-app.json files(converted to .txt, as .json attachments are not supported).

My query is that in the neo-app.json and manifest.json files we provide the relative paths for oData services, so how would these be handled for deployment to higher environments.

Regards,

Chetan Mishra

manifest.txt (2.3 kB)
neo-app.txt (695 B)
0

You are using public OData test service and even if you deploy your app to the test, qa or production systems you have to handle your connection in a different way. If you want to use a service running on external system, you need to configure your destination with web dispatcher or reverse proxy.

In any case, you don't need to use the path /destination in your configuration files. Your current configuration will not work if you move your app out of the web ide. It will not recognize /destination path. However, if you make your configuration like:

manifest.json : /V2/Northwind/Northwind.svc/

neo-app.json : /V2/Northwind

it will work both on web-ide or outside (assuming you have the web dispatcher configuration for services.odata.org)

0

Former Member , the answer from Abdulbasit Gulsen is correct. Here's an example of how your neo-app.json might be configured to proxy the requests from /sap/opu/odata to your gateway system through SCP and SCI.

When you do this, you don't have to change your service URL in manifest.json.

Hope this helps

Bruno

neo-app.png (63.4 kB)
0