create or replace FUNCTION REC_APP_ROLE_NAME(
    P_EMPLOYEE_ID HRIS_EMPLOYEES.EMPLOYEE_ID%TYPE,
    P_RECOMMENDER_ID HRIS_RECOMMENDER_APPROVER.RECOMMEND_BY%TYPE,
    P_APPROVER_ID HRIS_RECOMMENDER_APPROVER.APPROVED_BY%TYPE )
  RETURN VARCHAR2
IS
  V_ROLE_TYPE VARCHAR2(50 BYTE);
BEGIN
  IF(P_EMPLOYEE_ID = P_RECOMMENDER_ID AND P_EMPLOYEE_ID = P_APPROVER_ID)THEN
    V_ROLE_TYPE   :='Recommender/Approver';
  ELSE
    IF(P_EMPLOYEE_ID = P_RECOMMENDER_ID) THEN
      V_ROLE_TYPE   :='Recommender';
    END IF;
    IF(P_EMPLOYEE_ID= P_APPROVER_ID) THEN
      V_ROLE_TYPE  :='Approver';
    END IF;
  END IF;
RETURN V_ROLE_TYPE;
END;