Part 5 · Running It

#39Where UI5 Comes From

The CDN, the system's own UI5, the launchpad's — one string in the user exit.

3 min read · 39 of 42

#31 claimed that the UI5 version is a configuration decision rather than a property of the SAP release. This is the configuration — and for an architect the more useful question behind it: where does the browser get UI5 from, and who decides when it changes?

The page an abap2UI5 app starts on is generated by the framework, and its <script> tag names a URL. That URL comes from one field of the user exit, the one extension point of an installation (User Exits):

  METHOD z2ui5_if_ui5_exit~set_config_http_get.

    cs_config-src   = `https://ui5.sap.com/1.120.0/resources/sap-ui-core.js`.
    cs_config-theme = `sap_horizon`.

  ENDMETHOD.

Without an exit, the field holds the default: OpenUI5 from sdk.openui5.org, the latest release, through the cache-buster. It works on a fresh installation without asking anybody, which is why it is the default, and it is the one setting a productive system should not keep. The choices, and what each one decides:

OpenUI5 or SAPUI5. OpenUI5 is the open-source subset and carries what most apps use — sap.m, sap.ui.layout, sap.ui.table, sap.f, sap.uxap. SAPUI5 from ui5.sap.com adds the SAP-licensed libraries: the smart controls and ValueHelpDialog of sap.ui.comp, the VizFrame charts, the rich text editor, the spreadsheet export. An app that names one of those controls needs SAPUI5, and the framework neither knows nor cares — the view names a control, and the library that was loaded has it or not (#4).

Latest or pinned. Without a version in the path the CDN serves whatever SAP released last, and a UI5 change reaches every app on the morning it is published — no transport, no test, no change window. A version in the path (/1.120.0/) makes the UI5 upgrade what every other upgrade is: a change to one string, tested and transported. The floor is 1.71, the oldest release the framework supports, and the linter holds every view to it (#14), so a control that is newer than an installation’s pinned version is found in the pipeline rather than on the screen.

CDN or the system’s own. /sap/public/bc/ui5_ui5/resources/sap-ui-core.js loads the UI5 installed on the SAP system itself. Nothing leaves the intranet, and the browser needs no route to the internet — which some networks simply do not have. The price is the one #31 avoided: the version is now the system’s, and it moves when Basis updates the UI5 component, not when the app needs a control.

With a CDN, note who fetches: the browser, not the server. The SAP system needs no outbound connection; the user’s machine needs to reach the CDN. The page’s Content Security Policy allows the SAP and OpenUI5 hosts and nothing else, so a different host — a mirror, a proxy — is added in the same exit (Security).

In the launchpad, the shell decides. A tile loads the abap2UI5 frontend into the launchpad (#29), and there the UI5 is the one the launchpad itself runs on. The bootstrap URL above applies to the standalone page only. An app that has to know asks at runtime — client->get( )-s_ui5-version — and an installation that runs both ways tests against both versions.

The theme is the second field: sap_horizon by default, and any theme the loaded UI5 knows — or, in the launchpad, the one the user picked there.

Every source with its URL, the pinning and the cache-buster, is on Bootstrapping and UI5 Versions.

Which UI5 runs is one string in one method. The decision behind it — the network, the licence, who upgrades and when — belongs to the installation, and it is worth making once, on purpose.