Skip to Content
0
Former Member
Jul 18, 2013 at 12:15 PM

How to Call Appointment POPUP in Items Assignement Block by click on Button

110 Views

Hi Floks

I Have A requriement can you please share your ideas to implement.

I am new To SAP CRM WEBUI.

i need to show popup window by clicking on button in service order items assignment block.

we have already one APPOINTMENT Button in Items details page,its standared by SAP.

when we click on appointment button its showing popup window but as per my requirement

i need to create one button at items assignment block,when i click on that button i need to open appointment popup which is already at items details page.

for this reason what i need to do?

in component BT116IT_SRVO And GenericItem View at context node BTADMINI(TV)Under Context node implementaion class i redife the method GET_OCA_T_TABLE.

I Write the code to get button at item assignment block.

data: ls_one_click_action type crmt_thtmlb_one_click_action.

CLEAR ls_one_click_action.
ls_one_click_action-id = 'APPOINTMENT'.
ls_one_click_action-icon = 'appointment.gif'.
ls_one_click_action-text = ''.
ls_one_click_action-tooltip = text-002.
ls_one_click_action-active = 'X'.
append ls_one_click_action to rt_actions.

i need to create Event handler for this Appointment,i created this but how can i call popup window which is standared at items details page?

i seem this appoinment button created under this component BT140I_SRVP And view BT140I_SRVP/OVViewSet

but when i check with this component how they are calling popup window ,in event handler of this component i have below code part

DATA: lv_title TYPE string.
DATA: lr_node TYPE REF TO cl_btapptof_bspwdcomponen_cn00,
lr_coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
lv_data_collection TYPE REF TO IF_BOL_BO_COL,
lr_wrapper TYPE REF TO CL_BSP_WD_COLLECTION_WRAPPER.
CONSTANTS: lc_cnode_name TYPE seocmpname VALUE 'BTADMINI'.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT_SALES_ORDER/SORDER_APPNTMNTOFFER' ).
IF appntmnt_popup IS NOT BOUND.
appntmnt_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'BTAPPTOFFER/MainWindow'
iv_usage_name = 'BTApptOfferPopUp'
iv_title = lv_title
). "#EC NOTEXT
ENDIF.
appntmnt_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
CREATE OBJECT lv_data_collection
TYPE
cl_crm_bol_bo_col.
lr_coll_wrapper = typed_context->btadmini->get_collection_wrapper( ).
lv_data_collection ?= lr_coll_wrapper->get_marked( ).
lr_node ?= appntmnt_popup->get_context_node( iv_cnode_name = lc_cnode_name ).
lr_coll_wrapper = lr_node->get_collection_wrapper( ).
lr_coll_wrapper->set_collection( lv_data_collection ).
appntmnt_popup->set_title( lv_title ).
appntmnt_popup->open( ).

But when i try to do same code part in the event hadler of the component BT116IT_SRVO its not working

may i want to create Component Usage or Component Interface for component BT116IT_SRVO ?

can anyone please let me know the process how to get popup window when i click on button at items assignment block(this popup already in place at items details page)same popup i need to show when i click at items assigment block

Helpfull answers will be reward

Thanks

Raj