Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

portal event not working

Hi,

I am try to handle portal event in my WD ABAP i view. The event is fired by WD Java team viewer iView in MSS. What I want is when someone select an employee from team viewer iview from MSS, my WD ABAP iview should react accordingly.

I check SAP note 1112733 for corresponding solution to handle event but it didnt worked. My WD ABAP application is not able to subscribe to the event.

I wrote the following code in WDINIT method of my view

DATA: l_api_component TYPE REF TO if_wd_component,

l_portal_manager TYPE REF TO if_wd_portal_integration,

view TYPE REF TO if_wd_view_controller.

l_api_component = wd_comp_controller->wd_get_api( ).

l_portal_manager = l_api_component->get_portal_manager( ).

view ?= wd_this->wd_get_api( ).

l_portal_manager->subscribe_event(

portal_event_namespace = 'urn:com.sap.mss.employeesearch'

portal_event_name = 'selection_changed'

view = view

action = 'RECIEVE_EMP_DATA' ).

and the code written in event handler method is:

METHOD onactionrecieve_emp_data .

DATA: evt_name TYPE string.

DATA lo_nd_gc_event_data TYPE REF TO if_wd_context_node.

DATA lo_el_gc_event_data TYPE REF TO if_wd_context_element.

DATA ls_gc_event_data TYPE wd_this->element_gc_event_data.

DATA lv_event_string LIKE ls_gc_event_data-event_string.

  • navigate from <CONTEXT> to <GC_EVENT_DATA> via lead selection

lo_nd_gc_event_data = wd_context->get_child_node( name = wd_this->wdctx_gc_event_data ).

  • get element via lead selection

lo_el_gc_event_data = lo_nd_gc_event_data->get_element( ).

  • get single attribute

lo_el_gc_event_data->set_attribute(

EXPORTING

name = 'EVENT_STRING'

value = 'before handle' ).

evt_name = wdevent->get_string( name = 'PORTAL_EVENT_NAME' ).

IF evt_name = 'selection_changed'.

lv_event_string = wdevent->get_string( name = 'PORTAL_EVENT_PARAMETER' ).

  • get single attribute

lo_el_gc_event_data->set_attribute(

EXPORTING

name = `EVENT_STRING`

value = 'handled' ).

ENDIF.

ENDMETHOD.

In debugging mode, I am not able to go inside my event handler method.

Please help why this event is not getting handled .

Thanks

Vishal Kapoor

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question