GPGB_EMP_P45_VW

(SQL View)
Index Back

Emplid prompt alone for p45

This view is created as a prompt table for p45 run control page against EMPLID field when no paygroup and calc group are selected on the page.

SELECT DISTINCT C.OPRID ,B.PAY_ENTITY ,A.EMPLID ,P.NAME ,P.LAST_NAME_SRCH FROM PS_GP_PYE_PRC_STAT A , PS_GPGB_EE_RSLT B , PS_PERSON_NAME P , PS_GP_OPR_RULE_PRF C WHERE A.EMPLID = B.EMPLID AND A.EMPLID = P.EMPLID AND A.EMPL_RCD=B.EMPL_RCD AND A.CAL_RUN_ID = B.CAL_RUN_ID AND A.GP_PAYGROUP=B.GP_PAYGROUP AND A.PRD_TYPE <> 'H' AND A.CALC_TYPE = 'P' AND B.CAL_RUN_ID IN ( SELECT A1.CAL_RUN_ID FROM PS_GP_CAL_RUN A1 WHERE A1.RUN_FINALIZED_IND = 'Y' AND A1.USE_AS_TMPLT_IND='N' AND (C.USED_BY= 'A'OR (C.USED_BY = 'C' AND A1.COUNTRY = C.COUNTRY)) ) AND B.GP_PAYGROUP IN ( SELECT PG1.GP_PAYGROUP FROM PS_GP_PYGRP PG1 , PS_GP_PYENT PE WHERE (PG1.PAY_ENTITY=PE.PAY_ENTITY AND PE.COUNTRY=C.COUNTRY) OR (PG1.PAY_ENTITY=PE.PAY_ENTITY AND C.USED_BY='A') ) AND NOT EXISTS ( SELECT 'x' FROM PS_GPGB_PPR_P45CHK CHK WHERE CHK.EMPLID= B.EMPLID AND CHK.EMPL_RCD=B.EMPL_RCD AND CHK.CAL_RUN_ID=B.CAL_RUN_ID AND CHK.RSLT_SEG_NUM=B.RSLT_SEG_NUM AND CHK.GP_PAYGROUP=B.GP_PAYGROUP AND CHK.CAL_ID=B.CAL_ID)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 PAY_ENTITY Character(10) VARCHAR2(10) NOT NULL Pay Entity
3 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
4 NAME Character(50) VARCHAR2(50) NOT NULL Name
5 LAST_NAME_SRCH Character(30) VARCHAR2(30) NOT NULL Last Name