cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide a button in CRM webui screen?

gopalkrishna_baliga
Participant
0 Kudos
1,150

Dear Experts,

I have a requirement where I need to do code changes in CRM webui.

The change is needed in Product components page.

From here i go to "Installed Bases"

Then i open one of the ibases list in the search page

Here in this page I need to disable or hide the Edit button for a particular Role (warranty coordinator)

I don't have any knowledge on Webui and underlying code.

1. How to find the find the program name where the edit button is there?

2. How to write the code to disable or hide the edit button when role = warranty coordinator?

3. How can i change the underlying SAP code ? Because this is not custom code.

Please help!

Thanks

Gopal

Accepted Solutions (0)

Answers (1)

Answers (1)

developerone
Contributor
0 Kudos

1. Create an Enhancement.

2. Search for table rt_buttons in your CRM Web UI Component.

3. If you want to hide the button remove the button info from rt_buttons. If you'd like to disable the button set the enabled property in rt_buttons table to false.

Hope this answers your question.

Cheers,

Sai

gopalkrishna_baliga
Participant
0 Kudos

Thanks Sai for your Answer.

But how to find the CRM Webui component?

Is that the one we get using F2 button ?

I will try that.

Regards

Gopal

developerone
Contributor
0 Kudos

Yes, please use F2. Find the component and place a break point to check at run time if you are able to remove the button.

gopalkrishna_baliga
Participant
0 Kudos

Hi Sai

I tried re-defining the method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS as below.

But its not working. Edit button does not get hidden.

In debug mode i can see it calls this method but strangely it skips DELETE rt_buttons statement at the end.

Also i have observed that it is skipping READ TABLE rt_buttons.

Why is this so? what am i doing wrong? do I need to put my code in some other method ?