REFUND_HDR_VW3

(SQL View)
Index Back

Refund approval view

Select refund_hdr rows of data that require a refund approval

SELECT A.BUSINESS_UNIT , A.REFUND_NBR , A.REFUND_EMPLID , B.NAME , A.REFUND_AMT , A.REF_APPR_OPR_1 , A.REF_APPR_OPR_2 , A.REF_APPR_OPR_3 , A.REF_APPR_SW_1 , A.REF_APPR_SW_2 , A.REF_APPR_SW_3 , A.REFUND_METHODE FROM PS_REFUND_HDR A , PS_SCC_PRI_NAME_VW B WHERE A.REFUND_EMPLID > ' ' AND A.REFUND_EMPLID = B.EMPLID AND ((A.REF_APPR_ACTIVE_SW = 'Y' AND A.REF_APPR_SW_1 IN ( 'A' , 'N') AND A.REF_APPR_SW_2 IN ('A' , 'N') AND A.REF_APPR_SW_3 IN ('A' , 'N') AND A.REFUND_STATUS = 'P') OR (A.REF_APPR_ACTIVE_SW = 'N' AND A.REFUND_STATUS = 'P')) AND A.REFUND_NBR IN ( SELECT REFUND_NBR FROM PS_REFUND_DTL D WHERE A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.EMPLID = D.EMPLID AND D.REFUND_FORMAT IN ('A', 'D', 'P'))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 REFUND_NBR Number(12,0) DECIMAL(12) NOT NULL Refund Nbr
3 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
4 NAME Character(50) VARCHAR2(50) NOT NULL Name
5 REFUND_AMT Signed Number(18,2) DECIMAL(16,2) NOT NULL Refund Amount
6 REF_APPR_OPR_1 Character(30) VARCHAR2(30) NOT NULL Approval OPRID 1
7 REF_APPR_OPR_2 Character(30) VARCHAR2(30) NOT NULL Approval OPRID 2
8 REF_APPR_OPR_3 Character(30) VARCHAR2(30) NOT NULL Approval OPRID 3
9 REF_APPR_SW_1 Character(1) VARCHAR2(1) NOT NULL Approval Switch 1
A=Refund Approved
D=Refund Denied
N=No Approval Required
P=Pending Approval
10 REF_APPR_SW_2 Character(1) VARCHAR2(1) NOT NULL Approval Switch 2
A=Refund Approved
D=Refund Denied
N=No Approval Required
P=Pending Approval
11 REF_APPR_SW_3 Character(1) VARCHAR2(1) NOT NULL Approval Switch 3
A=Approved
D=Refund Denied
N=No Approval Required
P=Pending Approval
12 REFUND_METHODE Character(1) VARCHAR2(1) NOT NULL Refund Method
A=Accounts Payable
O=Other
P=Payroll