--- EBS query online users
Select u. USER_NAME,
APP. APPLICATION_SHORT_NAME,
FAT. APPLICATION_NAME,
FR. RESPONSIBILITY_KEY,
FRT. RESPONSIBILITY_NAME,
FFF. FUNCTION_NAME,
FFT. USER_FUNCTION_NAME,
ICX. FUNCTION_TYPE,
ICX. FIRST_CONNECT,
ICX. LAST_CONNECT
FROM ICX_SESSIONS ICX,
FND_USER U,
FND_APPLICATION APP,
FND_APPLICATION_TL FAT,
FND_RESPONSIBILITY FR,
FND_RESPONSIBILITY_TL FRT,
FND_FORM_FUNCTIONS FFF,
FND_FORM_FUNCTIONS_TL FFT
WHERE 1 = 1
And u. USER_ID = ICX. USER_ID
And icx. RESPONSIBILITY_APPLICATION_ID = APP. APPLICATION_ID
And fat. APPLICATION_ID = ICX. RESPONSIBILITY_APPLICATION_ID
And fat. LANGUAGE = 'zhs'
And fr. APPLICATION_ID = ICX. RESPONSIBILITY_APPLICATION_ID
And fr. RESPONSIBILITY_ID = ICX. RESPONSIBILITY_ID
And frt. LANGUAGE = 'zhs'
And frt. APPLICATION_ID = ICX. RESPONSIBILITY_APPLICATION_ID
And frt. RESPONSIBILITY_ID = ICX. RESPONSIBILITY_ID
And fff. FUNCTION_ID = ICX. FUNCTION_ID
And fft. FUNCTION_ID = ICX. FUNCTION_ID
And icx. DISABLED_FLAG! = 'Y'
And icx. pseudo _ flag = 'n'
AND (ICX. LAST_CONNECT +
DECODE (FND_PROFILE.VALUE ('icx _ SESSION_TIMEOUT '),
NULL,
ICX. LIMIT_TIME,
0,
ICX. LIMIT_TIME,
FND_PROFILE.VALUE ('icx _ SESSION_TIMEOUT ')/60)/24)>
SYSDATE
And icx. COUNTER <ICX. LIMIT_CONNECTS;