Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Human Capital Management
Lawson S3 HR/Payroll/Benefits
Position History
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Zac Shields
Past 24 Hours:
0
Prev. 24 Hours:
1
Overall:
5210
People Online:
Visitors:
186
Members:
0
Total:
186
Online Now:
New Topics
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
S3 Customization/Development
Read and Write CSV file COBOL
10/9/2024 2:53 PM
Does anyone have a quik example of a program that
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Human Capital Management
Lawson S3 HR/Payroll/Benefits
Position History
Please
login
to post a reply.
10 Replies
1
Subscribed to this topic
68 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
jph826
Advanced Member
Posts: 28
6/24/2013 6:27 PM
I need to write a Crystal report that shows each job an employee has ever had, the start date, and the amount of years/mths in that position. The PAEMPPOS table is difficult to report off of, as there is a position record for every raise, pl/dept or super change. The HRHISTORY table, FLD NBR 19 has the data, but I'm not sure how to calculate the amount of time in the position. For example, employee 1000:
Beg Date 10/18/2004, Position 0194
Beg Date 10/21/2007, Position 0171
Beg Date 10/21/2007, Position 0194 (the 0171 must have been a mistake, and a correction was entered on the same date)
Beg Date 9/21/2008, Position 0326
Beg Date 3/24/13, Position 3564
Beg Date 6/1/2013, Position 0194
The report needs to show the Beg Date, the Position and length of time in the position. If they were in a position more than once, each needs to be listed individually. Any help would be most appreciated. Thank you
Mary Porter
Veteran Member
Posts: 337
6/24/2013 6:35 PM
Are you using Assignment date in PA13? If so you could use DATE_ASSIGN in the PAEMPPOS table since that doesn't change when salary changes ... it's been helpful for me when I've had to pull that.
jph826
Advanced Member
Posts: 28
6/24/2013 7:37 PM
Thanks for your response Mary. I checked, and it doesn't look like we are using that field.
Shane Jones
Veteran Member
Posts: 460
7/20/2013 10:55 PM
Not sure if this is what you are looking for but if you have the report sorted ascending by the "Beg_Date" and you use a formula with previous(Beg_Date) it will let you use the previous Beg_Date to calculate the length of time in a position. [The last column shows what you would see with a formula showing previous(Beg_Date).]
Beg Date 9/21/2008, Position 0326, NULL
Beg Date 3/24/13, Position 3564, 9/21/2008
Beg Date 6/1/2013, Position 0194, 3/24/2013
However, to make this work you might want to think a bit about how to do the formulas to adjust for the first and last records and to show the title with the right information. You can use the previous() for other fields to display information on the next line if needed.
Good luck!
Dave Curtis
Veteran Member
Posts: 136
7/21/2013 9:34 PM
I have a SQL statement that pulls this type of report. It "cleans up" the repeat records in PAEMPPOS. Are you on Oracle?
PattyG
Advanced Member
Posts: 22
7/22/2013 11:38 AM
I would like a copy of the SQL statement please. patriica.goforth@msj.org
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:09 PM
SELECT jd.company
,jd.employee
,jd.last_name
,jd.first_name
,jd.adj_hire_date
,jd.date_hired
,jd.term_date
,jd.status
,jd.position
,jd.job_code
,jd.title
,jd.process_level
,jd.department
,jd.dept_name
,jd.effect_date
,jd.job_end_date
,ROUND((MONTHS_BETWEEN(NVL(jd.job_end_date,SYSDATE),jd.effect_date))/12,2) as years_in_job
,jd.prev_position
,jd.prev_job_code
,jd.prev_title
,jd.prev_process_level
,jd.prev_department
,jd.prev_dept_name
FROM (SELECT po.*
,CASE WHEN (CASE WHEN po.end_date = to_date('01011700','mm/dd/yyyy') THEN NULL
ELSE (LEAD(po.effect_date, 1)
OVER(PARTITION BY po.employee ORDER BY po.effect_date))-1 END) IS NULL
THEN po.term_date
ELSE (CASE WHEN po.end_date = to_date('01011700','mm/dd/yyyy') THEN NULL
ELSE (LEAD(po.effect_date, 1)
OVER(PARTITION BY po.employee ORDER BY po.effect_date))-1 END) END as job_end_date
FROM (SELECT p.*
,LAG(p.position, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_position
,LAG(p.fte, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_fte
,LAG(p.job_code, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_job_code
,LAG(p.title, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_title
,LAG(p.process_level, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_process_level
,LAG(p.department, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_department
,LAG(p.dept_name, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_dept_name
FROM (SELECT p.company
,p.employee
,trim(e.last_name) as last_name
,trim(e.first_name) as first_name
,e.adj_hire_date
,e.date_hired
,NULLIF(e.term_date, to_date('01011700','mm/dd/yyyy')) as term_date
,e.emp_status as status
,p.position
,p.pos_level
,p.fte
,p.effect_date
,p.end_date
,p.job_code
,j.description as title
,p.process_level
,p.department
,d.r_name as dept_name
FROM paemppos p
JOIN jobcode j ON (p.job_code = j.job_code)
JOIN deptcode d ON (p.process_level = d.process_level AND
p.department = d.department)
JOIN employee e ON (p.employee = e.employee)
WHERE pos_level = 1
ORDER BY p.employee,p.pos_level,p.effect_date) p) po
WHERE po.job_code <> po.prev_job_code
OR po.prev_job_code IS NULL) jd
--Created By Dave Curtis
--Jan-2012
--This SQL statement is intended to be used to pull job history and provide the length of
--time spent in a specific job
--the statement uses PAEMPPOS to pull the history
--The statement is set up to only pull position level 1
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:16 PM
This is the basic SQL statement used. I alter it as needed, - like when I need to run a report that shows how long someone was in a specific position (defined as in a specific job within a specific department) - then I alter the SQL so the WHERE clause at the bottom is
WHERE (po.process_level <> po.prev_process_level
OR po.prev_process_level IS NULL)
OR (po.department <> po.prev_department
OR po.prev_department IS NULL)
OR (po.job_code <> po.prev_job_code
OR po.prev_job_code IS NULL)
Depending on how you use positions and how/if you use multiple positions, you may also want to change the SQL so it includes position levels other than 1. This can add another level of complexity to it, but it can be altered to pull in multiple positions as well.
Feel free to e-mail me if you have questions about the SQL statement I posted. I would be more than willing to help if I can.
dave.curtis.theq@gmail.com
Attachments
001_job_hist_data.txt
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:20 PM
PattyG - I tried to e-mail you the statement but my e-mail kept returning the e-mail saying it was not able to deliver the e-mail.
PattyG
Advanced Member
Posts: 22
7/22/2013 12:29 PM
can you tell me the table name? patricia.goforth@msj.org
Mis-spelled my name last reply
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 2:20 PM
PAEMPPOS is the table
Please
login
to post a reply.