GP_KB_ER_DED_VW

(SQL View)
Index Back

ERN& DED Variance View

ERN& DED Reporting Record View for Variance

SELECT DISTINCT A.EMPLID , A.EMPL_RCD , A.CAL_RUN_ID , B.CAL_RUN_ID , A.ORIG_CAL_RUN_ID , A.CAL_ID , B.CAL_ID , A.PRC_ORD_TS , B.PRC_ORD_TS , A.GP_PAYGROUP , A.PIN_NUM , A.RSLT_SEG_NUM , (A.EMPLID %Concat %Cast(A.EMPL_RCD,Number,Character)) , A.PIN_TYPE , A.CALC_RSLT_VAL , A.BASE_RSLT_VAL , A.UNIT_RSLT_VAL , A.RATE_RSLT_VAL , A.PCT_RSLT_VAL , A.CALC_RSLT_SUM , A.UNIT_RSLT_SUM , A.CALC_RSLT_VAL , A.GP_CALC_VAL1 , B.GP_CALC_VAL1 , (CASE WHEN (B.GP_CALC_VAL1) <> 0 THEN %Round(((A.GP_CALC_VAL1) - (B.GP_CALC_VAL1)),6) ELSE %Round((A.GP_CALC_VAL1),6) END) ,(CASE WHEN (B.GP_CALC_VAL1) <> 0 THEN %Round((((A.GP_CALC_VAL1) - (B.GP_CALC_VAL1))/(%ABS(B.GP_CALC_VAL1)))*100 ,2) ELSE %Round((A.GP_CALC_VAL1),2) END) ,A.UNIT_RSLT_VAL , (A.GP_CALC_VAL2) ,( B.GP_CALC_VAL2 ) ,(CASE WHEN (B.GP_CALC_VAL2) <> 0 THEN %Round(((A.GP_CALC_VAL2) - (B.GP_CALC_VAL2)),6) ELSE %Round((A.GP_CALC_VAL2),6) END) ,(CASE WHEN (B.GP_CALC_VAL2) <> 0 THEN %Round((((A.GP_CALC_VAL2) - (B.GP_CALC_VAL2))/(%ABS(B.GP_CALC_VAL2)))*100 ,2) ELSE %Round((A.GP_CALC_VAL2),2) END) , A.GP_SEG_COUNT , A.PRD_BGN_DT , A.PRD_END_DT , A.SEG_BGN_DT , A.SEG_END_DT , A.RUN_TYPE , A.BUSINESS_UNIT , A.PAY_ENTITY , A.COUNTRY , A.COMPANY , A.LOCATION , A.CONTRACT_TYPE , A.ESTABID , A.DEPTID , A.FTE , A.JOBCODE , A.SETID_JOBCODE , A.SETID_DEPT , A.SETID_LOCATION , A.GP_INCLUDE_RETRO , A.GP_MULT_INS_EXIST , A.FIRST_NAME , A.LAST_NAME , A.FULL_PART_TIME , A.SUPERVISOR_ID , A.EMPL_STATUS , A.GP_PA_HIRE_DT , A.TERMINATION_DT , A.CONTRACT_NUM , A.STRM_NUM , A.GROUP_LIST_ID , A.PYE_CALC_STAT , A.PRC_ORD_TS , A.GP_SEG_EXISTS , A.GP_RPT_RETRO ,(CASE WHEN B.CAL_RUN_ID IS NULL THEN 'Y' ELSE 'N' END) , A.CURRENCY_CD , A.PYMT_DT , A.SETID_EMPL_CLASS , A.EMPL_CLASS , A.GP_CALC_VAL1 , A.GP_CALC_VAL2 FROM PS_GP_PA_ERN_DED A , PS_GP_PA_ERN_DED B WHERE A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND A.GP_PAYGROUP = B.GP_PAYGROUP AND A.PIN_NUM = B.PIN_NUM AND A.RSLT_SEG_NUM = B.RSLT_SEG_NUM AND A.PIN_TYPE = B.PIN_TYPE AND A.RUN_TYPE = B.RUN_TYPE AND A.PYMT_DT > B.PYMT_DT AND B.PYMT_DT = ( SELECT MAX(C.PYMT_DT) FROM PS_GP_PA_ERN_DED C WHERE C.EMPLID = B.EMPLID AND C.EMPL_RCD = B.EMPL_RCD AND C.GP_PAYGROUP = B.GP_PAYGROUP AND C.RUN_TYPE = B.RUN_TYPE AND C.PYMT_DT < A.PYMT_DT) UNION SELECT DISTINCT A.EMPLID , A.EMPL_RCD , A.CAL_RUN_ID , ' ' , A.ORIG_CAL_RUN_ID , A.CAL_ID , ' ' , A.PRC_ORD_TS ,%DateTimeNull , A.GP_PAYGROUP , A.PIN_NUM , A.RSLT_SEG_NUM , (A.EMPLID %Concat %Cast(A.EMPL_RCD,Number,Character)) , A.PIN_TYPE , A.CALC_RSLT_VAL , A.BASE_RSLT_VAL , A.UNIT_RSLT_VAL , A.RATE_RSLT_VAL , A.PCT_RSLT_VAL , A.CALC_RSLT_SUM , A.UNIT_RSLT_SUM , A.CALC_RSLT_VAL , A.GP_CALC_VAL1 , 0 , %Round((A.GP_CALC_VAL1),6) , %Round((A.GP_CALC_VAL1),2) , A.UNIT_RSLT_VAL , A.GP_CALC_VAL2 , 0 , %Round((A.GP_CALC_VAL2),6) , %Round((A.GP_CALC_VAL2),2) , A.GP_SEG_COUNT , A.PRD_BGN_DT , A.PRD_END_DT , A.SEG_BGN_DT , A.SEG_END_DT , A.RUN_TYPE , A.BUSINESS_UNIT , A.PAY_ENTITY , A.COUNTRY , A.COMPANY , A.LOCATION , A.CONTRACT_TYPE , A.ESTABID , A.DEPTID , A.FTE , A.JOBCODE , A.SETID_JOBCODE , A.SETID_DEPT , A.SETID_LOCATION , A.GP_INCLUDE_RETRO , A.GP_MULT_INS_EXIST , A.FIRST_NAME , A.LAST_NAME , A.FULL_PART_TIME , A.SUPERVISOR_ID , A.EMPL_STATUS , A.GP_PA_HIRE_DT , A.TERMINATION_DT , A.CONTRACT_NUM , A.STRM_NUM , A.GROUP_LIST_ID , A.PYE_CALC_STAT , A.PRC_ORD_TS , A.GP_SEG_EXISTS , A.GP_RPT_RETRO , 'Y' , A.CURRENCY_CD , A.PYMT_DT , A.SETID_EMPL_CLASS , A.EMPL_CLASS , A.GP_CALC_VAL1 , A.GP_CALC_VAL2 FROM PS_GP_PA_ERN_DED A WHERE NOT EXISTS ( SELECT 'X' FROM PS_GP_PA_ERN_DED B WHERE A.PIN_NUM = B.PIN_NUM AND A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND A.GP_PAYGROUP = B.GP_PAYGROUP AND A.RUN_TYPE = B.RUN_TYPE AND B.PYMT_DT = ( SELECT MAX(C.PYMT_DT) FROM PS_GP_PA_ERN_DED C WHERE C.EMPLID = A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND C.GP_PAYGROUP = A.GP_PAYGROUP AND C.RUN_TYPE = A.RUN_TYPE AND C.PYMT_DT < A.PYMT_DT))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
3 GP_CURR_CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
4 GP_PRVS_CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
5 ORIG_CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Original Calendar Group ID
6 GP_CURR_CAL_ID Character(18) VARCHAR2(18) NOT NULL calendar id
7 GP_PRVS_CAL_ID Character(18) VARCHAR2(18) NOT NULL calendar id
8 CURR_PRC_ORD_TS DateTime(26) TIMESTAMP Process Order Timestamp
9 PRVS_PRC_ORD_TS DateTime(26) TIMESTAMP Process Order Timestamp
10 GP_PAYGROUP Character(10) VARCHAR2(10) NOT NULL Global Payroll pay group
11 PIN_NUM Number(8,0) INTEGER NOT NULL PIN Number
12 RSLT_SEG_NUM Number(4,0) SMALLINT NOT NULL Result Segment Number
13 GP_EMPL_COUNT Character(14) VARCHAR2(14) NOT NULL Employee count per segment
14 PIN_TYPE Character(2) VARCHAR2(2) NOT NULL Element Type
15 CALC_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculation Numeric Result
16 BASE_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculated Base Value
17 UNIT_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Number of units used in result calculation
18 RATE_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Rate Result Value
19 PCT_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Percent Result Value
20 CALC_RSLT_SUM Signed Number(20,6) DECIMAL(18,6) NOT NULL Summary of calculations
21 UNIT_RSLT_SUM Signed Number(20,6) DECIMAL(18,6) NOT NULL Summary of units used in result calculation
22 SEG_CALC_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculation Numeric Result
23 CALC_CURR_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculation Numeric Result
24 CALC_PRVS_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculation Numeric Result
25 CALC_DIFF_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Calculation Numeric Result
26 CALC_PDIFF_RSL_VAL Signed Number(16,2) DECIMAL(14,2) NOT NULL Calculation Numeric Result
27 SEG_UNIT_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Number of units used in result calculation
28 UNIT_CURR_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Number of units used in result calculation
29 UNIT_PRVS_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Number of units used in result calculation
30 UNIT_DIFF_RSLT_VAL Signed Number(20,6) DECIMAL(18,6) NOT NULL Number of units used in result calculation
31 UNIT_PDIFF_RSL_VAL Signed Number(16,2) DECIMAL(14,2) NOT NULL Number of units used in result calculation
32 GP_SEG_COUNT Number(3,0) SMALLINT NOT NULL Used in payroll analytics
33 PRD_BGN_DT Date(10) DATE Period Begin Date
34 PRD_END_DT Date(10) DATE Pay Period End Date
35 SEG_BGN_DT Date(10) DATE Payee Process Segment's Begin Date
36 SEG_END_DT Date(10) DATE Payee Process Segment's End Date
37 RUN_TYPE Character(10) VARCHAR2(10) NOT NULL Run Type Name
38 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
39 PAY_ENTITY Character(10) VARCHAR2(10) NOT NULL Pay Entity
40 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country
41 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
42 LOCATION Character(10) VARCHAR2(10) NOT NULL Location Code
43 CONTRACT_TYPE Character(3) VARCHAR2(3) NOT NULL Contract Type
44 ESTABID Character(12) VARCHAR2(12) NOT NULL Establishment ID
45 DEPTID Character(10) VARCHAR2(10) NOT NULL Department
46 FTE Number(8,6) DECIMAL(7,6) NOT NULL This field represent Full Time Equivalence
47 JOBCODE Character(6) VARCHAR2(6) NOT NULL Job Code
48 SETID_JOBCODE Character(5) VARCHAR2(5) NOT NULL Job Code Set ID
49 SETID_DEPT Character(5) VARCHAR2(5) NOT NULL Department Set ID
50 SETID_LOCATION Character(5) VARCHAR2(5) NOT NULL Location Set ID
51 GP_INCLUDE_RETRO Character(2) VARCHAR2(2) NOT NULL used in payroll analytics
N=No
Y=Yes
52 GP_MULT_INS_EXIST Character(2) VARCHAR2(2) NOT NULL Used in Payroll Analytics
N=No
Y=Yes
53 FIRST_NAME Character(30) VARCHAR2(30) NOT NULL First Name
54 LAST_NAME Character(30) VARCHAR2(30) NOT NULL Last Name
55 FULL_PART_TIME Character(1) VARCHAR2(1) NOT NULL Full/Part Time
D=On Demand
F=Full-Time
P=Part-Time
56 SUPERVISOR_ID Character(11) VARCHAR2(11) NOT NULL Supervisor ID
57 EMPL_STATUS Character(1) VARCHAR2(1) NOT NULL Payroll Status
A=Active
D=Deceased
L=Leave of Absence
P=Leave With Pay
Q=Retired With Pay
R=Retired
S=Suspended
T=Terminated
U=Terminated With Pay
V=Terminated Pension Pay Out
W=Short Work Break
X=Retired-Pension Administration
58 GP_PA_HIRE_DT Date(10) DATE used in payroll analytics
59 TERMINATION_DT Date(10) DATE Termination Date
60 CONTRACT_NUM Character(25) VARCHAR2(25) NOT NULL Contract Number
61 STRM_NUM Number(4,0) SMALLINT NOT NULL Stream Number
62 GROUP_LIST_ID Character(10) VARCHAR2(10) NOT NULL Group List
63 PYE_CALC_STAT Character(2) VARCHAR2(2) NOT NULL Calculation Status: field indicates the processing status of a segment (payment)
00=Identified
02=Calculation Error
03=Calculation Error - Bypassed
04=Calculation Error - By Rule
11=No Segment Created
50=Calculation Successful
55=Frozen For Further Calc
70=Finalized
75=Finalized - With Banking
64 PRC_ORD_TS DateTime(26) TIMESTAMP Process Order Timestamp
65 GP_SEG_EXISTS Character(1) VARCHAR2(1) NOT NULL multiple segments exist
N=No
Y=Yes

Y/N Table Edit

Default Value: N

66 GP_RPT_RETRO Character(1) VARCHAR2(1) NOT NULL Retroactivity Type
1=Original
2=Recalculation
3=Prior Calculation
4=Last Version/Revision
5=Result Delta - Corrective
6=Result Delta - Forwarded
67 GP_EXIST_CURR_CAL Character(1) VARCHAR2(1) NOT NULL exists only in current calendar
N=No
Y=Yes
68 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
69 PYMT_DT Date(10) DATE Payment Date
70 SETID_EMPL_CLASS Character(5) VARCHAR2(5) NOT NULL Employee class Set ID
71 EMPL_CLASS Character(3) VARCHAR2(3) NOT NULL Employee Classification
72 GP_CALC_VAL1 Signed Number(20,6) DECIMAL(18,6) NOT NULL GP Calculation value 1
73 GP_CALC_VAL2 Signed Number(20,6) DECIMAL(18,6) NOT NULL GP Calculation value 2