Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with YTD Accumulator report - employees are missing!

Status
Not open for further replies.

tstamps

Technical User
Jan 25, 2011
2
US
I am trying to create a report that shows selected YTD accumulators for everyone. We have three paygroups, I am building my report using only one for simplicity and testing. The problem is that I have two employees in this paygroup who were active as of 12/31/10, but have since terminated. Their YTD information as of 12/31/10 is not showing in the report. I am using ReportSmith 3.1.

Here is the SQL:

SELECT
"PS_EMPLOYEES"."EMPLID", "PS_EMPLOYEES"."NAME", "PS_EMPLOYEES"."PAYGROUP", "PS_EMPLOYEES"."FILE_NBR", "PS_AL_YTD_ACCUM"."ACCUM_AMOUNT", "PS_AL_YTD_ACCUM"."ACCUM_NBR", "PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT"
FROM
"PS_EMPLOYEES", "PS_AL_YTD_ACCUM"
WHERE
(((("PS_EMPLOYEES"."EFFSEQ"= (
SELECT MAX("INNERALIAS"."EFFSEQ")
FROM "PS_EMPLOYEES" INNERALIAS
WHERE "INNERALIAS"."EMPLID" = "PS_EMPLOYEES"."EMPLID"
AND "INNERALIAS"."EFFDT" = "PS_EMPLOYEES"."EFFDT")
AND
"PS_EMPLOYEES"."EFFDT" = (
SELECT MAX("INNERALIAS"."EFFDT")
FROM "PS_EMPLOYEES" INNERALIAS
WHERE "INNERALIAS"."EMPLID" = "PS_EMPLOYEES"."EMPLID"
AND "INNERALIAS"."EFFDT" <= TO_DATE('2010-12-31', 'YYYY-MM-DD')))) AND
("PS_EMPLOYEES"."PAYGROUP" = '8DG') AND
("PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT" = TO_DATE('2010-12-28', 'YYYY-MM-DD')) AND
("PS_AL_YTD_ACCUM"."ACCUM_NBR" IN( 'AD', 'CN', 'CX', 'C3', 'DK', 'DP', 'DU', 'D4', 'EC', 'EQ', 'EV', 'E5', 'E9', 'FD', 'FH', 'R2', 'R6', 'C7', 'AH')) AND
("PS_AL_YTD_ACCUM"."WEEK_NBR" = '52')))
AND
("PS_AL_YTD_ACCUM"."FILE_NBR" = "PS_EMPLOYEES"."FILE_NBR" )
GROUP BY
"PS_EMPLOYEES"."EMPLID", "PS_EMPLOYEES"."NAME", "PS_EMPLOYEES"."PAYGROUP", "PS_EMPLOYEES"."FILE_NBR", "PS_AL_YTD_ACCUM"."ACCUM_AMOUNT", "PS_AL_YTD_ACCUM"."ACCUM_NBR", "PS_AL_YTD_ACCUM"."AL_PROCESS_EFFDT"
ORDER BY
"PS_AL_YTD_ACCUM"."ACCUM_NBR"

I believe the problem lies in the effective date of the PS_EMPLOYEES table but I'm not sure how to indicate I need all employees and selected accumulators, whether they were active or not on 12/31. Thanks for any help!
 
Sorry..I realized I should be using the PS_ALL_EMPLOYEES.
 
From the ADP Data Dictionary:
ADP Enterprise HR Data Dictionary

EMPLOYEES

This table is created by running an SQR program that selects particular columns from the following tables that are current at the time the program runs: PS_PERSONAL_DATA, PS_EMPLOYMENT, PS_JOB, PS_JOBCODE_TBL, PS_DEPT_TBL, PSASOFDATE


I would use PS_PERSONAL_DATA ==> PS_EMPLOYMENT ==> PS_JOB ==> PS_AL_YTD_DATA ==> PS_AL_YTD_ACCUM

Now you know you have the unfiltered data and it is just Selections that you need to work on...

Specializing in ReportSmith Training and Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top