Class:
– CL_HCMFAB_EMPLOYEE_API
Methods:
– GET_USERID_FROM_EMPLOYEENUMBER
– GET_EMPLOYEENUMBER_FROM_USER
How to use the class:
TRY.
DATA(lv_pernr) = cl_hcmfab_employee_api=>get_instance( )->get_employeenumber_from_user( sy-uname ).
CATCH cx_hcmfab_common.
ENDTRY.
TRY.
DATA(lv_uname) = cl_hcmfab_employee_api=>get_instance( )->get_userid_from_employeenumber( lv_pernr ).
CATCH cx_hcmfab_common.
ENDTRY.