Quantcast
Channel: SCN : Document List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 252

Creating action menu on a field - CRM WebUI.

$
0
0

Hi All,

 

This document explains how to implement an action menu on a field in WebUI, this feature has been provided since EHP1 but no clear documentation is available on the Web for this .We shall take a scenario where we will add a menu on the field EMAIL on Business partner screen in web-UI.

 

SCN_1.png

 

1. Create a class ZL_ACTION_MENU in SE24 with super class "CL_BSP_WD_ACTION_PROVIDER" .

 

2. Redefine the method IF_BSP_WD_ACTION_DESCR_EXT~BUILD_ACTIONS of class ZL_ACTION_MENU with the code below :

 

METHOD if_bsp_wd_action_descr_ext~build_actions.

* Hasan : Testing for action menu - Testing

 

   DATA : ls_acts TYPE wcfs_thtmlb_action_menu_item.

 

   CASE iv_attribute_path.

     WHEN 'SMARTFORM.'.

       ls_acts-id = 'QC1'.

       ls_acts-text = 'New Email Form'.

       ls_acts-onselect = 'quick_create'.

       ls_acts-icon_src = '/sap/bc/bsp/sap/thtmlb_styles/sap_skins/default/images/email.gif'.

       APPEND ls_acts TO et_actions.

       CLEAR ls_acts.

     WHEN OTHERS.

       ls_acts-id = 'ACT1'.

       ls_acts-text = 'Send mail'.

       ls_acts-onselect = 'email'.

       ls_acts-icon_src = '/sap/bc/bsp/sap/thtmlb_styles/sap_skins/default/images/email.gif'.

       APPEND ls_acts TO et_actions.

       CLEAR ls_acts.

       ls_acts-id = 'ACT2'.

       ls_acts-text = 'Check existence'.

       ls_acts-onselect = 'VERIFY'.

       APPEND ls_acts TO et_actions.

   ENDCASE.

 

ENDMETHOD.

 


3. Then enhance the component BP_ADDR , view : StandardAddress ; node : STANDARDADDRESS .

 

4. Here create the method GET_AC for the field STRUCT.E_MAILSMT, with the code :

 

method GET_AC_E_MAILSMT.

* Hasan : Testing for action menu.

 

data : lr_action type REF TO zl_action_menu.

create OBJECT lr_Action.

 

rv_action_descriptor ?= lr_action.

endmethod.

 

This will enable the action menu on the attribute.


Viewing all articles
Browse latest Browse all 252

Trending Articles