员工,用户名,岗位,职责,职责应用产品(转)

SELECT fu.user_id,
       fu.user_name ebs用户名,
       ppf.last_name 姓名,
       hou.NAME 部门,
       hr_general.decode_position_latest_name(paaf.position_id) 岗位,
       ppf.employee_number 员工号,
       nvl(ppf.email_address, fu.email_address) email,
       furg.responsibility_id,
       frv.responsibility_name 职责,
       fa.application_short_name,
       fat.application_name
FROM fnd_user                    fu,
       per_people_f                ppf,
       per_all_assignments_f       paaf,
       fnd_user_resp_groups_direct furg,
       fnd_responsibility_vl       frv,
       fnd_application_tl          fat,
       fnd_application             fa,
       hr_organization_units       hou
WHERE fu.employee_id = ppf.person_id
      -- 员工有效期
   AND ppf.effective_start_date <= SYSDATE
   AND (ppf.effective_end_date IS NULL OR ppf.effective_end_date >= SYSDATE)
   AND ppf.person_id = paaf.person_id
      -- 岗位有效期
   AND (paaf.effective_end_date IS NULL OR
       paaf.effective_end_date >= SYSDATE)
      -- EBS用户有效期
   AND fu.start_date <= SYSDATE
   AND (fu.end_date IS NULL OR fu.end_date >= SYSDATE)
   AND fu.user_id = furg.user_id
      -- 职责有效期
   AND furg.start_date <= SYSDATE
   AND (furg.end_date IS NULL OR furg.end_date >= SYSDATE)
   AND furg.responsibility_id = frv.responsibility_id
      -- 职责应用产品
   AND frv.application_id = fat.application_id
   AND frv.application_id = fa.application_id
      -- Language
   AND fat.LANGUAGE = 'ZHS'
      -- Do not include sysadmin
   AND ppf.last_name != 'SYSADMIN'
   AND paaf.organization_id = hou.organization_id
   AND frv.responsibility_name LIKE ‘%HOM%';

-- 请求组,并发程序,职责
SELECT frg.request_group_name,
       fcp.concurrent_program_name,
       fcp.user_concurrent_program_name,
       frt.responsibility_name
FROM fnd_request_groups         frg,
       fnd_request_group_units    frgu,
       fnd_concurrent_programs_vl fcp,
       fnd_responsibility_tl      frt,
       fnd_responsibility         fr
WHERE frg.application_id = frgu.application_id
   AND frg.request_group_id = frgu.request_group_id
   AND frgu.unit_application_id = fcp.application_id
   AND frgu.request_unit_id = fcp.concurrent_program_id
   AND fr.responsibility_id = frt.responsibility_id
   AND fr.application_id = frt.application_id
   AND frg.application_id = fr.group_application_id
   AND frg.request_group_id = fr.request_group_id
   AND frt.LANGUAGE = 'ZHS'
   --AND frt.responsibility_name LIKE ’%INV%'
   AND fcp.user_concurrent_program_name = '成本管理器';

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值