cancel
Showing results for 
Search instead for 
Did you mean: 

Toolbar UI

Former Member
0 Kudos

Hi Gurus,

I'm facing a strange thing.

I'm trying to delete the "Search Archive" button from the top of the User Interface in the search screen for Trade Promotion. When I click on the button F2 for technical info it retrieves me the following information:

Component: TPMOE, View: AdvancedSearchViewSet, Context Node: THTMLB, Attribute: BUTTON_1, but when I access to the view I cannot find any context node called THTMLB.

Someone of you can suggest me a way to achieve it?

I found that there something related in the Toolbar Related Methods. Do you think that if I comment the code the button will disappear?

Full of point if it helps,

thanks in advance,

best regards,

A.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do in this way..

1.Enhance component TPMOE

2.Enhance View AdvancedSearchViewSet

3.GoTo Impl class and chooes IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS method.

4.Redefine this method.

5.Write this code

call method super-> IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS

DELETE gt_button where on_click = 'SEARCHARCHIVE'. (Click event of that button.)

Regards

Gaurav

Former Member
0 Kudos

Hi Gaurav,

in the way you suggested, the button will disappear?

Thanks a lot,

best regards,

A.

Former Member
0 Kudos

Hi A,

Gaurav is right.

By implementing the steps given above, the button will be deleted from the UI.

Thanks,

Vinay

Former Member
0 Kudos

Hi,

and what about the delete button that I have on the table in the AdvancedSearchResult?

How can I delete it?

Thanks a lot,

best regards,

A.

Former Member
0 Kudos

Hello A,

Try doing the same way what Gaurav has suggested. But in this case the view would be "AdvancedSearchResult" ..

In the implementation class of the viewset "CL_TPMOE_ADVANCEDSEARCHRE_IMPL" there would be a method called DO_PREPARE_OUTPUT. In this method there is a method call to SETUP_BUTTONS(). Here is the place where the buttons displayed on the search result are coded. Try redefining the same method and this should suffice your requirement.

Regards,

Vinay

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Andrea,

a button comes from the implementation class by default.

But the F2 help shows alway context node "THTMLB".

The buttons are probably created in one of the methods of interface IF_BSP_WD_TOOLBAR_CALLBACK or in the method "DO_PREPARE_OUTPUT" of the controller implementation class.

If you enhance the component and redefine the relevant method (place your own code if you want) there should only comes up the buttons you define.

In your case the buttons are created in method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS of the controller class.

Regards,

Claudia