SPF_INV_APPR_VW

(SQL View)
Index Back

Invoice approval adhoc users

Invoice approval adhoc users view

SELECT DISTINCT B.OPRID ,A.EMPLID , R.ROLEUSER , B.EMAILID ,D.DEPTID , C.ROLEUSER_ALT , C.EFFDT_FROM , C.EFFDT_TO , C.ROLEUSER_SUPR FROM PSROLEUSER R , PS_PERSONAL_DATA A , PSOPRDEFN B , PSROLEXLATOPRVW C , PS_JOB D WHERE R.ROLENAME IN ( SELECT C1.ROLENAME FROM PS_PV_ROLE_ACTION C1 WHERE C1.PV_ACTION = 'SP_INVOICE_APPROVER') AND R.ROLEUSER = B.OPRID AND B.ACCTLOCK = 0 AND A.EMPLID = B.EMPLID AND B.OPRID = C.OPRID AND B.EMPLID = D.EMPLID AND D.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_JOB D1 WHERE D1.EMPLID = D.EMPLID AND D1.EFFDT <= %CurrentDateIn) AND D.EFFSEQ = ( SELECT MAX(D2.EFFSEQ) FROM PS_JOB D2 WHERE D2.EMPLID = D.EMPLID AND D2.EFFDT = D.EFFDT) AND D.EMPL_STATUS = 'A' UNION SELECT DISTINCT B1.OPRID , ' ' , R1.ROLEUSER , B1.EMAILID , ' ' , C2.ROLEUSER_ALT , C2.EFFDT_FROM , C2.EFFDT_TO , C2.ROLEUSER_SUPR FROM PSROLEUSER R1 , PSOPRDEFN B1 , PSROLEXLATOPRVW C2 WHERE R1.ROLENAME IN ( SELECT C3.ROLENAME FROM PS_PV_ROLE_ACTION C3 WHERE C3.PV_ACTION = 'SP_SPLR_INV_APPROVER' AND C3.PV_ACTION != 'SP_INVOICE_APPROVER') AND R1.ROLEUSER = B1.OPRID AND B1.ACCTLOCK = 0 AND B1.OPRID = C2.OPRID

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
3 ROLEUSER Character(30) VARCHAR2(30) NOT NULL Role User
4 EMAILID Character(70) VARCHAR2(70) NOT NULL A user's E-mail address
5 DEPTID Character(10) VARCHAR2(10) NOT NULL Department
6 ROLEUSER_ALT Character(30) VARCHAR2(30) NOT NULL Alternate Role User
7 EFFDT_FROM Date(10) DATE Effective Date From
8 EFFDT_TO Date(10) DATE Effective Date To
9 ROLEUSER_SUPR Character(30) VARCHAR2(30) NOT NULL Supervisor Role User