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 ')/$) >
Sysdate
and ICX. COUNTER < ICX. limit_connects;