Thursday, 10 November 2016

SQL to get user supervisor details with user authorized limit query

/* Formatted on 11/10/2016 11:14:48 AM (QP5 v5.114.809.3010) */
SELECT   FU.USER_NAME,
         PER_PEOPLE.FULL_NAME,
         PER_ASSIGN.SUPERVISOR_ID,
         GL_AUTH_LIMIT1.AUTHORIZATION_LIMIT,
         GL_AUTH_LIMIT2.AUTHORIZATION_LIMIT
  FROM   FND_USER FU,
         PER_ALL_PEOPLE_F PER_PEOPLE,
         PER_ASSIGNMENTS_V PER_ASSIGN,
         GL_AUTHORIZATION_LIMITS_V GL_AUTH_LIMIT1,
         GL_AUTHORIZATION_LIMITS_V GL_AUTH_LIMIT2
 WHERE       1 = 1
         AND FU.EMPLOYEE_ID = PER_PEOPLE.PERSON_ID
         AND PER_PEOPLE.PERSON_ID = PER_ASSIGN.PERSON_ID(+)
         AND FU.EMPLOYEE_ID = GL_AUTH_LIMIT1.EMPLOYEE_ID(+)
         AND PER_ASSIGN.SUPERVISOR_ID = GL_AUTH_LIMIT2.EMPLOYEE_ID(+)
--AND FU.USER_NAME IN (<PROVIDE_USER_NAME>)

No comments:

Post a Comment