cancel
Showing results for 
Search instead for 
Did you mean: 

MSS Add On Personal Profile equivalent showing my data not the employees

clwalker
Participant
0 Kudos

Hi

I have created a copy of the personal profile applicaton, called "work profile" (which has work related information, contract, pay, Appraisals etc) and added this in both to ESS and MSS.  In ESS this works fine.  In MSS I have located this within the Launchpad MSS Instance Employee_Menu so it is alongside the personal profile in the "profile applications on behalf of" folder. It appears fine, however is showing the Manager's details rather than the employee in question's detail.

I guess that it is not passing the correct parament, but not sure where this should be done or what it should be.  I have added PERNR_MEM_ID as the application parameter in the launchpad configuration (like the personal profile has), but this does not seem to have done the job.

What am I missing?

Regards

Claire

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When this application gets called from MSS, memory id of employee whose profile needs to be displayed is to be passed in 'PERNR_MEM_ID'.

Please check if it is getting passed or not.

clwalker
Participant
0 Kudos

Hi

I had already entered "pernr_mem_id" as the parameter to be passed.  I managed to resolve this issue by using a system alias - I used the same alias as for the personal profile application of which my application was a copy.

Answers (1)

Answers (1)

Joseph_BERTHE
Active Contributor

Hello,

I had the same requirement, and I found a solution.

here is the solution :

Classe : CL_HRESS_EMPLOYEE_SERVICES

Method : GET_INSTANCE

Create an ENHANCEMENT at the begin of the method and copy and past the below code :

DATA: lo_fpm_1 TYPE REF TO if_fpm,
         lv_mem_id_1 TYPE text10,
         lv_pernr_1 TYPE pernr_d.

   IF go_instance IS INITIAL.
* Create the instance if the instance is initial
     lv_pernr_1 = iv_pernr.
     lo_fpm_1 = cl_fpm_factory=>get_instance( ).
     IF lo_fpm_1 IS BOUND.
       lo_fpm_1->mo_app_parameter->get_value( EXPORTING iv_key = 'PERNR_MEM_ID' IMPORTING ev_value = lv_mem_id_1 ).

       " Part Added ***************************************************
       IF lv_mem_id_1 is INITIAL.
         lo_fpm_1->mo_app_parameter->get_value( EXPORTING iv_key = 'MEM_ID'  IMPORTING ev_value = lv_mem_id_1 ).
       ENDIF.
       " End part *********************************************************


       IF lv_mem_id_1 IS NOT INITIAL.
         get_pernr_from_memory( EXPORTING iv_mem_id = lv_mem_id_1 IMPORTING ev_pernr = lv_pernr_1 ).
         IF lv_pernr_1 IS INITIAL.
           lv_pernr_1 = iv_pernr.
         ENDIF.
       ENDIF.
     ENDIF.
     CREATE OBJECT go_instance
       EXPORTING
         iv_pernr         = lv_pernr_1
         is_tracking_data = is_tracking_data.
   ENDIF.

   ro_instance = go_instance.

* in some scenarios instance has been already created but need to override
* PERNR with another value by calling get instance method
   IF NOT iv_pernr IS INITIAL.
     ro_instance->mv_pernr = iv_pernr.
   ENDIF.

   IF NOT iv_assignment_text IS INITIAL.
     ro_instance->mv_assignment_text = iv_assignment_text.
   ENDIF.

exit.

The important section is between the comment : Part Added. The rest of the code is the standard.

At the end I do en exit to bypass the standard.

Regards,