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:

  1. Log in to your ABAP front-end server, and run Transaction LPD_CUST.
  2. Create a new launchpad by clicking the New Launchpad button (see Figure 4.39).
    New LaunchpadLaunchpadnew

    Figure 4.39    New Launchpad

  3. Enter the field values shown in Figure 4.40.
    Launchpad RoleLaunchpadrole

    Figure 4.40    Launchpad Role

  4. Click Yes to ignore the namespace (see Figure 4.41).
    Ignoring NamespaceNamespace

    Figure 4.41    Ignoring Namespace

  5. Create a new application by clicking New Application (see Figure 4.42).
    New Application

    Figure 4.42    New Application

  6. Enter “Create Sales Order” in the Link Text field. From the Application Type dropdown, select URL (see Figure 4.43).
    Application TypeApplicationtype

    Figure 4.43    Application Type

  7. Click the Edit button inline image next to the URL input box.
  8. Enter “/sap/bc/ui5_ui5/sap/sd_so_cre” in the URL box (see Figure 4.44).
    Application ParameterApplicationparameter

    Figure 4.44    Application Parameter

  9. Click Show Advanced (Optional) Parameters.
  10. Click the Edit button inline image next to the Application Alias input box.
  11. Enter “SalesOrder” in the box.
  12. Enter “SAPUI5.Component=cus.sd.salesorder” in the Additional Information box, then click Save (see Figure 4.45).
    Application AliasApplicationalias

    Figure 4.45    Application Alias

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:

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:

  1. Log in to your ABAP server, and run Transaction SE01.
  2. Create a new request by clicking inline image.
  3. Select Customizing request, and click inline image (see Figure 4.46).
    Creating New Transport Request

    Figure 4.46    Creating New Transport Request

  4. Enter a Short Description, then click inline image (see Figure 4.47).
    Saving Request

    Figure 4.47    Saving Request

    You should now see the request, as shown in Figure 4.48.
    Transport Request

    Figure 4.48    Transport Request

  5. 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.
  6. Click inline image at the top-right corner.
  7. Uncheck the None (Local Object) checkbox, then select the Customizing Request from the dropdown box. Click OK (see Figure 4.49).
    Assigning Transport Request

    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:

  1. From the SAP Fiori launchpad designer screen, click Catalogs (see Figure 4.50).
    Selecting Catalogs

    Figure 4.50    Selecting Catalogs

  2. Create a new catalog by clicking +.
  3. Select the Standard catalog, enter the details shown in Figure 4.51, and click Save.
    Creating CatalogCatalogcreate

    Figure 4.51    Creating Catalog

4.6.4    Create New Target Mapping

Next, you need to create a new target mapping. Follow these steps:

  1. Select the catalog which you created in the previous step.
  2. Click the Target Mapping icon inline image, then click Create Target Mapping (see Figure 4.52).
    Creating Target Mapping

    Figure 4.52    Creating Target Mapping

  3. Intent is a mechanism that allows end users to perform actions on semantic objects. In the Intent section, select the semantic object by clicking inline image, then manually enter the action. Enter the information in the fields, as shown in Figure 4.53.
    Intent SectionIntent

    Figure 4.53    Intent Section

  4. 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.
  5. 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.
    Target SectionTarget

    Figure 4.54    Target Section

    General Section

    Figure 4.55    General Section

  6. Click Save.
  7. Save the changes by clicking OK.

4.6.5    Add a Static Tile

Next, you’ll add a new tile. Follow these steps:

  1. Click the Tiles icon, then click + to add a tile (see Figure 4.56).
    Adding Tile

    Figure 4.56    Adding Tile

    There are three type of tiles, and each shows information differently (see Figure 4.57):
    Dynamic Tile and Static Tile

    Figure 4.57    Dynamic Tile and Static Tile

  2. Select the App Launcher—Static tile (see Figure 4.58).
    Adding Static App Launcher

    Figure 4.58    Adding Static App Launcher

  3. Enter “Create Sales Order” in the Title field, and select an icon from the Icon field (see Figure 4.59).
    General Section

    Figure 4.59    General Section

  4. Enter the following details in the Navigation section and click Save (see Figure 4.60):
    • Semantic Object: “SalesOrder”
    • Action: “create”
  5. Click OK to confirm the changes.
    Navigation Section

    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:

  1. Log in to your ABAP front-end server, and run Transaction PFCG (Role Maintenance).
  2. Enter the role name “Z_SAL_REP_ROLE”, and click Single Role (see Figure 4.61).
    Role Maintenance

    Figure 4.61    Role Maintenance

  3. Click Save.
  4. Enter a meaningful description in the Description field (see Figure 4.62).
    Changing RoleRoleschange

    Figure 4.62    Changing Role

  5. Click the Menu tab, then click inline image to insert the node (see Figure 4.63).
    Inserting Node

    Figure 4.63    Inserting Node

  6. Select SAP Fiori Tile Catalog from the menu (see Figure 4.64).
    SAP Fiori Tile Catalog

    Figure 4.64    SAP Fiori Tile Catalog

  7. Enter “Z_SAL_REP” in the Catalog ID field, then click inline image (see Figure 4.65).
    Assigning Tile Catalog

    Figure 4.65    Assigning Tile Catalog

  8. Navigate to the User tab, enter the User ID, and click inline image (see Figure 4.66).
    Assigning User

    Figure 4.66    Assigning User

  9. Log in to SAP Fiori launchpad, and click inline image to open the ME area.
  10. Click on App Finder (see Figure 4.67).
    App Finder

    Figure 4.67    App Finder

  11. From the Catalogs dropdown box, select the Sales Rep Catalog (see Figure 4.68).
    Selecting Custom Catalog

    Figure 4.68    Selecting Custom Catalog

  12. Click + to add the tile to a group.
  13. Select the My Home checkbox, then click OK (see Figure 4.69).
    Adding Tile to My Home Group

    Figure 4.69    Adding Tile to My Home Group

  14. Click inline image 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).
    My Home Group

    Figure 4.70    My Home Group

  15. Click the tile to run the app (see Figure 4.71).
    Create Sales Order App

    Figure 4.71    Create Sales Order App

Congratulations, you’ve successfully completed the exercise!