| Update 01.01.2025 Please note that some information in this blog article may be outdated. For the most current details, refer to our Documentation and stay informed by following us on LinkedIn. |
Welcome to part 6 of this blog series introducing abap2UI5 — an open-source project for developing UI5 apps purely in ABAP.
This post explains the installation, configuration and troubleshooting steps of abap2UI5.
Blog Series & More
You can find all the information about this project on GitHub, stay up-to-date by following on LinkedIn and explore the other articles in this blog series:
Content
This post covers the following areas:
Let’s begin with the first topic.
If you are new to abapGit, start by reviewing this Guideline for on-premise systems and this Tutorial for cloud environments.
The project is based on a single code line for both language versions (ABAP Cloud, Standard ABAP), so you can pull this repository in both cases. For lower releases (NW 7.03 to 7.40) use this downport repository.
Next, create a new HTTP service in your system. In an on-premise environment, you need to create and configure a new ICF service. Follow this guideline for that and see how to develop a new HTTP request handler here. In a cloud scenario, follow this tutorial.
Now copy the following implementation into your new handle_request method.
ABAP Standard:
METHOD if_http_extension~handle_request.
z2ui5_cl_http_handler=>run( server ).
ENDMETHOD.ABAP Cloud:
METHOD if_http_service_extension~handle_request.
z2ui5_cl_http_handler=>run( req = request res = response ).
ENDMETHOD.
abap2UI5 Landing Page

abap2UI5 Samples Repository
There are two ways to set the configuration: one is by setting it via URL parameter, and the other option is by implementing the abap2UI5 user exit, the place where all your custom configuration goes to.
By default, the following parameters are set:
lt_config = VALUE #(
( n = `src` v = `https://sdk.openui5.org/resources/sap-ui-cachebuster/sap-ui-core.js` )
( n = `data-sap-ui-theme` v = `sap_horizon` )
( n = `data-sap-ui-async` v = `true` )
( n = `data-sap-ui-bindingSyntax` v = `complex` )
( n = `data-sap-ui-frameOptions` v = `trusted` )
( n = `data-sap-ui-compatVersion` v = `edge` ) ).If you want to make changes, simply copy the table, adjust the necessary parameters and then import the table again when calling the method:
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_exit.
ENDCLASS.
METHOD z2ui5_if_exit~set_config_http_get.
cs_config-theme = `sap_belize`.
ENDMETHOD.You can find a list of all configuration parameters here. Additionally, you can modify these parameters with the sap-ui- prefix to use them as URL parameters.
You can set the title with the following snippet in your definition of the view:
DATA(view) = z2ui5_cl_xml_view=>factory( ).
view->_z2ui5( )->title( `My Title` )
abap2UI5 with changed title
Check out the following sample.
You can also synchronize your configurations with all other ui5 apps in your system by reading the customizing from the following table prior to making the method call (Enjoy the view – this is the only SAP GUI screenshot included in this blog series 😉😞

Configuration SAP UI5 Bootstrapping
The most common change is to the theme. You can find all available themes here. The newest theme is Horizon (sap_horizon) and it is used in all the demos of this blog series. Other popular themes are:
![]() | ![]() |
| Belize (sap_belize) | Quartz Light (sap_fiori_3) |
![]() | ![]() |
| Evening Horizon (sap_horizon_dark) | High Contrast Black (sap_horizon_hcb) |
In an on-premise landscape, you can bootstrap the UI5 library from your local system. Typically, the path is "/sap/public/bc/ui5_ui5/resources/sap-ui-core.js" or "resources/sap-ui-core.js". In a cloud scenario, you can refer to SAP guidelines available here.
abap2UI5 is based on a single-page index.html, which makes it not compatible with FLP out-of-the-box (since FLP replaces the index.html). However, it is no problem to encapsulate abap2UI5 in a UI5 standard app for the use with launchpads. Check out and install this additional repository.
You can change the CSS by sending HTML with your View in your app. An example can be found here:

abap2UI5 app with changed CSS
At the backend, abap2UI5 is a plain HTTP handler that every user creates and configures by themselves (visibility, authentication & other security parameters). In the implementation of your apps you have to take care of a secure programming style like always when developing HTTP-Handlers (call authorization checks, avoid dynamic SQL etc.). Check this for more information.
At the frontend, abap2UI5 is a normal one page UI5 application. It loads the external library UI5 from a CDN or your own customized directory. The UI5 framework is used to render the HTML and only methods of the UI5 framework are called to handle the all events.
Additionally to prevent cross-site-scripting the following parameter are set in the index.html:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' ui5.sap.com *.ui5.sap.com sdk.openui5.org *.sdk.openui5.org cdn.jsdelivr.net *.cdn.jsdelivr.net"/>It only allows libraries from the same server, ui5.sap.com, openui5.com or cdn.jsdelivr.net, which we needed to use for some external libraries. Adjust the importing parameter 'content-security-policy' when you want to include more external URLs:
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_exit.
ENDCLASS.
METHOD z2ui5_if_exit~set_config_http_get.
cs_config-content_security_policy = `<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' ui5.sap.com *.ui5.sap.com sdk.openui5.org *.sdk.openui5.org cdn.jsdelivr.net *.cdn.jsdelivr.net"/>`.
ENDMETHOD.You can find more information about CSP here.
Start an app and press the shortcut STRG+F12 and the debugging tools are displayed:
abap2UI5 Debugging Tools
Next follow the left menu and press for example View XML:

abap2UI5 Debugging Tools - XML-View
Most of the issues arise because the XML is not valid. You can check it there or copy & paste it to an XML validator. Another good way to test the XML are UI5 sandboxes, such as the OpenUI5 Sandbox.
You can also check the View Model and previous request here. If a parameter is bound with _bind_one, it should be written in the oViewModel. If a parameter is bound with _bind, it should be written in oUpdate. You can also check the last request to ensure that all updated values have been sent to the server.
To take a more detailed look at the UI, use the UI5 Inspector. This tool is helpful for analyzing and checking certain controls:

UI5 Inspector with an abap2UI5 app
You can find more guidelines here.
Also, keep in mind that abap2UI5 is based on REST, so you don't need to restart the app all the time after a change, like in the former screen logic where changes were only visible after restarting. Just triggering a server roundtrip is enough to see the changes:

View Development in abap2UI5
Set a breakpoint in your app and check the values that abap2UI5 provides you, as well as the values you give back to abap2UI5. Check if the view XML is filled and if it is valid. Normally, abap2UI5 throws an exception if something unexpected happens, which can help you to identify the problem. If you want to gain a deeper understanding, you can also debug the framework itself.
The framework is based on a single http handler. Set a breakpoint here and check incoming requests and outgoing responses:

abap2UI5 HTTP Handler
The initial request loads the UI5 index.html, which is independent of your application and should normally not cause any problems:

abap2UI5 Get Handler (index.html)
After this, the AJAX roundtrip logic begins. Every event and interaction creates a new HTTP Post request, which triggers the following method:

abap2UI5 Post Handler
As you can see, we call the user's app on line 44. You can also check if your app has been successfully updated after the frontend on line 39 and check the following method:

Update app after frontend (PAI)
And the reverse direction, setting the response with the values of your app in this method:

Create frontend model before output (PBO)
If you find a bug in the framework or running into problems with your app, feel free to open an issue.
This was part six of this introduction to abap2UI5. You now have an understanding how to install & configure it and got insights into troubleshooting & debugging.
In the next blog post, we will focus on the technical background of this framework and summarize all the project's key ideas by covering topics such as its architecture, codebase and compatibility.
Thank you for reading! Your questions, comments and wishes for this project are always welcome, create an issue or leave a comment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 33 | |
| 28 | |
| 24 | |
| 14 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 9 | |
| 8 |