Skip to Content
avatar image
Former Member

Add a new button in BP_HEAD_SEARCH

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.



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 04, 2008 at 09:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      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.



  • avatar image
    Former Member
    Sep 04, 2008 at 11:50 AM

    problem has been solved....

    Add comment
    10|10000 characters needed characters exceeded