TL_UNPROC_RP_VW

(SQL View)
Index Back

Unprocessed Reported Time


SELECT R.EMPLID , R.EMPL_RCD , R.DUR , R.REPORTED_STATUS , R.PUNCH_TYPE , R.TRC , CASE WHEN R.TRC=' ' AND R.PUNCH_TYPE<>'0' THEN 'H' WHEN R.TRC = ' ' THEN ' ' ELSE ( SELECT T.TRC_TYPE FROM PS_TL_TRC_TBL T WHERE R.TRC=T.TRC AND T.EFFDT = ( SELECT MAX(S.EFFDT) FROM PS_TL_TRC_TBL S WHERE S.TRC=T.TRC AND S.EFFDT <= R.DUR)) END AS TRC_TYPE , R.TL_QUANTITY FROM PS_TL_RPTD_TIME R WHERE REPORTED_STATUS IN ('SV','NA','AP','DN','SB','PB') UNION ALL SELECT DISTINCT PT.EMPLID , PT.EMPL_RCD , PT.DUR , 'CN' ,'0' , PT.TRC , T.TRC_TYPE , 0 FROM PS_TL_PAYABLE_TIME PT , PS_TL_TRC_TBL T WHERE NOT EXISTS ( SELECT 1 FROM PS_TL_RPTD_TIME RT WHERE RT.EMPLID=PT.EMPLID AND RT.EMPL_RCD=PT.EMPL_RCD AND RT.DUR=PT.DUR) AND T.EFFDT = ( SELECT MAX(S.EFFDT) FROM PS_TL_TRC_TBL S WHERE S.TRC=T.TRC AND S.EFFDT <= PT.DUR)

# 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 DUR Date(10) DATE Date Under Report associates time being reported, scheduled or paid, to a specific date.
4 REPORTED_STATUS Character(2) VARCHAR2(2) NOT NULL Reported Status
AP=Approved
DN=Denied
IP=Approval In Process
NA=Needs Approval
NW=New
PB=Pushed Back
PR=Processed
SB=Submitted
SV=Saved
5 PUNCH_TYPE Character(2) VARCHAR2(2) NOT NULL Global Punch Types
0=Elapsed
1=In
2=Out
3=Meal
4=Break
5=Transfer
6 TRC Character(5) VARCHAR2(5) NOT NULL Time Reporting Code used to report time in Time and Labor
7 TRC_TYPE Character(1) VARCHAR2(1) NOT NULL This defines TRC Type of Hours,Amounts ,Units
A=Amount
H=Hours
U=Units
8 TL_QUANTITY Signed Number(20,6) DECIMAL(18,6) NOT NULL This field represents the measure of Work in hrs,amount etc.,