Skip to Content
Former Member
Jun 16, 2011 at 11:57 AM

How to get PERNR from employee search(teamviewer) iView in to a WD-4-ABAP.


Hello All,

I had developed a new Web Dynpro for ABAP (WD4A) component for updating a custom Infotype. This application is meant for the manager to maintain some specific data through portal for his employees in the team.

WD4A application is built based on the employee number it receives from the portal.

 How could I get PERNR from employee search(teamviewer) iView in to my WD4A component?

In portal I had developed a test page by copying the standard page from MSS, and added my WD4A application through an iView into this page.

Then I hided all the other iVews in the page except (1) employee search and (2)my WD4A iVew. On the preview everything appears fine.

During the preview of this page it triggers the WDDOINIT of WD4A component main view and then the WDDOMODIFYVIEW. When I select an employee from the employee search, then it triggers only WDDOMODIFYVIEW in the WD4A application and not the WDDOINIT anymore.

In my WDDOMODIFYVIEW I had inserted the following code:

DATA lo_api_component TYPE REF TO if_wd_component.

DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_portal_manager = lo_api_component->get_portal_manager( ).

DATA lo_api_controller TYPE REF TO if_wd_view_controller.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_portal_manager->subscribe_event


portal_event_namespace = ''

portal_event_name = 'selection_changed'

view = lo_api_controller


And in the action: 'GET_SELECTED_PERNR'

METHOD onactionget_selected_pernr .

DATA lv_str_pernr TYPE string.

DATA lv_strlen TYPE i.

DATA lv_pernr TYPE pernr_d.

DATA lv_offset TYPE i.





value = lv_str_pernr ).

lv_strlen = STRLEN( lv_str_pernr ).

lv_offset = lv_strlen - 8.

lv_pernr = lv_str_pernr+lv_offset(8).


This is not functioning form me. The action is not getting trigged with the code in WDDOMODIFYVIEW.

I had gone through several threads in u2018SDN say:

Pass pernr to WebDynro

MSS - General Information - Related Activities Links persnr.

 SAP Note: 1112733.

Most of the threads are answered but incomplete. In some threads people shared document personally which had been helpful.

I am stuck with this scenario of handling the employee number from employee search iView. Helpful suggestions will be rewarded for sure.

Thanks in advance.