PY_OPT_USA_F_VW

(SQL View)
Index Back

Self Service Year End Forms

Self Service Year End Forms

SELECT A.EMPLID ,D.W2_REPORTING_CO ,D.PY_YE_ONLINE_OPT ,'B' FROM PS_PERSON A , PS_JOB B , PS_W2_COMPANY C , PS_PY_YEOPT_CO_USA D WHERE B.EMPLID=A.EMPLID AND B.EFFDT = ( SELECT MIN (B1.EFFDT) FROM PS_JOB B1 WHERE B1.EMPLID = B.EMPLID AND B1.EMPL_RCD = B.EMPL_RCD AND B1.COMPANY = B.COMPANY AND B1.HR_STATUS = 'A' AND B1.EFFDT > %CurrentDateIn) AND B.EFFSEQ = ( SELECT MAX(B2.EFFSEQ) FROM PS_JOB B2 WHERE B2.EMPLID = B.EMPLID AND B2.EMPL_RCD = B.EMPL_RCD AND B2.EFFDT = B.EFFDT AND B2.COMPANY = B.COMPANY) AND B.HR_STATUS = 'A' AND C.COMPANY=B.COMPANY AND C.CALENDAR_YEAR=( SELECT MAX(C1.CALENDAR_YEAR) FROM PS_W2_COMPANY C1 WHERE C1.COMPANY=C.COMPANY AND %DateIn((%NumToChar(C1.CALENDAR_YEAR) %Concat '-01-01')) <= %CurrentDateIn) AND D.W2_REPORTING_CO=C.W2_REPORTING_CO AND D.PY_YE_ONLINE_OPT = 'Y' AND D.PY_TAX_YEAR = ( SELECT MAX(D1.PY_TAX_YEAR) FROM PS_PY_YEOPT_CO_USA D1 WHERE D1.W2_REPORTING_CO=D.W2_REPORTING_CO AND %DateIn((%NumtoChar(D1.PY_TAX_YEAR) %Concat '-01-01')) <= %CurrentDateIn)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 W2_REPORTING_CO Character(3) VARCHAR2(3) NOT NULL W-2 Reporting Company
3 PY_YE_ONLINE_OPT Character(1) VARCHAR2(1) NOT NULL Enable Electronic Year-End Form in Self Service (Y/N). This option indicates whether or not the employees are able to view their year-end forms from the Self-Service.
4 PY_YE_FORMOPTION Character(1) VARCHAR2(1) NOT NULL Year-End Form Option determines whether the year-end forms are to be available online for viewing.
B=Both Print and View Form
P=Issue Paper Copy Only
V=View Online Form