There are two use cases of HRASR00_PERSONNEL_FILE:
- external launch
- internal launch
PERNR_MEM_ID is used only with external launch.
For example i wrote a simple program with external launch by entering pernr number.
DATA: w_url TYPE string,
w_value TYPE string.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_pernr TYPE wd_this->Element_context-pernr.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
lv_pernr = '1000800'.
* Get the URL of the called application
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'asr_personnel_file'
IMPORTING
out_absolute_url = w_url.
*Export to Memory
CALL METHOD CL_HRESS_EMPLOYEE_SERVICES=>SET_PERNR_TO_MEMORY
EXPORTING
iv_pernr = lv_pernr
* IV_DISP_CE_ASSIGTS_SCREEN =
* IV_NON_EIC_MODE =
RECEIVING
RV_MEM_ID = w_value
.
*Attach the parameters and its value with the URL that
* have to be passed to the 2nd application
CALL METHOD cl_http_server=>append_field_url
EXPORTING
name = 'PERNR_MEM_ID'
value = w_value
CHANGING
url = w_url.
* generate a popup window for the 2nd application with the above URL
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_external_window(
url = w_url ).
lo_window->open( ).
And it is working!