cancel
Showing results for 
Search instead for 
Did you mean: 

BSPWD_BASICS Enhancements

Former Member
0 Kudos

Hi,

I have Enhanced Component BSPWD_BASICS view: WorkAreaHostViewSet to delete buttons from the Work Area Toolbar.

All is activated without error but the Redefinition of the method if_bsp_wd_toolbar_callback~get_buttons is never called.

In runtime I have validated that erasing rows from internal table rt_buttons dissapear the required buttons.

Any help will be appreciated.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Claudia,

I'm trying to use the code above in the component CRM_UI_FRAME but I receive a casting error =S.

Can u share the code you used to solve this problem.

Thanx in advanced.

Former Member
0 Kudos

Hi,

where do you get the error?

Here's the code of the new implementation class of view BSPWD_BASICS/WorkAreaHostViewSet (inherits from default impl. class CL_BSPWD_BASICS_WA_HOST_VS):

Method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS:

DATA: ls_button LIKE LINE OF rt_buttons.
  CALL METHOD super->if_bsp_wd_toolbar_callback~get_system_buttons
    RECEIVING
      rt_buttons = rt_buttons.

  ls_button-type      = cl_thtmlb_util=>gc_icon_send.
  ls_button-id        = 'SEND'.
  ls_button-text      = ls_button-tooltip = 'Send'
  ls_button-on_click  = 'SEND'.
  ls_button-enabled   = 'X'.
  ls_button-page_id   = me->component_id.

  INSERT ls_button INTO rt_buttons INDEX 1.

DO_HANDLE_EVENT:

* Eventhandler dispatching
    CASE htmlb_event_ex->event_server_name.
      WHEN 'SEND'.                                      "#EC NOTEXT
        EH_ONSEND( htmlb_event    = htmlb_event
                    htmlb_event_ex = htmlb_event_ex ).

      WHEN others.

        global_event = super->do_handle_event( event           = event
                                               htmlb_event     = htmlb_event
                                               htmlb_event_ex  = htmlb_event_ex
                                               global_messages = global_messages ).
    ENDCASE.

And a new method EH_ONSEND for event-handling of the new button.

All other methods of the class are not redefined!

I use the standard context class and context nodes.

Regards,

Claudia

Former Member
0 Kudos

Hello,

I strongly recommend that you should not enahnce the components BSPWD_BASICS or CRM_UI_FRAME.

These components are used by the CRM UI Framework to dynamically map the components in the UI. It suggest you always make changes in your application component for the UI changes.

Could you please let me know the application area component and the views in which you want to remove the buttons ?

Regards,

Vinay

Former Member
0 Kudos

Is there any other way to access to the buttons of the Work Area Toolbar?

I want to erase the buttons in the WA Toolbar of Opportunity View/Create/Update.

What do you mean with application area component?

Regards

Former Member
0 Kudos

Hi,

as per your previous reply, i understand that you are trying to remove some buttons from the Opportunity overview page.

For this

Go to the method CL_BT111H_O_OPPORTUNITYO0_IMPL -> GET_BUTTONS. In this you will find all the buttons that are displayed. Comment out the buttons which you dont want (or)

enhance the component using the enhancement set and they try redefinging the above mentioend method..

Hope this helps

Regards,

Vinay

Former Member
0 Kudos

Thanx.

I Enhance component BT111H_OPPT > Windows > BT111H_OPPT/MainWindow > Method: IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS

And it works.

One more question.

For this:

>

> Go to the method CL_BT111H_O_OPPORTUNITYO0_IMPL -> GET_BUTTONS. In this you will find all the buttons that are displayed. Comment out the buttons which you dont want (or)

> enhance the component using the enhancement set and they try redefin

>

this implies to modify the standard (key required)?

Thanx in advanced.

Former Member
0 Kudos

That is right. You are modifying the standard delivered by SAP.

Regards,

Vinay

Answers (5)

Answers (5)

Former Member
0 Kudos

I'm receiving the same error:

Error Business Server Page (BSP)

¿Qué ha sucedido?

Se ha producido un error al llamar la página BSP a causa de un error

Nota

Se ha procesado en el sistema el texto de error siguiente:

Se ha producido una excepción del tipo CX_SY_MOVE_CAST_ERROR, pero ni se ha tratado localmente ni se ha declarado en una claúsula RAISING

Clase de excepción CX_SY_MOVE_CAST_ERROR

Nombre de error MOVE_CAST_ERROR

Programa CL_CRM_UI_CORE_APPL_CONTROLLERCP

Include CL_CRM_UI_CORE_APPL_CONTROLLERCM00C

Clase ABAP CL_CRM_UI_CORE_APPL_CONTROLLER

Método EXECUTE_NAVIGATION

Línea 53

Texto explicativo En la operación CAST ('?=' o 'MOVE ? TO') se ha producido un conflicto de tipo. El tipo de fuente CLASS=CL_CRM_UI_FRAME_APP_CONTROLLER no es compatible como asignación conel tipo destino CLASS=CL_BSPWD_BASICS_WA_HOST_VS.

Clase de error: Exception

Su equipo SAP Business Server Pages

dsdaraujo
Explorer
0 Kudos

We just upgraded to CRM 7.0 and I'm getting this same CAST error from CL_CRM_UI_FRAME_APP_CONTROLLER TO CL_BSPWD_BASICS_WA_HOST_VS.

Does anyone can help? Please!

Former Member
0 Kudos

The following:

More >

Preview Output

Planning

Sales Assistant

Distribute

Redetermine Parties

Regards

Former Member
0 Kudos

Hi,

I had the same problem.

My solution:

Enhance component CRM_UI_FRAME (or CRM_UI_PORTAL if you have portal integration) and here enhance view BSPWD_BASICS/WorkAreaHostViewSet.

If you do your changes here, everything works.

I can't explain the problem, actually it should make no difference where you enhance the view (it's a component usage), but the problem can be solved as described above.

Regards,

Claudia

Former Member
0 Kudos

What buttons you are trying to hide from the work area? I dont think you can enhance BSPWD_BASICS application.

Thanks,

THirumala.

Former Member
0 Kudos

In the method if_bsp_wd_toolbar_callback~get_buttons

  • get view controller in workarea

DATA: lv_id TYPE string.

lv_id = get_viewarea_content_id( co_workarea_name ).

DATA: lv_delegate TYPE REF TO if_bsp_wd_toolbar_callback.

TRY.

lv_delegate ?= get_controller( lv_id ).

IF lv_delegate IS BOUND.

rt_buttons = lv_delegate->get_buttons( ).

ENDIF.

CATCH cx_sy_move_cast_error. "#EC NO_HANDLER

  • not implementing the toolbar interface is not an error!

ENDTRY.

DELETE rt_buttons INDEX 13.

DELETE rt_buttons INDEX 14.

DELETE rt_buttons INDEX 15.

DELETE rt_buttons INDEX 16.

DELETE rt_buttons INDEX 17.

DELETE rt_buttons INDEX 18.

ENDMETHOD.

In the View: BSPWDVC_CMP_EXT I have the correct entries.

BSPWD_BASICS ZENHWEBUI_VN B Aplicación BSP ZENHWEBUI_VN ZRepVta.xml

BSPWD_BASICS WorkAreaHostViewSet ZENHWEBUI_VN WorkAreaHostViewSet

And in View: BSPWDV_EHSET_ASG my Enhancement Set is assigned to the Client.

For some reason the Enhancement for this component is not being called. Someone tried to Enhance this component?

I have deleted the rows for this internal table manually without the Enhancement in this method and the buttons disappear...

Edited by: urjose on Oct 15, 2008 1:58 PM

Former Member
0 Kudos

Redefined method should be called runtime if the enhancement set is properly assigned to the client.

Where are you clearing the entries runtime?

Thanks,

Thirumala.