Monday, November 21, 2011

User Responsibility

User Responsibility Query :


SELECT FU.USER_ID,
  FU.USER_NAME,
  FU.DESCRIPTION,
  FU.START_DATE "USER_START_DATE",
  FURG.START_DATE "RESP_ASSIGN_DATE",
  FRV.START_DATE "RESP_START_DATE",
  FRV.RESPONSIBILITY_ID,
  FRV.RESPONSIBILITY_NAME,
  FA.APPLICATION_ID,
  FA.APPLICATION_NAME FU.LAST_UPDATE_DATE,
  FU.LAST_UPDATED_BY,
  FU.LAST_LOGON_DATE,
FROM apps.FND_USER FU,
  apps.FND_USER_RESP_GROUPS_DIRECT FURG,
  apps.FND_RESPONSIBILITY_VL FRV,
  apps.FND_APPLICATION_VL FA
WHERE FU.USER_ID                       = FURG.USER_ID
AND FURG.RESPONSIBILITY_ID             = FRV.RESPONSIBILITY_ID
AND FURG.RESPONSIBILITY_APPLICATION_ID = FA.APPLICATION_ID
--AND FU.USER_NAME  = '&&'
AND FRV.RESPONSIBILITY_NAME LIKE '%&&%'
AND (FU.END_DATE   IS NULL
OR FU.END_DATE     >=SYSDATE)
AND (FURG.END_DATE IS NULL
OR FURG.END_DATE   >=SYSDATE)
AND (FRV.END_DATE  IS NULL
OR FRV.END_DATE    >=SYSDATE) ;

No comments:

Post a Comment