Skip to content

Setup

Every UI5 application has an index.html that bootstraps the framework, picks a theme, defines the page title and so on. With abap2UI5 you don't maintain that file by hand — the framework generates it on every page load. To change what ends up in it, implement the z2ui5_if_exit interface in your own ABAP class:

abap
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC.

  PUBLIC SECTION.
    INTERFACES z2ui5_if_exit.

ENDCLASS.

CLASS zcl_a2ui5_user_exit IMPLEMENTATION.

  METHOD z2ui5_if_exit~set_config_http_get.
    " your configuration goes here
  ENDMETHOD.

ENDCLASS.

set_config_http_get is called once per page request — i.e. when the browser asks for the HTML shell. The changing parameter cs_config holds every value that ends up in the generated index.html.

What You Can Configure

PageField on cs_configAffects in index.html
Themethemedata-sap-ui-theme on the bootstrap script
Bootstrappingsrcsrc of the bootstrap script (UI5 version + delivery channel)
Bootstrap Attributest_add_configAdditional data-sap-ui-* attributes
Style / CSSstyles_cssInline <style> block in the page <head>
LanguageURL parameter sap-languageSAP session language + UI5 locale

Security-relevant headers and the Content Security Policy meta tag are configured separately — see Security.

See Also