Fiori Launchpad
Integrate your abap2UI5 apps into SAP Fiori Launchpads. Find all information here:
(1) Installation & Configuration
(2) Features: Title, Parameters, Navigation
(3) Integration of KPIs
Target Mapping
Use the following parameters for target mapping in your Launchpad configuration:
- Semantic Object: Z2UI5_CL_MY_APP
- Action: display
- URL: /sap/bc/ui5_ui5/sap/z2ui5
- ID: z2ui5
- Parameter: app_start / Z2UI5_CL_MY_APP
Troubleshooting
Sometimes, installation via abapGit can cause cache-related issues. Follow these steps to resolve them:
Cache Management
Recalculate app index of z2ui5 with report /UI5/APP_INDEX_CALCULATE
Recalculate index of distribution layer with report /UI5/APP_INDEX_CALCULATE (if tab isn't visible try switching to another tab, then it usually appears)
Invalidate http caches in transaction SMICM
Clear browser caches and hard reload
Manual Deployment
If cache clearing doesn’t resolve the issue, manually upload the frontend application:
Download the webapp folder of the project.
Use the SAP program
/UI5/UI5_REPOSITORY_LOAD
to upload the application to the server.
Launchpad KPIs
Enhance your Fiori Launchpad with Key Performance Indicators (KPIs) using the abap2UI5 Launchpad KPI Add-On.
Find more information in the blog article on LinkedIn.
Functionality
Approach
(1/4) Use a single Interface:
INTERFACE z2ui5_if_lp_kpi
PUBLIC.
METHODS count
IMPORTING
filter TYPE string
RETURNING
VALUE(result) TYPE i.
ENDINTERFACE.
(2/4) Which can be used on app level to return KPIs:
CLASS z2ui5_cl_lp_kpi_hello_world DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES z2ui5_if_proxy_kpi.
INTERFACES z2ui5_if_app.
ENDCLASS.
CLASS z2ui5_cl_proxy_kpi_hello_world IMPLEMENTATION.
METHOD z2ui5_if_lp_kpi~count.
"kpi calculation....
result = 10.
ENDMETHOD.
METHOD z2ui5_if_app~main.
"abap2UI5 app logic here...
ENDMETHOD.
ENDCLASS.
(3/4) A generic OData service takes care of everything else (which just returns n dummy entries):
METHOD /iwbep/if_mgw_appl_srv_runtime~get_entityset.
DATA lt_result TYPE zcl_z2ui5_proxy_kpi_mpc=>tt_entity.
DATA(lt_filter_cond) = io_tech_request_context->get_filter( )->get_filter_select_options( ).
TRY.
DATA(lv_classname) = to_upper( lt_filter_cond[ property = `CLASS` ]-select_options[ 1 ]-low ).
CATCH cx_root.
INSERT VALUE #( id = `ERROR_NO_PARAMETER_FOUND_WITH_NAME_CLASS` ) INTO TABLE lt_result.
copy_data_to_ref( EXPORTING is_data = lt_result CHANGING cr_data = er_entityset ).
RETURN.
ENDTRY.
TRY.
DATA(lv_filter) = to_upper( lt_filter_cond[ property = `FILTER` ]-select_options[ 1 ]-low ).
CATCH cx_root.
ENDTRY.
DATA li_lp_kpi TYPE REF TO z2ui5_if_lp_kpi.
CREATE OBJECT li_lp_kpi TYPE (lv_classname).
DATA(lv_count) = li_lp_kpi->count( lv_filter ).
DO lv_count TIMES.
INSERT VALUE #( id = sy-index ) INTO TABLE lt_result.
ENDDO.
copy_data_to_ref( EXPORTING is_data = lt_result CHANGING cr_data = er_entityset ).
ENDMETHOD.
(4/4) Maintain the KPI at the Launchpad with the following endpoint:
.../sap/opu/odata/sap/Z2UI5_PROXY_KPI_SRV/ENTITYCollection/$count?$filter=CLASS eq 'z2ui5_cl_proxy_kpi_hello_world'