GP_WC_NHRLNG_VW

(SQL View)
Index Back

GP WC Newhire

GP WC Newhire

SELECT DISTINCT A.EMPLID , ( SELECT B.NAME FROM PS_NAMES B WHERE B.EMPLID = A.EMPLID AND B.NAME_TYPE = 'PRI' AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_NAMES B1 WHERE B1.EMPLID = B.EMPLID AND B1.NAME_TYPE = B.NAME_TYPE AND B1.EFFDT <= %CurrentDateIn)) , A.EMPL_RCD , A.ACTION, LNG.LANGUAGE_CD, LNG.ACTION_DESCR, A.EFFDT , B.CAL_RUN_ID , B.CAL_ID , A.GP_PAYGROUP ,A.COMPANY , A.DEPTID ,(CASE WHEN A.EFFDT = B.PRD_BGN_DT THEN ( SELECT MESSAGE_TEXT FROM PSMSGCATLANG WHERE MESSAGE_SET_NBR = 17000 AND MESSAGE_NBR = 5094) WHEN A.EFFDT <> B.PRD_BGN_DT THEN ( SELECT MESSAGE_TEXT FROM PSMSGCATLANG WHERE MESSAGE_SET_NBR = 17000 AND MESSAGE_NBR = 5087) END ) NEW_HIRE_TYPE ,CASE WHEN J.RUN_OPEN_IND = 'Y' THEN 'O' WHEN J.RUN_FINALIZED_IND = 'Y' AND J.PMT_SENT_IND <> 'Y' THEN 'F' WHEN J.PMT_SENT_IND = 'Y' THEN 'B' END CALSTATUS ,(%Sql(GP_WC_FINAL_TS,J.CAL_RUN_ID)), %DateDiff(A.EFFDT , %Datein(%CurrentDateOut)) FROM PS_JOB A ,PS_GP_PYE_PRC_STAT P , PS_GP_CAL_RUNOF_VW B, PS_GP_CAL_RUN J , PS_ACTION_LNG LNG WHERE J.CAL_RUN_ID = B.CAL_RUN_ID AND B.CALC_TYPE = 'P' AND B.GP_PAYGROUP = A.GP_PAYGROUP AND A.EFFDT BETWEEN B.PRD_BGN_DT AND B.PRD_END_DT AND A.ACTION IN( SELECT T.ACTION FROM PS_GP_WC_ACT_DTL T WHERE ( T.COUNTRY = B.COUNTRY OR ( T.COUNTRY = 'ALL' AND (NOT EXISTS( SELECT S.COUNTRY FROM PS_GP_WC_ACT_DTL S WHERE S.COUNTRY = B.COUNTRY )) ) ) AND T.GP_WC_ACTION_ID = 'H' ) AND P.EMPLID = A.EMPLID AND P.EMPL_RCD = A.EMPL_RCD AND P.CALC_TYPE = 'P' AND P.GP_PAYGROUP = A.GP_PAYGROUP AND P.GP_PAYGROUP = B.GP_PAYGROUP AND P.CAL_RUN_ID = B.CAL_RUN_ID AND ((P.CAL_ID = B.CAL_ID) OR (B.CAL_ID = ' ' AND J.OFF_CYCLE = 'Y')) AND NOT EXISTS( SELECT 1 FROM PS_JOB J WHERE J.EMPLID = A.EMPLID AND J.EMPL_RCD = A.EMPL_RCD AND %DateAdd(%DateIn(J.EFFDT),-1) BETWEEN B.PRD_BGN_DT AND B.PRD_END_DT AND %DateAdd(%DateIn(J.EFFDT),-1) >= A.EFFDT AND J.EFFSEQ = ( SELECT MAX(J1.EFFSEQ) FROM PS_JOB J1 WHERE J1.EMPLID = J.EMPLID AND J1.EMPL_RCD = J.EMPL_RCD AND J1.EFFDT = J.EFFDT) AND J.ACTION IN ( SELECT T.ACTION FROM PS_GP_WC_ACT_DTL T WHERE ( T.COUNTRY = B.COUNTRY OR ( T.COUNTRY = 'ALL' AND (NOT EXISTS( SELECT S.COUNTRY FROM PS_GP_WC_ACT_DTL S WHERE S.COUNTRY = B.COUNTRY )) ) ) AND T.GP_WC_ACTION_ID = 'T' ) ) AND A.ACTION = LNG.ACTION AND LNG.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_ACTION_LNG B WHERE B.ACTION = LNG.ACTION AND B.LANGUAGE_CD = LNG.LANGUAGE_CD AND B.EFFDT <= %CurrentDateIn) UNION SELECT DISTINCT A.EMPLID , ( SELECT B.NAME FROM PS_NAMES B WHERE B.EMPLID = A.EMPLID AND B.NAME_TYPE = 'PRI' AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_NAMES B1 WHERE B1.EMPLID = B.EMPLID AND B1.NAME_TYPE = B.NAME_TYPE AND B1.EFFDT <= %CurrentDateIn)) , A.EMPL_RCD , A.ACTION , LNG.LANGUAGE_CD, LNG.ACTION_DESCR,A.EFFDT ,P.CAL_RUN_ID , P.CAL_ID , A.GP_PAYGROUP ,A.COMPANY , A.DEPTID , ( SELECT MESSAGE_TEXT FROM PSMSGCATLANG WHERE MESSAGE_SET_NBR = 17000 AND MESSAGE_NBR = 5088) ,CASE WHEN J.RUN_OPEN_IND = 'Y' THEN 'O' WHEN J.RUN_FINALIZED_IND = 'Y' AND J.PMT_SENT_IND <> 'Y' THEN 'F' WHEN J.PMT_SENT_IND = 'Y' THEN 'B' END ,(%Sql(GP_WC_FINAL_TS,J.CAL_RUN_ID)), %DateDiff(A.EFFDT , %Datein(%CurrentDateOut)) FROM PS_JOB A ,PS_GP_PYE_PRC_STAT P , PS_GP_CAL_RUNOF_VW B, PS_GP_CAL_RUN J , PS_ACTION_LNG LNG WHERE J.CAL_RUN_ID = P.CAL_RUN_ID AND B.CALC_TYPE = 'P' AND A.ACTION IN( SELECT T.ACTION FROM PS_GP_WC_ACT_DTL T WHERE ( T.COUNTRY = B.COUNTRY OR ( T.COUNTRY = 'ALL' AND (NOT EXISTS( SELECT S.COUNTRY FROM PS_GP_WC_ACT_DTL S WHERE S.COUNTRY = B.COUNTRY )) ) ) AND T.GP_WC_ACTION_ID = 'H' ) AND A.ACTION_DT >= ( SELECT MAX(%DatePart(B1.CAL_IDNT_TS )) FROM PS_GP_CAL_RUN_DTL B1 WHERE B1.GP_PAYGROUP = B.GP_PAYGROUP AND B1.CAL_FINAL_TS IS NOT NULL ) AND P.EMPLID = A.EMPLID AND P.EMPL_RCD = A.EMPL_RCD AND P.GP_PAYGROUP = A.GP_PAYGROUP AND P.PRD_TYPE = 'R' AND P.CALC_TYPE = 'P' AND B.GP_PAYGROUP = P.GP_PAYGROUP AND ((P.CAL_ID = B.CAL_ID) OR (B.CAL_ID = ' ' AND J.OFF_CYCLE = 'Y')) AND A.EFFDT BETWEEN B.PRD_BGN_DT AND B.PRD_END_DT AND A.ACTION = LNG.ACTION AND LNG.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_ACTION_LNG B WHERE B.ACTION = LNG.ACTION AND B.LANGUAGE_CD = LNG.LANGUAGE_CD AND B.EFFDT <= %CurrentDateIn) UNION SELECT DISTINCT A.EMPLID , ( SELECT B.NAME FROM PS_NAMES B WHERE B.EMPLID = A.EMPLID AND B.NAME_TYPE = 'PRI' AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_NAMES B1 WHERE B1.EMPLID = B.EMPLID AND B1.NAME_TYPE = B.NAME_TYPE AND B1.EFFDT <= %CurrentDateIn)) , A.EMPL_RCD , A.ACTION,LNG.LANGUAGE_CD, LNG.ACTION_DESCR ,A.EFFDT , B.CAL_RUN_ID , B.CAL_ID , A.GP_PAYGROUP ,A.COMPANY , A.DEPTID , ( SELECT MESSAGE_TEXT FROM PSMSGCATLANG WHERE MESSAGE_SET_NBR = 17000 AND MESSAGE_NBR = 5089) NEW_HIRE_TYPE ,CASE WHEN C.RUN_OPEN_IND = 'Y' THEN 'O' WHEN C.RUN_FINALIZED_IND = 'Y' AND C.PMT_SENT_IND <> 'Y' THEN 'F' WHEN C.PMT_SENT_IND = 'Y' THEN 'B' END ,(%Sql(GP_WC_FINAL_TS,C.CAL_RUN_ID)), %DateDiff(A.EFFDT , %Datein(%CurrentDateOut)) FROM PS_JOB A ,PS_GP_PYE_PRC_STAT P , PS_GP_CAL_RUNOF_VW B, PS_JOB J,PS_GP_CAL_RUN C , PS_ACTION_LNG LNG WHERE C.CAL_RUN_ID = B.CAL_RUN_ID AND B.CALC_TYPE = 'P' AND A.EFFDT BETWEEN B.PRD_BGN_DT AND B.PRD_END_DT AND A.ACTION IN( SELECT T.ACTION FROM PS_GP_WC_ACT_DTL T WHERE ( T.COUNTRY = B.COUNTRY OR ( T.COUNTRY = 'ALL' AND (NOT EXISTS( SELECT S.COUNTRY FROM PS_GP_WC_ACT_DTL S WHERE S.COUNTRY = B.COUNTRY )) ) ) AND T.GP_WC_ACTION_ID = 'H' ) AND P.EMPLID = A.EMPLID AND P.EMPL_RCD = A.EMPL_RCD AND P.CALC_TYPE = 'P' AND P.GP_PAYGROUP = A.GP_PAYGROUP AND P.GP_PAYGROUP = B.GP_PAYGROUP AND P.CAL_RUN_ID = B.CAL_RUN_ID AND P.CAL_ID = B.CAL_ID AND ((P.CAL_ID = B.CAL_ID) OR (B.CAL_ID = ' ' AND C.OFF_CYCLE = 'Y')) AND J.EMPLID = A.EMPLID AND J.EMPL_RCD = A.EMPL_RCD AND %DateAdd(%DateIn(J.EFFDT),-1) BETWEEN B.PRD_BGN_DT AND B.PRD_END_DT AND %DateAdd(%DateIn(J.EFFDT),-1) >= A.EFFDT AND J.EFFSEQ = ( SELECT MAX(J1.EFFSEQ) FROM PS_JOB J1 WHERE J1.EMPLID = J.EMPLID AND J1.EMPL_RCD = J.EMPL_RCD AND J1.EFFDT = J.EFFDT) AND J.ACTION IN ( SELECT T.ACTION FROM PS_GP_WC_ACT_DTL T WHERE ( T.COUNTRY = B.COUNTRY OR ( T.COUNTRY = 'ALL' AND (NOT EXISTS( SELECT S.COUNTRY FROM PS_GP_WC_ACT_DTL S WHERE S.COUNTRY = B.COUNTRY )) ) ) AND T.GP_WC_ACTION_ID = 'T' ) AND J.EFFDT = ( SELECT MIN(J1.EFFDT) FROM PS_JOB J1 WHERE J1.EMPLID = J.EMPLID AND J1.EMPL_RCD = J.EMPL_RCD AND J1.ACTION = J.ACTION AND J1.LAST_HIRE_DT= A.EFFDT) AND A.ACTION = LNG.ACTION AND LNG.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_ACTION_LNG B WHERE B.ACTION = LNG.ACTION AND B.LANGUAGE_CD = LNG.LANGUAGE_CD AND B.EFFDT <= %CurrentDateIn)

  • Related Language Record for GP_WC_NEWHIR_VW
  • # PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
    1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
    2 NAME Character(50) VARCHAR2(50) NOT NULL Name
    3 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
    4 ACTION Character(3) VARCHAR2(3) NOT NULL HR Action
    5 LANGUAGE_CD Character(3) VARCHAR2(3) NOT NULL Language Code
    6 ACTION_DESCR Character(50) VARCHAR2(50) NOT NULL Action Description
    7 EFFDT Date(10) DATE Effective Date

    Default Value: %date

    8 CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
    9 CAL_ID Character(18) VARCHAR2(18) NOT NULL calendar id
    10 GP_PAYGROUP Character(10) VARCHAR2(10) NOT NULL Global Payroll pay group
    11 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
    12 DEPTID Character(10) VARCHAR2(10) NOT NULL Department
    13 GP_WC_WORKITM_TYPE Character(254) VARCHAR2(254) NOT NULL GP WorkCenter WorkItem Type
    14 GP_CAL_STATUS Character(1) VARCHAR2(1) NOT NULL Calculation status
    B=Finalized with Banking
    F=Finalized
    O=Open
    15 GP_WC_FINAL_DAYS Number(4,0) SMALLINT NOT NULL Finalized day count
    16 GP_WC_LIMIT_DAY Number(4,0) SMALLINT NOT NULL Work item day count