Oracle EBS 用户职责人员取值
SELECT fu.user_name 用户名, fu.description 用户说明, fu.start_date 用户启用日期, fu.end_date 用户终止日期 --,fu.employee_id , ppv.full_name 员工 --,fud.RESPONSIBILITY_ID , frt.responsibility_name 职责 --,fud.RESPONSIBILITY_APPLICATION_ID , fat.application_name 应用名称 --,fud.security_group_id , fud.start_date 职责启用日期, fud.end_date 职责终止日期, paf.effective_start_date 分配启用日期, paf.effective_end_date 分配终止日期, pou.NAME 人员组织, pp.NAME 职位, pj.NAME 职务 FROM fnd_user fu, fnd_user_resp_groups_direct fud, fnd_responsibility_tl frt, fnd_application_tl fat, per_people_v7 ppv, per_assignments_f paf, per_positions pp, per_jobs pj, per_organization_units pou WHERE fu.user_id = fud.user_id AND frt.LANGUAGE = 'ZHS' AND fud.responsibility_id = frt.responsibility_id AND fat.LANGUAGE = 'ZHS' AND fud.responsibility_application_id = fat.application_id AND fu.employee_id = ppv.person_id(+) AND fud.end_date IS NULL AND ppv.person_id = paf.person_id(+) AND paf.position_id = pp.position_id(+) AND paf.job_id = pj.job_id(+) AND paf.organization_id = pou.organization_id ORDER BY fu.user_name, frt.responsibility_name
SELECT fffv.function_name, frv.responsibility_name, fffv.user_function_name, fffv.PARAMETERS, fffv.TYPE FROM fnd_user_resp_groups_direct furgd, --用户可用职责 fnd_user fu, --用户 fnd_responsibility_vl frv, --职责试图,可得到职责对应菜单 fnd_compiled_menu_functions fcmf, --菜单功能 fnd_form_functions_vl fffv, --form与功能对应表 fnd_form ff --FORM表 WHERE furgd.user_id = fu.user_id AND furgd.responsibility_id = frv.responsibility_id AND (furgd.end_date IS NULL OR furgd.end_date > SYSDATE) AND frv.menu_id = fcmf.menu_id AND (frv.end_date IS NULL OR frv.end_date > SYSDATE) AND fcmf.grant_flag = 'Y' AND fffv.function_id = fcmf.function_id AND fffv.form_id = ff.form_id AND fu.user_name = '&user_name' AND ff.form_name = '&form_name' AND NOT EXISTS (SELECT 1 FROM fnd_resp_functions frf WHERE frf.responsibility_id = frv.responsibility_id AND frf.action_id = fcmf.function_id AND frf.rule_type = 'F') AND NOT EXISTS (SELECT 1 FROM fnd_compiled_menu_functions fcmf2, fnd_resp_functions frf WHERE fcmf2.menu_id = frf.action_id AND frf.rule_type = 'M' AND frf.responsibility_id = frv.responsibility_id AND fcmf2.function_id = fcmf.function_id)
土豆君