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
- Create a subclass in your system based on the class
/IWPGW/CL_TGW_FACADE_BWF_V2
. - 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](https://bloggingwithjan.com/wp-content/uploads/2022/10/spro_provider_implementation.png)
4. Replace your own class with the standard class /IWPGW/CL_TGW_FACADE_BWF_V2
.
![Task Gateway Providers Customizing SPRO](https://bloggingwithjan.com/wp-content/uploads/2022/10/spro_task_gateway_providers-1024x195.png)
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.
- Create an extension project for the My Inbox application via SAP Web IDE.
- Create an UI Controller Extension
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.