You need to pass user to the ls_user parameter.
* Get the Work Status
cl_ujw_work_status_mgr=>factory(
EXPORTING
is_user = ls_user
i_appset = i_appset
if_bypass_sec_check = abap_true
RECEIVING r_manager = lr_work_status_mgr ).
TRY.
lr_work_status_mgr->get_work_status_table(
IMPORTING et_ujw_statcode_table = lt_workstates ).
CATCH cx_ujw_work_status_error.
ENDTRY.
Thank you,