Oracle EBS 使用者職責人員取值
阿新 • • 發佈:2018-11-23
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 pouWHERE 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)