How To: Delete buttons ‘New’ and ‘Copy’ from ChaRM WebUI screens using Enhancement
According to the standard ChaRM process, a change document should be created solely as a follow-up from the change request. At the same time standard views contain buttons that would allow the end user to create change document without preceding change request. That’s why we need to remove those buttons.
Buttons ‘New’ and ‘Copy’ from the Search View:And button ‘Copy’ from the Overview screen:First of all find UI components for these views. Press ‘F2’ on the element on the screen.UI components are AIC_CMCD_S and AIC_CMCD_H.
Then go to SAP GUI, open component with t-code BSP_WD_CMPWB.
In component AIC_CMCD_H find method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS and remove COPY button using enhancement.
In component AIC_CMCD_S find method DO_PREPARE_OUTPUT and remove NEW and COPY buttons using enhancement.
First of all create Enhancement Set
Then click on button ‘Enhance Component’
Enter the name of your enhancement. In the next dialog enter name for application (for instance, ZAIC_CMCD_S).
Then system will create BSP application and ask for a package and workbench request. Finally, you should receive the message like ‘Component AIC_CMCD_S successfully created for enhancement’.
Right click on View AIC_CMCD_S/SearchResultView and choose ‘Enhance’. Z-class will be created:
Then find ‘Request processing -> DO_PREPARE_OUTPUT, right click on it and select ‘Redefine’.
Add abap-code for deleting NEW and COPY buttons, then activate.Then assign your enhancement set to the client – t-code SM30, view BSPWDV_EHSET_ASG.
As the result, buttons NEW and COPY disappeared:
In component AIC_CMCD_H find method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS and remove COPY button using enhancement in the same way.