4.6 Custom Business Catalogs and Roles
In the previous section, we discussed how to enable the Create Sales Order transactional app using the standard SAP business role (SAP_SD_BCR_FIELDSALESREP_X1) and the standard SAP business catalog (SAP_SD_BC_FIELDSALESREP_X1). However, in a real-world scenario, you might have to create your own catalogs and roles.
To demonstrate how to do this, let’s look at an example. User A is supposed to only have access to the Create Sales Order transactional app. User B is supposed to only have access to the Change Sales Order transactional app. However, both the apps are part of the same standard catalog (SAP_SD_BC_FIELDSALESREP_X1), so if you assign the standard SAP business role to both users, then they both will be able to use the apps. To address such scenarios, you must create custom business catalogs and custom roles. In this exercise, we’ll show you how to do so.
4.6.1 Create a New Launchpad and Application
In this section, we’ll walk through how to create a new launchpad and application for your custom business catalog. Follow these steps:
- Log in to your ABAP front-end server, and run Transaction LPD_CUST.
- Create a new launchpad by clicking the New Launchpad button (see Figure 4.39).
- Enter the field values shown in Figure 4.40.
- Click Yes to ignore the namespace (see Figure 4.41).
-
Create a new application by clicking New Application (see Figure 4.42).
Figure 4.42 New Application
- Enter “Create Sales Order” in the Link Text field. From the Application Type dropdown, select URL (see Figure 4.43).
-
Click the Edit button
next to the URL input box.
- Enter “/sap/bc/ui5_ui5/sap/sd_so_cre” in the URL box (see Figure 4.44).
- Click Show Advanced (Optional) Parameters.
-
Click the Edit button
next to the Application Alias input box.
- Enter “SalesOrder” in the box.
- Enter “SAPUI5.Component=cus.sd.salesorder” in the Additional Information box, then click Save (see Figure 4.45).
4.6.2 Create and Assign a Transport Request
Before we move to the next step, let’s discuss the transportation concepts in SAP Fiori launchpad designer. You can launch SAP Fiori launchpad designer in two scopes:
-
Customization scope
http://hostname:port/sap/bc/_ui5/sap/arsrvc_upb_admn/main.html20?
sap-client=120&scope=CUST -
Configuration scope
http://hostname:port/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html20?
sap-client=120&scope=CONF
When you create, update, or delete a catalog or tile, all these actions must be captured. If you launch the SAP Fiori launchpad designer in a customization scope, these actions are captured under the Customizing request. Similarly, when you launch it in the configuration mode, the actions are captured in the workbench request. For testing, the customization scope can be used, and then the content can be transported through the Customizing request. Next, we’ll show you how to create and assign a request via SAP Fiori launchpad designer.
Follow these steps:
- Log in to your ABAP server, and run Transaction SE01.
-
Create a new request by clicking
.
-
Select Customizing request, and click
(see Figure 4.46).
Figure 4.46 Creating New Transport Request
-
Enter a Short Description, then click
(see Figure 4.47).
Figure 4.47 Saving Request
You should now see the request, as shown in Figure 4.48.Figure 4.48 Transport Request
- Log in to SAP Fiori launchpad designer at http://hostname:port/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html20?sap-client=120&scope=CUST.
-
Click
at the top-right corner.
-
Uncheck the None (Local Object) checkbox, then select the Customizing Request from the dropdown box. Click OK (see Figure 4.49).
Figure 4.49 Assigning Transport Request
4.6.3 Create a New Catalog
Now you’re all set to create, update, or delete catalogs or tiles, with all the actions captured in the transport requests. To create a new catalog, follow these steps:
-
From the SAP Fiori launchpad designer screen, click Catalogs (see Figure 4.50).
Figure 4.50 Selecting Catalogs
- Create a new catalog by clicking +.
- Select the Standard catalog, enter the details shown in Figure 4.51, and click Save.
4.6.4 Create New Target Mapping
Next, you need to create a new target mapping. Follow these steps:
- Select the catalog which you created in the previous step.
-
Click the Target Mapping icon
, then click Create Target Mapping (see Figure 4.52).
Figure 4.52 Creating Target Mapping
-
Intent is a mechanism that allows end users to perform actions on semantic objects. In the Intent section, select the semantic object by clicking
, then manually enter the action. Enter the information in the fields, as shown in Figure 4.53.
- To configure the target, select SAP Fiori App using LPD_CUST from the dropdown list, then enter the details shown in Figure 4.54. Click Save.
-
In the General section, configure the following fields (see Figure 4.55):
-
Information
In this field, you can enter any important information or comments. -
Device Types
Select all the devices; tiles will only be displayed for the devices selected here. -
Parameters
Define optional or mandatory parameters of the target mapping. -
Allow additional parameters
Allows passing additional parameters that aren’t defined in the parameters table.
Figure 4.55 General Section
-
Information
- Click Save.
- Save the changes by clicking OK.
4.6.5 Add a Static Tile
Next, you’ll add a new tile. Follow these steps:
-
Click the Tiles icon, then click + to add a tile (see Figure 4.56).
Figure 4.56 Adding Tile
There are three type of tiles, and each shows information differently (see Figure 4.57):-
Static tile
Displays static information, such as the title, subtitle, logo, and information. -
Dynamic tile
Displays all the information that the static tile displays, and shows the value dynamically from the back-end. This value is refreshed depending on the refresh interval that you set during tile creation. -
News tile
Streams a live news feed directly in your SAP Fiori launchpad.
Figure 4.57 Dynamic Tile and Static Tile
-
Static tile
-
Select the App Launcher—Static tile (see Figure 4.58).
Figure 4.58 Adding Static App Launcher
-
Enter “Create Sales Order” in the Title field, and select an icon from the Icon field (see Figure 4.59).
Figure 4.59 General Section
-
Enter the following details in the Navigation section and click Save (see Figure 4.60):
- Semantic Object: “SalesOrder”
- Action: “create”
-
Click OK to confirm the changes.
Figure 4.60 Navigation Section
4.6.6 Create the Custom Role and Add the Catalog
The next step is to add the catalog to a custom role, so first, let’s create a custom role by following these steps:
- Log in to your ABAP front-end server, and run Transaction PFCG (Role Maintenance).
-
Enter the role name “Z_SAL_REP_ROLE”, and click Single Role (see Figure 4.61).
Figure 4.61 Role Maintenance
- Click Save.
- Enter a meaningful description in the Description field (see Figure 4.62).
-
Click the Menu tab, then click
to insert the node (see Figure 4.63).
Figure 4.63 Inserting Node
-
Select SAP Fiori Tile Catalog from the menu (see Figure 4.64).
Figure 4.64 SAP Fiori Tile Catalog
-
Enter “Z_SAL_REP” in the Catalog ID field, then click
(see Figure 4.65).
Figure 4.65 Assigning Tile Catalog
-
Navigate to the User tab, enter the User ID, and click
(see Figure 4.66).
Figure 4.66 Assigning User
-
Log in to SAP Fiori launchpad, and click
to open the ME area.
-
Click on App Finder (see Figure 4.67).
Figure 4.67 App Finder
-
From the Catalogs dropdown box, select the Sales Rep Catalog (see Figure 4.68).
Figure 4.68 Selecting Custom Catalog
- Click + to add the tile to a group.
-
Select the My Home checkbox, then click OK (see Figure 4.69).
Figure 4.69 Adding Tile to My Home Group
-
Click
to go back to the main page. You should now see the Create Sales Order tile under the My Home group (see Figure 4.70).
Figure 4.70 My Home Group
-
Click the tile to run the app (see Figure 4.71).
Figure 4.71 Create Sales Order App
Congratulations, you’ve successfully completed the exercise!