cancel
Showing results for 
Search instead for 
Did you mean: 

Add a new button in BP_HEAD_SEARCH

Former Member
0 Kudos

Hi Experts,

My requirement is to add a new button and disable GROUP button in MainSearchResult view of BP_HEAD_SEARCH component.The steps i followed are..

1.Created a Enhancement set in BSPWDVC_CMP_EXT and assign it to BSPWDV_EHSET_ASG in SM30.

2.Enhancing view MainSearchResult of BP_HEAD_SEARCH component using this Zenhancement set.

3.Redefin DO_PREPARE_OUTPUT method of impl class and add following code for disabling group button.

ls_button-enabled = abap_false.

and for add new button

<button>-text = 'Family'.

ls_button-id = 'CreateEmployee'.

ls_button-type = cl_thtmlb_util=>gc_icon_new.

ls_button-text = 'Employee'.

ls_button-on_click = 'CREATEEMP'.

ls_button-enabled = abap_true.

APPEND ls_button TO gt_button.

But nothing is reflecting while testing in CRM_UI_FRAME....please tell me what step i m missing and m i doing correct.

Thanks

Gaurav

Accepted Solutions (1)

Accepted Solutions (1)

CarstenKasper
Active Contributor
0 Kudos

Hi Gaurav,

the customizing you did seems OK. Just make sure you activated the EH-Set for the right client.

In the BP_HEAD_SEARCH component you need to enhance view MainSearchResult

The class is: cl_bp_head__mainsearchres_impl

Here redefining the DO_PREPARE_OUTPUT is correct.

You could just do the following:

DELETE gt_button where on_click = 'CREATEGROUP'.

Maybe you put a breakpoint in the method and check what is wrong?

cheers Carsten

Former Member
0 Kudos

Hi,

Thanks for reply..

Delete will remove button from screen my requirement is to disable the button.I have done thie by modifying table.

But i have one more requirement that, this disabling should be based on role.for that what i will do.

Thanks

Gaurav

Answers (1)

Answers (1)

Former Member
0 Kudos

problem has been solved....