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;