Skip to Content

How can I dynamically change my OData source in SAP UI5?

May 15, 2017 at 06:28 PM


avatar image

I'm looking for some help with dynamically changing my OData source for a running SAP UI5 app. We have one data source running most of the time, but we have a requirement to detect when that source is down (for scheduled maintenance, or due to an error), and automatically change over to a source on another server that uses a copy of the same data.

We usually use manifest.json/neoapp.json with WebIDE to configure our data source, and we don't want to have a separate app for both sources - we want the same code with the same tags etc. to just use the secondary data source when the primary isn't available, and switch back once it is restored.

Since we don't have an explicit function call for bound data to check error codes etc. on, how can this be done?

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

1 Answer

Kuppireddi Sireesh May 15, 2017 at 06:38 PM

We use DNS alias as suppose to using app server directly. During scheduled maintenance BASIS would assign different app server to the DNS alias, if current app server is down.

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

Not a bad approach, but that won't work in this case - both servers have other functions, and run on different platforms (the backup is Hana while the primary is ECC6), so the OData URL is likely going to be different for primary and backup.