Add, remove, or change action buttons in Fiori My Inbox

There are two ways to implement this requirement. In the backend or in the frontend. You should only choose one course of action. The two options are shown below. Starting with the backend option.

Backend

๐Ÿ“Œย 

Central Hub Deployment = create everything in your gateway system

Embedded Deployment = create everything in your backend system

  1. Create a subclass in your system based on the class /IWPGW/CL_TGW_FACADE_BWF_V2.
  2. Redefine the method MAP_TASK_ADDITIONAL_FLAGS.
METHOD map_task_additional_flags.
  CALL METHOD super->map_task_additional_flags
    CHANGING
      is_task = is_task.
  IF is_task-task_def_id CS 'XXXXXXXXXX'. "your ws or ts id
    CLEAR is_task-task_supports-forward.
    CLEAR is_task-task_supports-claim.
  ENDIF.
ENDMETHOD.

3. Open the provider implementation in the transaction spro.

Customizing Provider Implementation

4. Replace your own class with the standard class /IWPGW/CL_TGW_FACADE_BWF_V2.

Task Gateway Providers Customizing SPRO

If a specific class is already specified there, adapt it (see step 2)

Thatโ€™s it.

Frontend

๐Ÿ“Œ 

if you are not familiar with the extension of SAPUI5 applications first take a look a the official sap documentation.

to check applications for their extensibility, it is best to always check the SAP Fiori Apps Reference Library.

  1. Create an extension project for the My Inbox application via SAP Web IDE.
  2. Create an UI Controller Extension
    1. S3.controller.js - extHookChangeFooterButtons
extHookChangeFooterButtons: function (oButtonList) {
    var sTaskDefinitionId = this.getView().getBindingContext().getProperty("TaskDefinitionID");
    switch (sTaskDefinitionId) { //Define your condition
    case "XXX":
        oButtonList.aButtonList = []; // No Buttons
        break;
    case "XYZ":
        oButtonList.aButtonList.splice(1, 1) //No Claim Button
        break;
    default:
        break;
    }
}

If there is already an extension project for the My Inbox, use it.

That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *