Create SAP Fiori Launchpad Space and Page Templates
- How to create a space template
- How to create a page template
- How to scope page and space template
- How to authorize business users for space app
- How to use predefined spaces and pages
Prerequisites
- You need an SAP BTP, ABAP environment licensed version (not a trial version).
- You have followed the group Build an SAP Fiori elements App Using the ABAP RESTful Application Programming Model (RAP) – Beginner [RAP100] in a licensed system.
- You have followed the group Create, Deploy and Integrate an SAP Fiori elements App into SAP Fiori Launchpad for SAP BTP, ABAP Environment [RAP100] in a licensed system.
- To manage the predefined launchpad pages and spaces in Fiori Launchpad and maintain business roles, you need to have a role with business catalogs User Interface - Fiori Launchpad Design (ID:
SAP_CORE_BC_UI_FLD) and Identity and Access Management - Role Management (ID:SAP_CORE_BC_IAM_RM)
Replace ### with your own ID.
- Step 1
IMPORTANT: You cannot complete this step (or this tutorial) with a trial license.
-
Open your package
ZRAP100_###in ADT, right-click Fiori User Interface and select New > Launchpad Page Template.
-
Create a new launchpad page template:
- Name:
ZRAP100_TRAVEL_### - Description: Page for travel ###
- Title in Launchpad: Travel App ###
Click Next >.
- Name:
-
Select your transport request and click Finish.

-
In your launchpad page template right-click the list area in sections and select Add Child > Section.

-
Create a new section:
- ID:
SECTION_### - Title: Section ###
- ID:
-
Right-click
SECTION_###and select Add Child > Visualizations.
-
Right-click Visualizations and select Add Child > Visualization.

-
Create a new visualization and add the launchpad app descriptor item assignment:
- ID:
APP_DESCRIPTOR_ITEM_### - Type: Launchpad App Descriptor Item Assignment
- Display Format: Standard Tile
- Launchpad App Descriptor Item ID:
ZRAP100_###_UI5R - Title ID:
You can press
CTRL+ Space to load the existing data, to fill in your field entries. - ID:
-
Activate your launchpad page template.
-
- Step 2
-
Click the symbol to open the launchpad page template.

-
The launchpad page template will not be loaded. The page template needs to be scoped still in order to be able to use it.

-
- Step 3
For more information see documentation SAP BTP, ABAP environment > Development in the ABAP Environment > UI Development > SAP Fiori Applications in the ABAP Environment > Scoping Space and Page Templates.
-
Right-click Classes and select New ABAP Class.

-
Create a new class:
- ID:
ZCL_SCOPE_PAGE_SPACE_### - Title: Class for calling the scoping API
Click Next >.
- ID:
-
Finish the ABAP class creation wizard after transport request selection.

-
The snippet scopes the page template. Scoping a space template is still commented out. Therefore copy and paste the code snippet in your class. Change ### with your own ID.
ABAPCopyCLASS zcl_scope_page_space_### DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_scope_page_space_### IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_scope_api) = cl_aps_bc_scope_change_api=>create_instance( ). lo_scope_api->scope( EXPORTING it_object_scope = VALUE #( pgmid = if_aps_bc_scope_change_api=>gc_tadir_pgmid-R3TR scope_state = if_aps_bc_scope_change_api=>gc_scope_state-ON * Space template * ( object = if_aps_bc_scope_change_api=>gc_tadir_object-UIST obj_name = 'ZRAP100_TRAVEL_###' ) * Page template ( object = if_aps_bc_scope_change_api=>gc_tadir_object-UIPG obj_name = 'ZRAP100_TRAVEL_###' ) ) iv_simulate = abap_false iv_force = abap_false IMPORTING et_object_result = DATA(lt_results) et_message = DATA(lt_messages) ). ENDMETHOD. ENDCLASS. -
Save and activate.
-
Right-click
ZCL_SCOPE_PAGE_SPAGE_###and select Run As > ABAP Application (Console) or press F9 to run your application.
-
- Step 4
-
Click the symbol to open the launchpad page template in manage launchpad pages app. The link can be found in the upper right corner of the editor.

-
Now the launchpad page template will be loaded with the page and section content.

-
Navigate to the Home screen, select Administration > Launchpad.

-
Open the Manage Launchpad Pages app.

-
Select Predefined and search for
ZRAP100_Travel_###. Now you can see your launchpad page template under the predefined tab.
-
- Step 5
-
Open your package
ZRAP100_###and right-click Fiori User Interface and select New > Launchpad Space Template.
-
Create a new launchpad space template:
- Name:
ZRAP100_TRAVEL_### - Description: Space for travel ###
- Title in Launchpad: Travel App ###
Click Next >.
- Name:
-
Select your transport request and click Finish.

-
Add general information:
- Sort Priority: 100

A higher sort priority number will let the space appear more on the right side of the tab overview on the home screen in SAP Fiori launchpad.
Click Add and selectZRAP100_TRAVEL_###as launchpad page template. -
Activate your changes.
-
- Step 6
-
In your SAP Fiori launchpad, navigate to the Home screen > Administration > Launchpad.

-
Open the Manage Launchpad Spaces app.

-
Select Predefined and search for
ZRAP100_Travel_###.
You will not be able to find an entry. The page template needs to be scoped still in order to be able to use it.
-
- Step 7
-
Open your ABAP class
ZCL_SCOPE_PAGE_SPACE_###and uncomment the following line:ABAPCopy( object = if_aps_bc_scope_change_api=>gc_tadir_object-UIST obj_name = 'ZRAP100_TRAVEL_000' ) -
Save and activate.
-
Right-click
ZCL_SCOPE_PAGE_SPAGE_###and select Run As > ABAP Application (Console) or press F9 to run your application.
-
- Step 8
- Refresh your Manage Launchpad Spaces page and search for
ZRAP100_Travel_###under Predefined.
Now you are able to see the launchpad space.
- Refresh your Manage Launchpad Spaces page and search for
- Step 9
Until now no business user can see the created predefined space and its page in their SAP Fiori Launchpad. An administrator could add the space to an existing business role like the one created before in tutorial Integrate List Report into ABAP Fiori Launchpad.
Here we show how to provide authorization via a business role template instead. This has following advantages:
- Administrators do not have to build a business role on their own.
- Delivered changes can be applied with app support to inheriting business roles and their assigned business users.
-
As Developer in ADT, right-click the Identity and Access Management folder in your project and choose New > Business Role Template

-
Enter Name
ZRAP100_BRT_###, DescriptionBusiness Role Template for Travel Solution ###and finish the wizard.
-
Right-click the Identity and Access Management folder in your project again and choose New >
Business Role Templ. - Launchpad Space Templ. Assignmentnow.
-
Enter Name
ZRAP100_BRT_SPT_###, DescriptionAssignment of space template to business role template ###, finish the wizard and save (Ctrl + S).
-
In the editor of the Assignment enter Business Role Template
ZRAP100_BRT_###, Launchpad Space TemplateZRAP100_TRAVEL_###and save (Ctrl + S).
-
Switch back to the editor of the business role template and press Publish locally
- Step 10
Once a business role template was provided as part of a solution, an administrator can create a role which is based on a template. After that there is app support available to integrate changes provided to the business role template. For further information see documentation SAP Business Technology Platform (SAP BTP) > SAP Business Technology Platform > Administration and Operations > Administration and Operations in the ABAP Environment > SAP Fiori Apps in the ABAP Environment > Identity and Access Management > Business Role Templates.
-
As Administrator in SAP Fiori Launchpad open App Maintain Business Roles.
-
Click the Create From Template button.

-
Use the value help for Template to set
ZRAP100_BRT_###, deleteTfrom the defaulted Name, deleteTemplatefrom the defaulted Description, leave all the other defaulted values and press OK.
-
In the business role editor under General Role Details > Access Categories > Write, Read, Value Help set the value Unrestricted.

-
Afterwards switch to the Business Users tab, add your user and Save the business role.

-
- Step 11
- Go to your Home screen and select
Travel ###.
You can see the page with its section and app now.
- Go to your Home screen and select
- Step 12
Where can you find the launchpad page and space templates in the Manage Launchpad Pages/Spaces App?
- Step 13
Here you can find more information about Working with Launchpad Page Templates (UIPG), Working with Launchpad Space Templates (UIST) and Scoping Space and Page Templates.
- Create launchpad page template
- Check Template availability in manage launchpad pages app
- Scope page and space templates
- Open launchpad page template
- Create launchpad space template
- Check template availability in manage launchpad spaces app
- Scope space template
- Check launchpad space
- Develop authorization template for space
- Authorize business user for space
- Open predefined space in SAP Fiori launchpad
- Test yourself
- More Information