Created by Corina C Larsen, last modified by Miki Yanagi on Jul 27, 2023
No key fields.
| Key | Record.Fieldname | Format | XLAT | Heading Text |
|---|---|---|---|---|
| ACCOUNTING_PERIOD - Accounting Period | Num3.0 | Period | ||
| ACCT_CD - Combination Code | Char25 | Combo Code | ||
| BATCH_ID - Batch ID | Char12 | Batch ID | ||
| COMPANY - Company | Char3 | Co | ||
| DEPTID - Department | Char10 | Dept ID | ||
| EARNINGS - Earnings | SNm13.2 | Earnings | ||
| EMPLID - Empl ID | Char11 | ID | ||
| EMPL_RCD - Empl Record | Num3.0 | Empl Record | ||
| ERNCD - Earnings Code | Char3 | Earn Code | ||
| FISCAL_YEAR - Fiscal Year | Num4.0 | Year | ||
| JOBCODE - Job Code | Char6 | Job Code | ||
| NAME - Name | Char50 | Name | ||
| NATIONAL_ID - National ID | Char20 | NID | ||
| OFF_CYCLE - Off Cycle ? | Char1 | Off Cycle | ||
| PAYGROUP - Pay Group | Char3 | Group | ||
| PAY_END_DT - Pay Period End Date | Date | Pay Period End | ||
| POSITION_NBR - Position Number | Char8 | Position | ||
| RETRO_MOD_DT - GP Retro Date Modification | Date | RetroDtMod | ||
| REVERSED - Reversed | Char1 | Reversed | ||
| STATUSSTRING - Status String | Char5 | Status String |
SQL for UM_EARN_ACCT_VW Expand source
SELECT /*+ index(c ps_pers_nid ) */
A.COMPANY,
A.PAYGROUP,
A.PAY_END_DT,
A.OFF_CYCLE,
A.ERNCD,
A.FISCAL_YEAR,
A.ACCOUNTING_PERIOD,
A.ACCT_CD,
A.DEPTID,
A.POSITION_NBR,
A.JOBCODE,
C.NATIONAL_ID,
B.NAME,
B.EMPLID,
A.EMPL_RCD,
A.REVERSED,
NULL,
' ',
' ',
SUM(A.EARNINGS)
FROM PS_PAY_ERN_DIST A, PS_PAY_CHECK B, PS_PERS_NID C
WHERE A.COMPANY = B.COMPANY
AND A.PAYGROUP = B.PAYGROUP
AND A.PAY_END_DT = B.PAY_END_DT
AND A.OFF_CYCLE = B.OFF_CYCLE
AND A.PAGE_NUM = B.PAGE_NUM
AND A.LINE_NUM = B.LINE_NUM
AND A.SEPCHK = B.SEPCHK
AND C.EMPLID = B.EMPLID
AND C.PRIMARY_NID = 'Y'
AND C.NATIONAL_ID_TYPE = 'PR'
GROUP BY A.COMPANY,
A.PAYGROUP,
A.PAY_END_DT,
A.OFF_CYCLE,
A.ERNCD,
A.FISCAL_YEAR,
A.ACCOUNTING_PERIOD,
A.ACCT_CD,
A.DEPTID,
A.POSITION_NBR,
A.JOBCODE,
C.NATIONAL_ID,
B.NAME,
B.EMPLID,
A.EMPL_RCD,
A.REVERSED
UNION
SELECT /*+ index(f ps_pers_nid) */
D.COMPANY,
D.PAYGROUP,
D.PAY_END_DT,
D.OFF_CYCLE,
D.ERNCD,
D.FISCAL_YEAR,
D.ACCOUNTING_PERIOD,
D.ACCT_CD,
D.DEPTID,
D.POSITION_NBR,
D.JOBCODE,
F.NATIONAL_ID,
E.NAME,
E.EMPLID,
D.EMPL_RCD,
' ',
D.RETRO_MOD_DT,
D.BATCH_ID,
D.STATUSSTRING,
SUM(D.EARNINGS)
FROM PS_UM_RETRO_DTL D, PS_PAY_CHECK E, PS_PERS_NID F
WHERE D.COMPANY = E.COMPANY
AND D.PAYGROUP = E.PAYGROUP
AND D.PAY_END_DT = E.PAY_END_DT
AND D.OFF_CYCLE = E.OFF_CYCLE
AND D.PAGE_NUM = E.PAGE_NUM
AND D.LINE_NUM = E.LINE_NUM
AND D.SEPCHK = E.SEPCHK
AND F.EMPLID = E.EMPLID
AND F.PRIMARY_NID = 'Y'
AND D.STATUSSTRING <> 'O'
AND D.PROCESSED = 'Y'
AND F.PRIMARY_NID = 'Y'
AND F.NATIONAL_ID_TYPE = 'PR'
GROUP BY D.COMPANY,
D.PAYGROUP,
D.PAY_END_DT,
D.OFF_CYCLE,
D.ERNCD,
D.FISCAL_YEAR,
D.ACCOUNTING_PERIOD,
D.ACCT_CD,
D.DEPTID,
D.POSITION_NBR,
D.JOBCODE,
F.NATIONAL_ID,
E.NAME,
E.EMPLID,
D.EMPL_RCD,
' ',
D.RETRO_MOD_DT,
D.BATCH_ID,
D.STATUSSTRING;