Config Management

Keep the settings of the abap2UI5 page in tables, not in code.

ActiveMIT license

What it does

Theme, UI5 bootstrap source, custom CSS and Content-Security-Policy are kept in database tables and edited in a popup app; a user exit of your own applies them to every page abap2UI5 serves. It is for abap2UI5 administrators who want to change those settings at runtime without touching the HTTP handler. The service caches the configuration, supports user-specific and global values and keeps the abap2UI5 default wherever nothing is stored.

  • Configurable parameters: THEME, APP_TITLE, UI5_SRC, DEBUG_MODE, STYLES_CSS, CSP_POLICY
  • Configuration popup app z2ui5_cl_app_icf_config with real-time theme preview
  • User-specific and global configuration with in-memory caching
  • Admin-only fields and a master user concept for UI5_SRC and CSP_POLICY
  • Authorization object Z2UI5_CONF with fields ACTVT and CONFIG_TYP
  • Theme compatibility matrix by UI5 version (table Z2UI5_THEMES)

Requirements

  • Standard ABAP 7.50 or higher (no 7.02 downport)
  • abap2UI5 1.145.0 or later
  • ABAP Cloud: no (Standard ABAP only)
  • UI5 1.118 or later for the theme preview; on older releases the saved theme applies with the next page load

Installation

Pull the repository with abapGit into a package of your own. abap2UI5 itself has to be installed first.

https://github.com/abap2UI5-addons/config-management

  1. Install with abapGit in this order: abap2UI5, then this repository (branch main) next to abap2UI5; the HTTP handler stays as it is
  2. Implement the user exit interface z2ui5_if_ui5_exit in a class of your own and read the stored values via z2ui5_cl_config_service; abap2UI5 finds the class by the interface
  3. If a class implementing z2ui5_if_ui5_exit already exists, add the lines to that class, abap2UI5 calls one exit only
  4. Start the configuration app with ?app_start=z2ui5_cl_app_icf_config; it fills the configuration tables with defaults on first start

Usage

METHOD z2ui5_if_ui5_exit~set_config_http_get.

  DATA(lv_theme) = z2ui5_cl_config_service=>get_current_theme( ).
  IF lv_theme IS NOT INITIAL.
    cs_config-theme = lv_theme.
  ENDIF.

  DATA(lv_src) = z2ui5_cl_config_service=>get_config( `UI5_SRC` ).
  IF lv_src IS NOT INITIAL.
    cs_config-src = lv_src.
  ENDIF.

ENDMETHOD.